Traffic lights, a cake recipe, a bus-stop announcement: each one follows a fixed order of steps. What happens if one step is missing or in the wrong place?
Today we write precise step-by-step instructions, break one on purpose, find the bug, and fix it. Then we try the same thinking on a robot route on the board.
Keep this light. No materials out yet. Point at one everyday Irish example pupils know (traffic lights changing in order, a school-dinner queue, the PE warm-up sequence) and ask what would go wrong if a step vanished.
Key question: If the steps are wrong, does trying harder still get the right result? Steer them toward: no — the steps themselves must be right.
Link gently to inputs, processes and outputs from earlier work in this unit: an algorithm is the process that turns an input into an output.
Watch how I write steps for watering the classroom plant. Which details would you keep, and which would you leave out?
Those ordered steps are an algorithm. When a step is wrong or missing, that mistake is a bug. Finding the mistake, fixing it, and testing again is debugging.
Lead with the live plant model first. Name only algorithm and bug on the board at the start. Name debugging at the moment you fix the deliberate mistake. Treat abstraction as a light spoken phrase only ("keeping only what matters" / "crossing out the jumper detail") during the keep-or-leave-out talk — do not add it as a fourth word pupils must own on the board.
| Concept | Why it matters | Example |
|---|---|---|
| Algorithm — a clear, ordered list of steps that tells someone or a machine exactly how to finish a job | Machines and people only do what the steps say; vague steps give messy results | A recipe for soda bread works because the steps are in order and specific enough to follow |
| Abstraction — keeping only the details that matter for the job and leaving out the rest | Too much detail slows you down; too little leaves people guessing | For lining up, "stand behind the person in front" matters; the colour of your jumper does not |
| Bug — a mistake in the steps that makes the job go wrong or stop | The job fails even if everyone tries hard, because the instructions are wrong | A turn left that should have been turn right sends a robot past the goal |
| Debugging — finding the mistake, fixing it, and testing again until the job works | Coders and engineers improve work by hunting bugs, not by starting from scratch every time | Swap the wrong turn, run the route again, and check the robot reaches the goal |
Do this live before groups write their own. Prefer the real plant, watering can and tray from the materials list. If those are unavailable, write the steps on the board and mime each action with an empty cup over a tray — the missing-step bug still lands clearly.
Misconception to head off: pupils often think a bug means the person following the steps was careless. Stress that a careful person still fails if the algorithm is wrong. That is why we debug the steps, not blame the follower.
Nature of STEM: algorithms already run Irish daily life — traffic-light sequences, oven timers, and the order a bus-ticket machine follows when you tap a Leap card.
Look at the classroom task on the board. With your group, call out steps you would keep and steps you would leave out. Be ready to say why.
One shared card only for this talk. Display a single prompt card under the visualiser, on the IWB, or read it aloud. Groups do not hold their own cards yet. Talk for about two minutes, then take three or four contributions. Assign each group its own task card at the start of the next step.
Look-fors: pupils naming a detail that changes the result (order of letters, walking without running) versus a detail that does not (who goes first if the line is still straight, the colour of the tray).
Key questions: If we leave this out, does the job still work? If two groups wrote different steps, could both still be right? Yes — more than one clear algorithm can work.
Revoice the keep-or-leave-out idea in plain words: keep what changes the result, leave out what does not.
Quick class vote first: which change is most likely to make a job fail — a missing step, steps in the wrong order, or a wrong direction? (An extra step that does nothing is usually clutter, not a bug.)
Your group has one task card. Work through these jobs in order:
Print one set of the four task prompt cards (full texts in the previous step) and assign one card per group. Cut blank step strips or give each group 8–10 small cards and a pencil. Gather the physical props each card needs (see materials list): three class-library books for library-sort groups; plant, watering can and tray for plant-care groups; four empty or sealed paint pots and an art tray for pack-away-art groups. PE-line groups need clear floor space near the door only. Before groups start, pair them for the swap (neighbouring tables: A↔B, C↔D, and so on). If you have an odd number of groups, one trio swaps with a pair.
Fold the watchers in: when one group acts at the front, ask the class Where do you think the bug is? and What would you change? — watching is real participation.
Differentiation: support groups with a starter stem on the board: "First… Next… Then… Last…". Stretch groups write a second, shorter algorithm for the same job (stronger keep-only-what-matters thinking).
Common bugs pupils invent: steps in the wrong order, a missing move, "put the book anywhere", "run to the door". Celebrate precise fixes.
On your Investigation Journal page, record four short notes like the board example. Keep each note to one or two lines: your group's steps, the bug you found, the fix that worked, and one detail you left out on purpose.
Pupils record on paper only. Before they write, show a filled mini-example on the board so the amount of writing is obvious (do not invent journal box names — the page layout is generated later):
Circulate and prompt: Write the steps as commands, not a story. Name the bug in one line. What did you leave out, and why was that still fair?
If a group finished debugging early, they sketch a second shorter algorithm for the same task rather than starting a new topic.
Ask only for: the algorithm, the bug, the improvement, and one left-out detail.
You're previewing this lesson. Get full access to this lesson and hundreds more — each one ready to teach, with interactive activities, printable resources and pupil progress tracking built in.