Computational thinking
| English | Chinese | Pinyin |
|---|---|---|
| computational thinking | 计算思维 | jì suàn sī wéi |
| abstraction | 抽象 | chōu xiàng |
| decomposition | 分解 | fēn jiě |
| pattern recognition | 模式识别 | mó shì shí bié |
Thinking like a computer scientist
- Computational thinking 计算思维 is the set of mental tools for analysing a problem and designing a solution a computer can run.
- Two of the most important are abstraction 抽象 and decomposition 分解.
- Master them and big problems become approachable.
Abstraction
- Abstraction means keeping the essential features of a problem and ignoring irrelevant detail, giving a simpler model.
- A train-network map keeps the stations and lines but drops real geography.
- A function hides a piece of work behind a name; a class keeps only the attributes the system needs.
- Without it, a full model of any real problem would be too big to reason about.

Abstraction keeps only the essential features of a problem and drops the irrelevant detail

Computational thinking breaks a big problem into smaller parts — like solving a jigsaw.
Abstraction means:
Abstraction simplifies a problem to its essentials. Breaking into parts is decomposition.
A train map that keeps the stations and lines but drops the real geography is an example of abstraction.
It keeps what matters (stations, connections) and discards the rest — exactly what abstraction does.
Decomposition
- Decomposition means breaking a large problem into smaller sub-problems, each easier to solve.
- Find the main parts → break each into sub-tasks → continue until each is small enough to code directly → solve and combine.
- "Manage stock" → "record sales", "record deliveries", "produce reports" → ("record sales") "look up product", "decrease stock count", "save transaction".
- It makes problems manageable, lets a team divide the work, and gives modular code.
Decomposition means:
Decomposition splits a big task into smaller, separately-solvable sub-tasks.
The four cornerstones
- Decomposition (break a problem up), pattern recognition 模式识别 (spot similarities).
- Abstraction (ignore irrelevant detail), and designing algorithms (step-by-step solutions).
- Decomposition breaks a problem into modules, each becoming a procedure or function.
Solving a problem the computational way
Step through the four cornerstones in the order you'd use them — break the problem down, spot what repeats, strip it to essentials, then write the steps.
Match each cornerstone of computational thinking to what it means.
The four cornerstones — decompose, spot patterns, abstract, then design the algorithm.
Put the computational-thinking steps in a sensible order.
Break it down, find what repeats, strip to essentials, then write the steps.
You've got it
- abstraction = keep the essentials, ignore irrelevant detail (a simpler model)
- decomposition = break a big problem into smaller sub-problems
- decomposition enables teamwork and modular code
- together they make complex problems solvable