2.1 Elements of computational thinking Flashcards
Define computational thinking
The ability to think logically about a problem and apply techniques for solving it
Define Abstraction
The process of removing unneeded complexities, which creates a more generalised solution that is more useful. Reduces computational resources required. Focus on the main purpose of program
What is the need for abstraction?
Saves memory and resources: Large amount of irrelevant data, that would prevent the most efficient and general solution being found
Give some examples of abstraction (3)
Replacing complex objects with simple ones (like shapes)
Removal of scenery
Places can be represented by shapes with names
Define thinking ahead
The process of identifying the inputs, outputs and preconditions of a program
What are the advantages of defining preconditions
advantages of defining preconditions
Makes program components reusable, cuts out unnecessary checks, makes program easier to debug and maintain
What is the need for reusable program components
Saves time and money, pre-written code will be well tested and bug free, inputs outputs and preconditions already specified
Define caching
Saving Data and instructions that are frequently accessed in case they are needed again. Allows for faster access in future
What are some advantages of web caching
Faster access to cached resources, saves use of bandwidth, reduces load on web server
What are some disadvantages of web caching
May cause user to view “stale” copies of the website, takes up space on the hard drive
What are some programming standards
Inputs outputs and preconditions should be documented, variable identifiers should conform to a standard convention, all variables should be local to the module, documentation should be in a standard format, code should be commented, no module > one page
What makes a problem solvable by computational methods **
Involves calculations, has inputs processes and outputs, involves logical reasoning
Define thinking procedurally
The process of identifying the subprocedures necessary to solve a problem
Define decomposition
The process of breaking done a larger problem into several smaller problems that are easier to solve
Define structured/ modular programming
Uses top-down analysis for problem solving, identifying major tasks and breaking them down into subtasks, Tasks and subtasks are written as separate, self contain modules using local variables, Uses selection iteration and sequence (structured code)