The Superlative Guide to Computational Thinking

May 05, 2023

 Menger sponge

How do you think like a programmer?

If programming is problem solving, we need one or more heuristics specific to this domain.

And we’re in luck!

There’s a set of methods used for defining and solving a problem in terms that a computer could also perform. It’s called, you’ll never guess…

Computational Thinking

The four stages of computational thinking are:

  • Decomposition

  • Generalization

  • Abstraction

  • Algorithm

If composing a function is the process of assembling the various components, such as variables, control flow, and conditions, then decomposition is the opposite: it’s breaking a problem down into smaller parts.

When we break a problem down into smaller pieces, we will often recognize patterns. Another way of saying this is that we generalize by inferring from specific cases to make broad statements.

Once we recognize patterns, we can remove the details, or form abstractions, in order to focus on the relationships between concepts.

Finally, we simply need to write a series of repeatable steps to solve our problem, otherwise known as an algorithm.

So how do we put these into practice?

If you want to learn how to apply these concepts, give yourself an A. Grab your copy of A is for Algorithms.


Profile picture

Want to level up your problem solving skills? I write a bi-weekly newsletter about programming, problem solving and lifelong learning. Join now