← Back to course
Code Crew G3 / Week 06 / Friday
5/6
Week 06 Β· Debugging

Friday

// Finding the broken step

Friday: Mini-Project

Rocket has a game idea. "I hide a bug in my steps, and you find it!" he says. He writes steps for a glass of water. Then he mixes up one step on purpose.

Raven reads carefully. "What do you notice? You drink the water before you pour it!" Rocket cheers. "You found it!"

Nova says, "Now it is your turn to plant a bug." Let's help them play the bug game.

Plant the Bug

Write a 5-step recipe for making a glass of water. PLANT a bug on purpose.

Then trade with a partner and find each other's bug.

1. _______________________________________________
2. _______________________________________________
3. _______________________________________________
4. _______________________________________________
5. _______________________________________________
My partner's bug was step ____.

Reflection

Bug Swap Check

TRADING BUGS
  • Read the question.
  • Tap your answer.
Raven planted a bug by swapping two steps. What kind of bug is that?
Rocket left out the step get a cup. What kind of bug is that?
What is a kind way to share a bug you found?
Why do programmers trade code to find bugs?
Goal: count by twos. Code: say 2, say 4, say 6, say 9. Which number is the bug?
What should that number be?
What kind of bug is it: wrong, missing or order?
StatementTrue or false?
A partner can help you find a bug you missed.?
Planting a bug on purpose is good practice.?
A good fix makes the program match the goal.?
You should never test a program after a fix.?
WHY THIS EXERCISEDebugging together can help.

Quick Check

ROCKET'S WATER STEPS HAVE A BUG. FIX THE ORDER.
  • ?Drink the water
  • ?Pour water into the glass
  • ?Wash the empty glass
  • ?Get a glass
WHY THIS EXERCISEDebugging means checking that each step comes after what it needs. Programmers test steps in order to find the bug.
← Thursday