0

Find the bug

  1. What is a bug?

    A bug is a mistake in a program. Everyone makes bugs, even grown up coders. Good coders hunt for them.

  2. move right
    move up

    Run it and watch

    Press Run and watch the robot. It should reach the star. It goes up instead and misses it. Something is wrong.

  3. move right
    move up

    Check one block at a time

    Point to each block as the robot moves. The first block is good. The second block turns the wrong way. That block is the bug.

  4. move right
    move right
    move right

    Too many blocks

    Some bugs are extra blocks. Here the robot walks right past the flag. One move too many is a bug too.

    1. 1Put on shoes
      step 1
    2. 2Put on socks
      step 2, bug

    Bugs at home

    Shoes first, then socks? That order is a bug. Steps in the wrong order are a mistake too.

For parents

Goal: Your child learns that a bug is a mistake in a program, and finds it by watching the robot and checking one block at a time.

  • Say that bugs are normal. Real coders find and fix bugs every day.
  • Ask: where did the robot first go the wrong way? Which block was running then?
  • Have your child point to each block and say good or bug.

Away from the screen: Read out a routine with one silly step, like put on pajamas, eat breakfast, get in bed. Your child shouts bug when they hear the mistake. Then let them make one for you.

Coding · Bugs
Back to top