Debugging: Meta-cognition and explicit teaching of strategies

The 2007 SIGCSE paper “Debugging: The Good, the Bad, and the Quirky – a Qualitative Analysis of Novices’ Strategies” by Murphy, Lewandowski, McCauley, Simen, Thomas and Zander lists debugging strategies and reports a study of 21 students to observe and categorize their debugging behavior.  To quote from the authors’ conclusion:

Many unproductive activities appeared to stem from insufficient meta-cognition. Some students did not recognize when they were stuck, thus they did not know to try a different approach. Those who stubbornly traced in their heads often did not realize they were suffering from cognitive overload and might be more productive if they tracked on paper or via print statements. Others were blind to alternative bug sources. Debugging instruction should incorporate these meta-cognitive factors, perhaps taking the form of self-questions: “What else could I try?’, “Is this too much to keep track of in my head?”, and “What are other possible sources of the bug?”

Explicit teaching of processes for students to reflect on their own learning and disciplinary experiences is suggested, as it is from a lot of other research literature. We add here that we should experiment with exposing students to research literature itself such as the above cited paper.

  • Students will relate to experiences of people just like themselves in current and immediately anticipated situations.  The students in the study were taking a CS2 course.
  • Particular components of debugging, as itself a component of programming, are identified:

    “Debugging is difficult for novice programmers. Similar to new drivers who must learn to steer, accelerate, brake, etc. all at once, novice debuggers must apply many new skills simultaneously. They must understand the operation of the intended program and the execution of the actual (buggy) program; have general programming expertise and an understanding of the programming  language; comprehend the application domain; and have knowledge of bugs and debugging methods [2]. Unfortunately, most novices’ knowledge of these skills is fragile at best [12], causing many to find debugging difficult and frustrating.”

  • Particular practices and tools are introduced: “Gain domain knowledge, Isolating the problem. Tracing, including: Mental, Print & Debugger, Pattern matching, Consider alternatives, Testing, Environmental, Understanding code, Work around problem, Using resources, Just in Case, Using Tools, Tinkering”
  • More importantly, results and examples of critical evaluation are demonstrated.
  • Such material will foster respect and interest in attitudes and interests of academic research.
Advertisements
Post a comment or leave a trackback: Trackback URL.

Comments

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: