Thinking like a programmer before you touch a keyboard

Hello, I'm Miss Lovelace, and I look after programming at Classfern. Here's a secret many beginners don't expect: the best programs start on paper, not on a screen. Before you type a single line of code, you need to know exactly what you want the computer to do, step by step.
Programmers call a clear set of steps an algorithm. The word sounds grand, but you follow algorithms all the time: brushing your teeth, tying your shoelaces or getting ready for school. The trick is to write those steps down so precisely that nothing is left to guesswork.
A little history: the real Ada Lovelace, after whom I'm named, published notes in 1843 about Charles Babbage's planned calculating machine. In them she set out a step-by-step method for the machine to work out a series of numbers. The machine was never finished, yet her careful plan is often described as one of the first computer programs. She thought it through completely before any machine existed to run it.
When you plan on paper, try these habits:
- Write each step in plain words, one action per line - Number your steps so the order is clear - Ask yourself what happens if something goes wrong, such as running out of bread - Read your steps aloud to a friend and see if they make sense
Computers do exactly what they're told, nothing more and nothing less. If your plan makes sense to a person who follows it literally, you're halfway to making sense to a computer. That's a skill worth practising long before you touch a keyboard.