Thursday, September 22, 2016

Bug Reports

I saw the following tweet earlier today.  Still earlier in the day I read a post on Mark Guzdial’s blog about Barriers to Stack Overflow Use for Females which had me thinking about how people ask for help on Stack Overflow.

What is the connection? Well it seems to me that one source of frustration and negativity on Stack Overflow is related to people not reporting bugs well. In general beginners do a poor job of reporting bugs. Experts, like those on Stack Overflow, often lack patience with poor bug reports.  Teachers don’t have the option to be impatient though. It is our job to work with students to help them understand. That means helping them learn to report bugs.

A student will often start by reporting “my program doesn’t work.” Somehow they think that is enough information. Of course it is not. The definition of a program not working is a broad one. “Why doesn’t your program work? Because you have done something wrong.” Two completely accurate statements without a trace of enlightenment in them.

Often I mind myself asking “What does ‘doesn’t work’ mean?” The process of analysis and developing an understanding of the basic problem has to be taught. Students don’t always know how to describe the problem.  It is as if they stop thinking when something unexpected happens. Part of teaching has to be to help students look for and acquire more information about the problems they are seeing.

Another problem is a lack of vocabulary. What is a stack overflow anyway? Sure an experienced person knows but the student decides that maybe he can have his function call itself soon discovers that “something bad happens” even if he doesn’t understand why it happened.

One of the things I have to get students to share when they have troubles is what problem are they drying to solve. What they think is the solution my be breaking because it really isn’t a good way (or a way at all) to do what they need. Explaining the problem they are hoping to solve often leads directly to understanding what is really going wrong with a project.

Student’s usually want and sometimes need hints (Would You Like a Hint? ) but we have to help them learn how to report/explain their issues first. If not we’re not really helping them learn at all. We’d just be giving answers away.

1 comment:

Garth said...

I look through the textbooks and resources I use and it is amazing how limited they are in teaching how to chase down bugs. The simple technique of putting some extra Print statements in the code to follow variables is often over looked. The idea of writing a little code then testing instead of typing for 15 minutes then testing is never, ever discussed. Teaching perfect coding is easy. Teaching how to chase down a simple typo or a logic error in an algorithm is not. In my class lectures I deliberately make errors and have the kids observe the effect of those errors in the editor and in the output.