Giving clear instructions

Computer Science · Early Years · The School

Order matters

Try telling someone how to put on their socks and shoes. Socks FIRST. Say it the other way and the shoes go on bare feet with socks on top — silly, but exactly what a computer would do. Computers never work out what you meant; they do what you said, in the order you said it.

Small steps

"Make a sandwich" is too big. "Take two slices of bread. Put butter on one slice…" is small enough to follow. Breaking a big job into small steps is what programmers do all day, and you can practise it with jam sandwiches long before you touch a keyboard.

Fixing it

When the instructions go wrong, do not start again — find the ONE step that was wrong and fix it. Was a step missing? In the wrong order? Too big? Finding the broken step is called debugging, and being calm about it is the most useful habit in computing.

A child gives instructions and an adult follows them with absolute literalness. "Put jam on the bread." — the adult puts the closed jar on top of the loaf. "Open the jam!" — the adult opens the jar and stops. "Get the jam out." — with fingers. It is funny, and it is exactly what a computer does. Rewrite the instructions until they work, and count how many steps were missing.

The School — all subjects · Knowledge map