Hands-On Science Lab

Glossary โ€บ Coding

Coding glossary

6 words, each with a kids' explanation, a grown-up explanation, a one-minute thing to try and the mix-up people make most often.

Coding is a way of thinking before it's a screen activity. Sequences, loops, conditions and bugs can all be learned with cards, beads and paper grids. Children who meet these ideas unplugged find screen coding much easier later.

Algorithm

A set of step-by-step instructions to do something. A recipe is an algorithm. So is the route to school. Computers follow algorithms, one step at a time, exactly as written.

Try it: Write instructions for brushing teeth. Ask someone to follow them exactly, word for word.

Bug

A mistake in a program that makes it do the wrong thing. If your robot walks off the edge of the map, there's a bug. Finding and fixing it is called debugging.

Try it: Write a five-step program for walking to the door. Have someone follow it and find the bug.

Loop

An instruction to repeat something. Instead of writing 'step, step, step, step', you can write '4 ร— step'. That's a loop. Loops make programs shorter.

Try it: Write the chorus of a song once and add 'repeat 3 times'.

Condition

The 'if' part of a rule: something that's checked to see if it's true. 'If it's raining, take an umbrella.' The condition is 'it's raining'. If it's true, you take the umbrella. If not, you don't.

Try it: Play 'If I touch my nose, you clap. Else, you stomp.'

Variable (in coding)

A named box that holds a value which can change. In a game, 'lives' is a variable. It starts at 3, goes down when you're hit, and up when you find a heart.

Try it: Keep score in a family game on paper. The score is a variable.

Binary

A way of writing numbers using only 0 and 1. Computers only understand on and off, which we write as 1 and 0. Eight 1s and 0s together can stand for one letter.

Try it: Count to 7 in binary using three fingers: down = 0, up = 1.

Activities in Coding