2.1 Elements of computational thinking Flashcards
(27 cards)
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)
Define modularisation
Breaking down of a program into several blocks of self contained code called modules
What are the benefits of modularisation
Programs are more reliable and have few errors, programs take less time to test and debug, programs are easier to maintain, modules can be reused, several programmers can work on the same program at once
What is a system diagram
One in which a program is broken down into its subprocedures which are then broken down into their subprocedures etc
Define thinking logically
The process of deciding and identifying where decisions should be or are made in a program
Define decision points
Points in a program where a decision is made based on a condition that affects the flow of a program
How do decisions affect the flow of a program
Different decisions are made based on conditions. Different decisions case different outcomes, affecting the flow of the program
Define thinking concurrently
The process of identifying multiple tasks that can be done at the same time
Define concurrent processing
One process does not have to finish before the other starts.
Processes are happening at the same time.
Each process given a slice of processor time.
Gives the appearance that several tasks are being performed simultaneously, even though only one processor is being used
Define parallel processing
Multiple processors each executing different instructions simultaneously, with the goal of speeding up computations. Impossible on a single processor