First programs in blocks

Computer Science · Key Stage 1 · The School

Blocks are instructions

In a block editor each block is one instruction: move 10 steps, turn 15 degrees, say "hello". Snap them together top to bottom and the computer follows them in order. Nothing is hidden — the program IS what you can see, which is why blocks are how everyone should start.

Repeat instead of copying

To draw a square: move, turn, move, turn, move, turn, move, turn. That is eight blocks — or two inside a REPEAT 4 block. Repeating is shorter, easier to change (make it repeat 3 for a triangle), and harder to get wrong. Whenever you find yourself copying blocks, reach for repeat.

Predict, then run

Before you press go, say out loud what you think will happen. If you are right, you understand your program. If you are wrong, you have learned something exactly at the moment you are most interested. Predicting first turns running the program into an experiment instead of a lottery.

Make a sprite move ten steps, ten times, by dragging ten 'move' blocks in a row. It works. Now delete them and use one 'repeat 10' block with a single 'move' inside. It does the same thing. Now change it to twenty steps: with the loop you edit ONE number; with the ten blocks you edit ten, and if you miss one nothing tells you. That is why loops exist.

The School — all subjects · Knowledge map