Computing · Stage 6

Test & Debug Systematically

Programs & Judgement · test and debug · find and fix bugs with a method — reproduce, locate, fix, then test it works

✦ Computing📘 Stage 6 · S6⏱ ~14 min🧒 Ages 10–12★ Free to start
I can find and fix bugs with a method.
Kavi the owl for Computing
📖

Kavi Stops Guessing

Kavi's quiz game should have scored 3 out of 3 — but it showed 2. His first wing wanted to change ten lines at once and hope. "That is how you make more bugs," he caught himself. So Kavi used a method instead. First he reproduced it — ran the quiz again and watched the wrong 2 appear. Then he located the bug — he traced the loop, one step at a time, until he found the single line that added too few points. He fixed just that one line — nothing else. Finally he tested it — ran it again and saw a proud 3. "Reproduce, locate, fix, test," Kavi hooted. "A bug hunter with a method beats a guesser every time."

🎓

What your child will learn

1Debugging is a method, not a guessWhen a program misbehaves, good coders don't change things at random — they follow a method with four moves. Tap each one to hear its job.
2Run the debug method in orderHere is the whole method as a plan. It reproduces the bug once, then loops: locate one bug, fix one step, test — again and again until the program works. Press ▶ Run.
3Sort the smart moves from the sloppy ones
4Compare what you expected with what happenedThe fastest way to LOCATE a bug is to trace the program and compare the result with what you expected. Read each one, predict, then reveal.
🔍

A peek inside

Kavi's quiz should score 3 out of 3 but it shows 2. What is the FIRST thing Kavi does — before touching any code?
you can't fix what you can't see — run it again and watch the wrong score appear

Try this at home: A mistake that makes a program do the wrong thing is called a ____.

Ready to play and learn?

Start the free interactive lesson, or print the handout for screen-free play.

Part of Computing · Stage 6 · S6 on KAVI Academy — a secular, whole-child learning platform for ages 5–12.