Computational Thinking Flashcards
Abstraction
The process of separating ideas from reality by hiding unnecessary details and only showing details that are important
The Need for Abstraction
- Removes unnecessary details to improve the clarity of what is trying to be shown
- Reduce processing requirements
- Reduce memory requirements
Making an Abstract Model
- Remove unnecessary scenery/buildings
- Removal of unneeded controls or factors in a simulation
- Removal of small, insignificant roads on a map
Preconditions
Conditions that already exist and could affect how you devise a solution to a problem
Caching
Instructions or data retrieved from secondary storage and placed into main memory often remain there in case they are needed again before the program using them ends
Advantages and Disadvantages of Caching
A - Caching improves speed and efficiency as it results in faster retrieval times of data/instructions as they don’t need to be fetched from secondary storage which would’ve otherwise took longer
D - Caching algorithms due to their nature of predictive logic are difficult to implement
D - Maintaining the correct sequence of instructions/data when the wrong data is fetched can be problematic
Reusable Components
A - Shortens development time
A - Reduced testing requirements
A - Saves developer’s resources
Decision Point Programming
Start / End - Rectangle with curved edges
Process - Rectangle
Decision - Diamond
Input / Output -Parallelogram
Concurrent Processing
An application is making progress on more than one task at the same time but not necessarily simultaneously
Parallel Processing
An application splits its task into smaller subtasks which can be processed in parallel
Concurrency V Parallelism
Concurrency - Can support two or more actions in progress at the same time
Parallelism - Can support two or more actions executing simultaneously
Reactive Programming
User is able to interact with applications while other tasks are running
Parallelism
A complex program is able to make better use of multiple resources in a multicore/multi processor system
Advantages and Disadvantages of Thinking Concurrently
A - The number of tasks completed in a given time increases
A - The processor has less time spent idling as it waits on a user or another process
D - Having many tasks operating concurrently has the possibility of corrupting the consistent state of a program
D - Tasks should not suspend and then indefinitely wait for each other which is more likely to occur when multiple operations are occurring at once (deadlock)