Teaching debugging and confidence to those new to programming

Alice Bradley, Geosciences, Williams College

I have not yet taught computation online (though I am starting to this coming week). I am quite fortunate to be at Williams College, and teaching upper-level students who are highly motivated and very bright. That said, based on my in person teaching of similar courses over the past two years, I anticipate the following challenges:

Lack of confidence: our students have often been the best in their class. When they get to College and find (sometimes for the first time) that they are asked to do things they don't already know how to do, they sometimes do not know how to respond. Rather than trying something, they will ask for help at every step of the way. With continual hand-holding, students don't learn to solve problems independently and are often paralyzed when they come to a point of needing to figure out what to do next. I anticipate this being an even larger problem online, where the barrier to asking for help is steeper and students may feel more isolated.

In response, I have changed our weekly three-hour lab block into two two-hour blocks, and students are in smaller groups (~6) for that lab period, with typically four meetings per climate modeling project. Students are encouraged to work with their fellow lab section members throughout the week on the climate modeling projects, so that we can make good use of the time spent together (on Zoom). The hope is that by having more frequent sessions, students are encouraged to try to make more progress on their own between lab sessions since they know they will be able to get their questions answered relatively soon. At the same time, students will need to work independently outside of the sessions in order to get everything finished.

Debugging challenges: The students I have worked with so far have had a particularly difficult time with debugging code. Some of this comes from being new to programming, being unfamiliar with the syntax, and largely just not having practice. With in-person labs, I've been able to look at their code, read through, and suggest places where they might want to start looking for problems (e.g., see what variable 'air_temp' has after you calculate the next time step. Does that make sense?).

With the online teaching mode, I expect to do some of that same debugging help, but I am adding two things: Since the lab sections will be on zoom, debugging screen share will be for the full group to see. I am building in a lot of practice with this from the beginning to make it a positive experience for everyone in the group, with clear expectations and norm-setting for how students talk about each others' code. The hope is that by group debugging everything, we will give students lots of extra practice with finding and addressing issues in the code and that they will then be able to apply these skills on their own. The second approach is in teaching Rubber Duck debugging as a strategy (where you explain line by line to your rubber duck, who can often help you find errors in code). Students who are in the US have been outfitted with a rubber ducky for this purpose. My hope here is that students will practice systematically checking their code using this approach.

Downloadable version of this essay

Essay: teaching debugging and confidence (Acrobat (PDF) 23kB Sep18 20)