Computational Thinking: Decomposition, Patterns and Abstraction
Computational thinking is a way of solving problems that a computer, or a person, can follow.
Decomposition
Decomposition means breaking a big problem into smaller, easier parts.
Making a game could be broken into: design the characters, make the characters move, add a score, and add sounds.
Pattern Recognition
Pattern recognition is spotting things that are similar or repeat. If every level of a game uses the same rules, you can write them once and reuse them.
Abstraction
Abstraction means ignoring details you do not need and focusing on what matters.
The London Underground map is a good example. It does not show the exact shape of the tracks or real distances between stations. It only shows the stations and how they connect, which is all a traveller needs.
Algorithms
An algorithm is a precise set of steps. We can write one as:
- Written steps
- Pseudocode, which is structured steps in plain language
- A flowchart, which shows the steps as shapes joined by arrows
Flowchart Shapes
| Shape | Meaning |
|---|---|
| Rounded rectangle or oval | Start or end |
| Rectangle | an action or process |
| Diamond | a decision (yes or no) |
| Arrow | the direction to follow |
Example: Crossing a Road
Start → Is it safe to cross? (diamond) → If No, wait and check again. If Yes, cross → End.
Curriculum link: National Curriculum in England: Computing programmes of study (DfE) — Aims (abstraction, logic, algorithms); Key Stage 2: design, write and debug programs that accomplish specific goals, including by breaking problems into smaller parts