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

Debug together

Week 15 · Unit 6: Be a designer · 3 lessons
2

Debug together

Computing 2: Unit 6, pp. 80–91
GoalExplain why it helps to debug with a partner and how to be a good partner.
New words
partner · a person you work withtest · to run a program to see if it workskind · friendly and helpful
Explanation

A partner can spot what you miss. Partners can find bugs faster. One partner reads the algorithm aloud. The other partner points to each block. Partners can also share what they know. We are kind: we say “I think this block is different”, not “you are wrong”.

read aloudpoint to each blockbe kindtest again
Worked examples
534Bye!
Farida and Ravi debug together. The algorithm says: start on flag, right 5, hop 2, left 5, say “Bye!”, end. The program has two bugs. Farida finds one and Ravi finds the other.
PartnerBug foundFix
Faridastep 3: hop 3hop 2
Ravistep 4: left 4left 5
Farida noticed that hop 3 should be hop 2. Ravi noticed that left 4 should be left 5. Alone, each of them might have found only one bug.
525Bye!
The fixed program. They run it to test it. The character goes right 5, hops 2, comes back left 5 and says Bye!.
Class activity

Debug in threes: sit in groups of three. One child reads an algorithm aloud. The second child lays out block cards that have two mistakes. The third child is the timekeeper and counts claps until both bugs are found. Then swap jobs with a new algorithm. Next, try to find the bugs of a new program alone and count again. Was it quicker with partners? Why?

Practice
1
Give two reasons why debugging with a partner is a good idea.
2
The algorithm says: start on green flag, right 3, up 2, say “Yes!”, end. Find the bug in the program.
33Yes!
3
Which sentence is kinder? A: “You made a mistake again.” B: “I think step 3 is different from the algorithm. Shall we check?”
4
The algorithm has 5 steps. Farida finds a bug at step 2 and Ravi finds a bug at step 5. How many bugs did they find together?
StepBug?
1
2Farida found one
3
4
5Ravi found one