Skip to Content

Debugging Strategies and Spiral Debug-It Challenge

« Creative Computing 2012
No replies
Michelle Choi
Member

Here are some of the debugging strategies shared by participants during the Debug-It activity at the Creative Computing 2012 workshop.

  • build the debug it challenge in Scratch and try it out
  • break the program into smaller, manageable pieces
  • modularize the program (ie: create a separate "when green flag clicked" script for different actions within a sprite)
  • pull the blocks apart to see what each one does
  • turn on "single-stepping" (found under the "Edit" menu)
  • test the program out first to identify the problem
  • read the scripts out loud (ie: to differentiate block functionality such as "play sound" and "play sound until done")
  • check if there is a white highlight around the script to indicate it is running
  • create markers along the program using a "say" block or by inserting a sound to signal that a certain part of the program has been reached

At the end of the activity, participants were challenged to create a debug challenge of their own. One group volunteered their debug it challenge entitled "Spiral" for the rest of the participants to solve as a group. The challenge was:

  • The student wanted to create a program where a pencil is drawing a spiraling square, but the pencil is only drawing a square over and over. What's going wrong?
  • Download the Spiral project at http://scratch.mit.edu/projects/axamo/2723226
  • Once the group debugged the Spiral challenge, they then brainstormed follow-up challenges: Can you make the pencil draw a spiraling circle instead of a square? How about a spiraling hexagon shape? Can you think of other patterns?