Computational Thinking Flashcards
Abstraction
Spearating the logical and physical aspects of a problem
Abstract Model
Any model of a system which has been taken from or based on a real life situation
Examples of Abstraction
Symbols, Legends, Colour-coding, Icons, variables, functions
Why is abstraction needed?
To highlight details to improve the clarity of what you are trying to convey
Difference between abstraction and reality
No detail has been deliberately highlighted - real
Thinking Ahead: Benefits of Thinking Ahead
Maximise code efficiency, Minimise errors
Thinking Ahead: System Inputs
The information relevant to the problem
Thinking Ahead: System Outputs
The solution to the problem
Thinking Ahead: Solution Preconditions
Any condition which pre-exists the suggested solution
Thinking Ahead: Advantages of preconditions
- Making program componenets reusable
- Cutting out unnecessary checks
- Making porgrams easier to debug and maintain
Thinking Ahead: Caching
Temporary storage of data and instructions in main memory and remaining there in case they are needed
Thinking Ahead: Prefetching
Data is requested from main memory by the processor before it is actually required
Thinking Ahead: Benefits of caching
Improves speed and efficiency
Thinking Ahead: Drawbacks of caching
- Caching algorithms are complicated to implement
- Wrong data being cached means it has to be flushed
- Maintenance can be problematic
- Slower performance if resource isn’t found in cache
- Given a stale copy of resource
Thinking Ahead: Benefits of Reusable Code
- Shortens development time
- Saves systems resources
- Lowers development costs
- reduces redundant code