Computational Thinking
Before we write any code, we must know how to think like a computer scientist. This involves three core pillars: Abstraction, Decomposition, and Algorithmic Thinking.
Abstraction
Definition: The process of removing unnecessary details or characteristics from a problem to focus strictly on the essential features required to solve it.
Real-World Example
A sat-nav map showing only the roads, speed limits, and junctions. It completely abstracts away details like trees, physical houses, and weather, because they aren't necessary for calculating the route.
Decomposition
Definition: Breaking down a complex problem into smaller, more manageable sub-problems. These smaller problems are easier to solve, test, and assign to different programmers.
Interactive Structure Diagram
Hover over nodes to trace the breakdown (top-down hierarchical tree).
-
Bank ATM System
-
Check PIN
- Input PIN
- Verify Details
-
Withdraw Cash
- Check Balance
- Dispense Notes
-
Print Receipt
-
Examiner's Eye - Avoid the Trap!
In the exam, when drawing a structure diagram, ensure you use a hierarchy (top-down tree shape). Do not draw arrows linking the bottom boxes to each other like a flowchart; it is not a sequence, it is a structural breakdown.
Algorithmic Thinking
Definition: A logical way of getting from the problem to the solution. If the steps you take to solve a problem follow a sequence and can be adapted to solve similar problems, you are using algorithmic thinking.
It's the bridge between having the sub-problems (from decomposition) and deciding exactly how to solve them step-by-step so a computer or human can follow them without ambiguity.
Check Your Understanding
1. A game developer removes realistic wind physics from a racing game to ensure it runs smoothly on mobile phones. What computational thinking technique is this?
2. Which visual tool is used specifically to demonstrate Decomposition?
Written Exam Scenario (AO2/AO3)
Stretch (Grade 9)"A cinema is building an automated ticket booth. Explain two ways the developer could use abstraction when creating the seat-booking algorithm." (4 marks)
1. Ignoring unnecessary details: The algorithm does not need to know the physical fabric colour of the cinema seats or whether they have cup holders. It only needs to know if the seat ID is 'booked' or 'available'.
2. Simplifying the layout: The developer can abstract the physical cinema hall by representing it simply as a 2D array (grid) of boolean values (True/False) in the code, rather than rendering 3D seats.