Computational thinking: four moves
Computer Science · Key Stage 3 · The School
The four moves
DECOMPOSITION: break the problem into parts. PATTERN RECOGNITION: notice parts that are the same. ABSTRACTION: ignore what does not matter. ALGORITHM: write the steps. These four are what computer scientists mean by "thinking computationally", and they apply far outside computing.
Abstraction is deliberate ignoring
A tube map ignores real distances, road layout and geography, keeping only stations and connections — because that is all a traveller needs. That deliberate ignoring is abstraction. A model that included everything would be as complicated as the world and just as hard to use.
Working an example
Problem: a program to mark a quiz. Decompose: read answers, compare to the key, count, report. Pattern: comparing is the same for every question. Abstraction: the SUBJECT of the questions does not matter, only right or wrong. Algorithm: for each answer, compare, add to score, then print. The four moves turned a vague task into code you could write.
Problem: get 30 children through a lunch queue faster. DECOMPOSE: choosing, paying, collecting, sitting. PATTERN: the queue always stalls at paying. ABSTRACT: ignore what the food is, the colour of the trays and who is friends with whom — only the timing of each stage matters. ALGORITHM: pre-pay at registration, split into two collection points, stagger arrival by class. Four moves, one workable answer.