How to think about programming
What decided how far I got — and it was not the language I picked.
The question I asked wrong
The first thing I asked when I started was: "which language should I learn first?"
I spent weeks reading language comparisons. Looking back, those weeks were close to worthless.
The better question is: how do I break a big task into steps small enough for a machine to follow?
A language is only the notation for writing those steps down. Switch languages and the notation changes; the hard part stays exactly where it was.
The three things that mattered most
1. Breaking problems down. Turning a vague request into concrete steps. This is the skill I spent the longest practising and the one I use the most.
2. Reading other people's code. I used to think programming was mostly writing. In practice I read far more than I write — my colleagues' code, library code, and my own code from three months ago.
3. Debugging with a method. Early on I fixed bugs by guessing and changing things at random. Later I learned to narrow the search: work out what is definitely correct, what is definitely wrong, and squeeze the suspect region until it is small.
The exercise I keep recommending
Take something you do every day — making a cup of coffee, say — and write out the steps in enough detail that someone who has never done it could follow along.
You will notice how many obvious steps you skipped. A computer reacts exactly like that stranger.
Progress is kept in your browser and sent nowhere.
Read next
English
How I taught myself English
The whole route I took, start to finish.
⏱ About 4 min read
English
The first 30 days
Exactly what I did in the first month, week by week.
⏱ About 3 min read
English
Measuring level and progress
How I know where I am without sitting an exam, and why I stopped trusting how it feels.
⏱ About 5 min read
Programming
Introduction
Why I opened this section, and what will go into it.
⏱ About 2 min read