what is computational thinking?
the ability to think logically about a problem and applying techniques for solving it
what are the components of computational thinking?
what is abstraction?
a way of separating the logical and physical aspects of a problem - you remove excessive details about the problem until you reach a representation of the problem with only key features
what is involved in abstraction?
how does modelling and simulations relate to abstraction?
what is representational abstraction?
creating a simpler version of something real by leaving out unnecessary detail and keeping only what is useful - eg. the London Underground Map
what is abstraction by generalisation?
grouping things together based on their shared characteristics - important in OOP eg. when you create instances of a class with different details in each
what is procedural abstraction?
creating a procedure or subroutine to do a task without having to think about the internal workings every time you use it - focus on functionality rather than logic + easily reusable
eg. find the surface area of an object instead of a specific chopping board
what is functional abstraction?
the details of how a computation is carried out is hidden (a black box) - input given, processed, output returned - user only needs to know how to call a function - enhances flexibility of code
what is data abstraction?
what is problem reduction?
generalising or reducing a problem to one that has already been solved - break complex problems into smaller manageable problems
solve with standard algorithms or specialised ones
what are the 2 main challenges in producing a solution?
what is thinking ahead?
what is an input to a problem?
any data required to solve the problem - inputted by the user
what is an output to a problem?
the results passed back once inputs have been processed and the problem has been solved - must be of a suitable data type, structure and method depending on the situation
how do designers try to make solutions using inputs and outputs?
why is formally documenting inputs and outputs good?
there is no ambiguity in what must be supplied to the subroutine + what must be returned
what are preconditions?
requirements defined by the problem that must be met before a program can be executed - prevents execution failure/invalid answers
what are the advantages of specifying preconditions in documentation?
what is the purpose of preconditions?
ensure necessary checks are carried out before execution of a subroutine (by user or subroutine) - makes them more reusable
what are reusable programming components?
why are reusable program components useful?
what are some typical standards for reusable modules?
what is caching?
temporarily storing instructions/values in cache memory after use in case they are needed again and can be accessed quickly - eg. last few instructions executed, result of earlier computation