Computational Thinking
Computational thinking is a set of techniques for tackling a problem in a structured way, so you can produce a solution clear enough for a person or a machine to follow. It does not mean thinking like a computer: the same approach helps when you are the one following the plan, such as organising a school fundraiser.
There are three principles, and they work as a set. Each one does a different job on the problem.
| Principle | What it does to the problem |
|---|---|
| Abstraction | Keeps the details the solution needs and ignores the rest |
| Decomposition | Splits the problem into smaller parts that can each be solved |
| Algorithmic thinking | Works out the precise steps of the solution and the order they go in |
The three are used together to define a problem and then to refine the solution. Defining means pinning down exactly what has to be solved; refining means improving the solution once you can see how it would work in practice.
Suppose you are writing a program that works out what each pupil owes for a school camping trip. You start by deciding which details actually affect the answer, then deal with each part separately, then set out the steps in order: read the number of nights, multiply by the cost per night, add any extras, display the price.
Going through the steps in order often shows up a gap. Here you notice a one-off deposit is charged per pupil, so you go back, keep that extra detail and split the pricing part again into the nights and the deposit. A programmer may move between the three principles several times while working on the same problem, which is why they are described as a set of techniques rather than three separate stages that are each finished once.
OCR GCSE Computer Science · Computational Thinking