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

Crew Quest

// Finding the broken step

Crew Quest: Bug Diary

Raven keeps a notebook called a bug diary. "Every bug teaches me something," she says.

Today Rocket opened his paint before he put down paper. Paint dripped on the table. "Oops," Rocket says. "Should I write that down?"

Raven nods. "Write what you tried, the bug, and the fix." Nova says, "Great discovery! Bugs are clues." Let's help them start a bug diary today.

Catch yourself making a mistake today. Don't be sad; write it down.

Our crew KEEPS A BUG DIARY because every bug teaches something.

TimeWhat I triedBugFix

Best bug of the day

Crew Brag Box
Trade bug diaries with a friend. Did you have the same bug? Share fixes.
β˜… Earn a star for catching a bug BEFORE it caused trouble.

Week 6 Recap

  1. BUG = a mistake in your steps.
  2. DEBUG = find it and fix it.
  3. TRACE the code one line at a time to find bugs.
  4. Bugs are not failures; they are part of programming.
Try This Without Paper
1. Read a recipe out loud and skip ONE step. Does it still work?
2. Watch a sibling tie a shoe. Notice the order. Would skipping cause a bug?
3. Catch yourself in a 'bug' today: a step you did out of order.
β—‡ BUG HUNT RELAY
One person writes five steps for a simple job, with one hidden bug.
The other person acts out the steps exactly.
When something goes wrong, stop and name the bug.
Fix it together, then swap jobs.
WEEK 6 REVIEW
  • Read the question.
  • Tap your answer.
What is debugging?
What is tracing?
x = 1. REPEAT 2 TIMES: x = x + 4. What is x?
Which of these is a bug?
StatementTrue or false?
A bug diary helps you learn from mistakes.?
Mistakes are part of learning to code.?
Bugs only happen to beginners.?
Test, find, fix, test again is a good plan.?
WHY THIS EXERCISEEvery bug you fix makes you a stronger programmer.

Coming up next…

Week 7: ALGORITHMS. The BEST way to solve a problem.

← Friday