Computational Thinking Flashcards
Define abstraction
Abstraction is the process of hiding unnecessary details while showing details that are more important in context
As a computational method, what is the purpose of abstraction in problem solving
As a computational thinking method abstraction allows to solve problems by focusing on what’s important and ignoring what isn’t
Explain two benefits of abstraction before writing program code
Two from:
Reduced development time as factors that can detract from the program can be ignored
Program more likely to solve the problem as unnecessary aspects will not detract from the main purpose of the program
Reduces complexity of programming code therefore can run on lower spec computers
What is the difference between a real life model and a model that has be abstracted
The real life model will have every detail, while the abstracted model may have removed certain details to make it easier to understand
How can we use the computational method ‘thinking ahead’ to outline the inputs and outputs for a system while designing it
The typical approach for this method is to think about what the system should output, i.e. what is the end goal
From here you can back track and create the inputs that should eventually lead to the previously outlined desired outputs
Describe the purpose of preconditions when thinking ahead
Preconditions may act as limitations and can effect the solution produced.
When thinking about how to solve a problem or design a system, preconditions should be thought about ahead of time to determine whether an idea is feasible
Describe the purpose of caching in a computer system as a form of thinking ahead
Caching is where a computer system places data in cache memory so it can be retrieved quickly. Smart algorithms can be used to prefetch data that is predicted to be need ahead of time
Give 1 benefit and 1 drawback of caching
Benefit:
improved speed and efficiency when accessing data
Drawback:
The predictive nature of caching is hard to implement and it can often lead to the wrong data being fetched, leading to it having to be removed(flushed). Maintaining the correct sequence of data in such circumstances is problematic
Give two benefits of using reusable code
two from:
Shortens development time
Save system resources
Lowers development costs
Reduces redundant code
Give two benefits of using reusable code
two from:
Shortens development time
Save system resources
Lowers development costs
Reduces redundant code
How does writing code in a modular way allow for the benefits of reusable code
Creating subroutines such as procedures, functions and methods is an example of reusable coding.
They are blocks of code than can be used multiple times simply by calling them, saving time, money and resources
How does the use of libraries allow for the benefits of reusable code
All the pre-written and pre-tested code in the library is available for the programmer to use as long as they import it. This saves them from having to write their own, potentially flawed, versions saving time, money and resources
Explain how think procedurally allows for a large complex task to become more manageable
Think procedurally is identifying the individual components in a bigger problem.
In this way, a large complex problem can be broken down in smaller, more manageable chunks
Name two types of diagrams which can be used to break down a problem
Decomposition diagrams
Top-down modular design/ structure diagrams
Why is it useful to consider decision points when designing a system/ program
Think logically by considering where decisions will have to be made allows us to consider and evaluate our options, which will likely result in a better outcome