Friday, January 10, 2020

How Do Teachers Without CS Experience Debug Student Code

My Programming Honors students are wrapping up their semester projects today. Actually they should all have been handed in by now but I’ll give them until the end of the day. In any case, my students have come up with some interesting and difficult to solve bugs. One involved a png file that had an unexpected transparent  section. The other was more confusing and I’m not sure I could have solved it without a good bit of CS knowledge. Even then it was not obvious. (Long story short – passing addresses can be tricky )

I wonder how less experienced teachers handle the really hard debugging tasks. I’ve been writing code since 1972 and teaching beginners for about 15 years. I have seem a lot of errors. A LOT! Often I can debug code without even looking at it. Some errors are that common. And of course I have developed a lot of ideas about debugging. The debugger in Visual Studio is very familiar to me as is how to use it to narrow things down. Students are very good at finding new ways to mess things up though.

I saw a Facebook post from a teacher who has been assigned to teach AP CS A but who has no coding or CS experience. No, really, I’m not making this up. How in the world will they be able to help debug code? And forget about teaching/modeling debugging practices.

Over the years I have had a number of teachers ask me to help with debugging student code. I saw a very interesting recursion problem once. Doing a stack trace was key to that one.

Debugging may be the single biggest reason to say that one week crash courses are not enough for professional development of new CS teachers. A full semester course would be a good start but without experience a new teacher is going to be just barely staying ahead of their students.

But how to you teach debugging? Have you ever had a course or even just a class on debugging? I haven’t.  How would such a course run? Anyone know of a syllabus for a course like that?  I’ll have to think about that one. In the long run though they is no substitute for experience.

2 comments:

Chris Okasaki said...

About 25-30 years ago, Jon Bentley taught a course in debugging where the textbook was "The Medical Detectives" by Berton Roueche, even though that book has nothing to do with programming. I think it was more about cultivating the appropriate mindset.

More recently, I thought about teaching debugging using the game of Zendo, but I've never tried to do that in an actual classroom.

Garth said...

One week summer PDs are totally useless to beginning CS teachers. I have attended several with beginning teachers in the class. They come out totally confused as how to actually teach CS/programming. Yes, they learn a little coding and how to try to teach from a cookbook curriculum but unless things go perfectly they are lost. In the programming classes I teach things rarely go perfectly. I like attending these PDs because I get ideas on how to improve my teaching technique and I meet people with ideas. It has taken me years to get half way decent at teaching programming, why anyone would think a one week PD is justified for a starting teacher is beyond me. Some would argue it is better than nothing but I would disagree. It is probably enough to really confuse students.

Debugging to me is the hardest skill to teach. It requires a logical thinking process that many are simply not mentally mature enough to execute.