2.1 Computational Thinking Flashcards
Computational Thinking
The ability to think logically about a problem and apply techniques for solving it
Abstraction
Devising a model to represent reality by removing all irrelevant details
Thinking Logically
Identifying the points in a program where a decision has to be made
Thinking logically what to look out for
If, else if, switch, while, fpr
Thinking Concurrently
Involves thinking about which sections of a process can be carried out at the same time
Concurrent Processing
Giving a slice of processor time to give tasks the illusion of parallel processing
One process does not have to finish before the other starts
Concurrent Processing Examples
numerical weather predictions, networks such as an airline reservation system
Concurrent Processing Advantages
+ User can interact with applications while other tasks run
+ Tasks requiring preconditions can wait until they hold
+ Programs can make better use of resources
Concurrent Processing Disadvantages
- Tasks shouldn’t be able to wait for each other indefinitely (deadlock)
- Can be expensive
Caching
Storing a temporary copy of frequently accessed data, instructions or websites so they can be accessed quicker
Abstraction by generalisation
Grouping things together based on common characteristics, commonly used in OOP
Data abstraction
Where details about how a data structure is used are separated from the implementation
For example we know a stack is LIFO and the operations that can be carried out on it but not how it is implemented
Preconditions
Requirements which must be met before a program is executed
Prefetching
Where an algorithm predicts which instructions are likely to soon be fetched and caches the instructions and data
Problem decomposition
Breaking a large, complex problem into smaller subproblems continually