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?
-
How to Break a Problem Down: A Guide to Decomposition in Computational Thinking
-
How to Recognize Patterns: A Guide for Putting the Fun in Functions
-
How to Form Abstractions: A Guide for Getting Abstract with Computational Thinking
If you want to learn how to apply these concepts, give yourself an A. Grab your copy of A is for Algorithms.