AdvertisementYour brand could be hereYour brand hereOn every Darslab page · students, parents and teachersinfo@darslab.comAsk for pricesPricesinfo@darslab.com
☰ Year plan · Computing

Debug it everywhere

Week 10 · 1.4 Spot the bug · 3 lessons
2

Bugs are everywhere

Computing 1: Topic 1.4, pp. 49–59
GoalSay that people find and fix errors in lots of jobs and that code may fail from another start.
New words
check · look carefully to find a mistaketest · try something to see if it works
Explanation

People debug all the time. We check our counting. We check a puzzle. We check our drawings. Finding a mistake is a clever thing to do. A robot code that works from one start may not work from another. Check the start too!

checkfixit works
Worked examples
12345
Ravi counts apples: 1, 2, 3, 5, 6. There are only five apples. He skipped the number 4. He counts again: 1, 2, 3, 4, 5. Bug fixed!
the piece
Ana does a jigsaw. One piece will not fit. It is in the wrong place. She tries it somewhere else, and now the picture is right.
The code F R F works from the bottom left facing up. Someone starts the robot from the bottom right instead, and now it goes off the grid! The bug is the start square, not the code.
Class activity

Bug hunt at home or school: find three places where someone checks or fixes a mistake: a teacher checking sums, a baker tasting a cake, a mechanic fixing a bike. Draw one of them. Say what the ‘bug’ was and how it was fixed.

Practice
1
Mia says there are 6 flowers, but there are 5. What might her bug be?
12345
2
Name one place where you check your work and fix a mistake.
3
The same code works from one start but not from another. What can you check?
4
Is it good to find a bug?