How do you think like a programmer?
If programming is problem solving, we need one or more heuristics specific to this domain.
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:
- Pattern recognition
- Algorithm design
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.
This is both the easiest and the hardest step in the process because sometimes the component parts of a problem are obvious, but other times the component parts are emergent, or intertwined, and it’s difficult to cleanly separate them.
When we break a problem down into smaller pieces, we will often recognize patterns. Another way of saying this is that we generalize. We make a broad statement by inferring from specific cases.
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.
How do you put these into practice?
Learn how in A is for Algorithms!
We'll break down and reveal the patterns in the 26 algorithms every programmer needs to know, including the following:
- Greatest common divisor
- Decimal conversion
- The Sieve of Eratosthenes, or generating prime numbers
- Longest increasing subsequence
- Merge Sort
- Quick Sort
- Binary Search
Give yourself an A! Grab your copy of A is for Algorithms today!
The 26 building blocks every programmer needs to learn in .pdf format.