Finding a Bug by Changing One Thing at a Time · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Fix bugs one change at a time

Computing · Computing Fundamentals · ages 12-13
Name ______________________   Date ____________
  1. You change one block. What do you do before you run the program?

    • Predict what happens next
    • Change three more blocks
    • Delete the prediction list
  2. What is the first step when a program draws the wrong shape?

    • Rewrite the whole program at once
    • Write down should versus is
    • Close the computer and walk away
  3. Changing five blocks at once finds the faulty block faster.

    Circle one:   True   False

  4. A screen stays black. A fixer raises brightness, cools the machine, and swaps the charger all at once, and the screen returns. What is the problem with this fix?

    • The screen is too bright now
    • The cause stays unknown
    • Fixing screens is impossible
  5. You predicted a bigger circle, but the run shows the same small one. What should you record?

    • Log the miss; block looks clear
    • That the computer is broken
    • Nothing, failed runs do not count
  6. After four single-change runs, the triangle finally appears. What should you do next?

    • The block and run that proved it
    • Change four more blocks to be safe
    • Hide the prediction list
  7. A program draws the wrong shape only on Fridays. A fixer plans one-change tests. What is the smartest first move?

    • Blame the calendar and stop testing
    • Rewrite the program on Thursday
    • State the gap, then study Fridays
  8. Two friends debug the same wrong shape. Ada changes one block per run with predictions. Ben rewrites everything until it works. Whose method finds the fault?

    • Ben, because rewriting always teaches more
    • Ada, whose runs pin down one block
    • Both equally, because both programs work now
LightMySky · lightmysky.comW1-mt_DMgajrUSy_-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Fix bugs one change at a time W1-mt_DMgajrUSy_-s1

  1. Predict what happens next · A written prediction turns the run into a test with a clear verdict.
  2. Write down should versus is · Naming the gap between should and is gives every later test a target.
  3. False · Many changes hide which one mattered, so the fault stays unknown.
  4. The cause stays unknown · Three changes in one go hide the true cause, so the fault is still a mystery.
  5. Log the miss; block looks clear · A wrong prediction still teaches: that block does not control the size.
  6. The block and run that proved it · The fix counts only when you can point at the change that proved the fault.
  7. State the gap, then study Fridays · A sharp should-versus-is plus the Friday clue aims the first single change well.
  8. Ada, whose runs pin down one block · Only single tested changes narrow a fault down to one block or line.
Worksheet · LightMySky