Computational Thinking and Problem Solving
The four pillars
Computational thinking means framing a messy, real-world problem so precisely that it can be solved step by step, by a computer or by another person. The four pillars are decomposition (splitting a problem into smaller sub-problems that can be tackled separately), pattern recognition (noticing that similar sub-problems, or recurring shapes in data, can be handled the same way), abstraction (removing detail that does not affect the solution and keeping only what does - for example, modelling a customer as an ID, a name and a balance) and algorithm design (writing an unambiguous, finite sequence of steps that solves the problem). A related idea is generalisation: turning a solution built for one case into something reusable for a family of cases.
Representing a solution
You should be able to read and write pseudocode and flowcharts, and to recognise the standard flowchart symbols: oval for start/stop, parallelogram for input/output, rectangle for a process, diamond for a decision and arrows for flow. Every algorithm needs defined inputs, a defined output and a guarantee that it terminates.
Traps that appear in questions
- Abstraction is not decomposition: abstraction hides detail, decomposition divides the work.
- An algorithm is not a program. The algorithm is the logic; the program is that logic expressed in a language with correct syntax.
- A decision box has one entry and two exits, conventionally labelled Yes and No.
- Questions about reusability and reusable components usually point to generalisation rather than pattern recognition.
Rule of thumb
Before writing any steps, list the inputs, the processing and the outputs. Then hand-run your steps on a small example. If a step is vague such as 'add the prices', make it precise such as 'total = total + price'.