The Life of a Debugger

You Need the Debugging Mindset to Make Progress

This past Sunday, I was in the process of preparing sourdough pizza. It has become a tradition on Sundays in my family to bake a pie from scratch for dinner. I love to eat pizza and I find preparing it to be a therapeutic way to finish the weekend and ready myself for the week ahead. The dough, a simple mixture of homemade sourdough starter, flour, salt, and water is proving on the counter under a plastic bag. I mixed the ingredients the previous morning to give time for the homegrown yeast to multiply and expand the dough.

Next to it are laid out twelve carefully sliced circles of fresh mozzarella cheese ready to be applied to the crust. Next to that sits a container of sun-dried tomatoes rehydrating in olive oil. And finally, there is a small pile of basil leaves from our window box garden, the closest we have been able to get to agriculture in our tiny NYC apartment. I scan the kitchen satisfied that everything is properly arranged for pizza making. I place the pizza stone on the middle rack of our oven and turn the knob to 525 degrees Fahrenheit the highest setting available.

When preparing food there is something satisfying about having everything laid out and not feeling rushed. I take a break in the living room, waiting for the oven to preheat. When I return about forty minutes later something feels off. The human brain has this strange ability to notice a discrepancy without being able to pinpoint it. I looked at the ingredients scrutinizing them to determine the problem. I instinctively placed my hand on the oven door and then suddenly realized the problem. The door of the oven was cold. I opened the oven door leaning my face over the opening where I should have felt the hot air quickly escaping and felt nothing. I even placed a finger on the baking stone and it was cold to the touch.

The oven was not working. This is when my debugging self kicked into gear. It can feel almost like a switch being thrown. My annoyance with the oven not working became an incredible curiosity about why it was not working especially since it worked every previous weekend for as long as I can remember. What could be behind this unusual state of affairs? I checked the knob, turned it off and on. Nothing happened. There was no smell of gas. There was nothing happening in the oven at all. The heating element is located below a thin blue removable steel oven floor. I turned everything off. Then I removed this blue cover and tried to make sense of the equipment in front of me. I realized that even though I had owned and used this oven for three years I had never explored exactly how it worked. That surprised me as I love to figure out how things work, but in this case, there had never before been a reason to question its function. When I did, I saw a U-shaped tube with tiny holes at the base of the oven. That must be where the gas comes out. Next to it was a small rectangular prism with a cylindrical grey element in the middle. It looked like an electrical heating element used to ignite the gas. I also saw what looked like a thermocouple which is an electrical way to measure temperature. Then I wondered why the gas was not coming out. It must be using the thermocouple to determine when the ignition element is hot. So until the ignition is hot it keeps the valve for the gas flow off. That is a very clever way to prevent me from accidentally filling our apartment with natural gas. Smart designs like that are exciting because the engineer who invented them solved a problem. In this case, it was the problem of a stove filling a room with combustible gas because of an ignition failure. As I started to make sense of the entire assembly I was getting excited. Unfortunately, this safety feature was going to prevent me from lighting the oven the way I did during my childhood, with a match. Well just as well since at this point if the gas was flowing the apartment would be full of it and a lit match could have created a small explosion. Actually natural gas is odorless and if it was not for the fact that they add a noxious smell to it there would probably be more explosions. So I suppose I would have smelled the gas and realized the problem earlier.

Then I had a wonderful idea. Our oven has another gas element at the top used for broiling. I immediately turned on the broiler and watched it closely. As I suspected a similar-looking ignition cylinder sitting right next to the gas tube got red hot. Then after about 15 seconds, you could hear a valve engage and gas flowed out of the broiler bar popping 16 bright blue tiny flames from the tube. I had developed a hypothesis about the oven and then was able to verify it. Using my troubleshooting skills I had figured out the exact nature of the problem, and now I knew what needed to be done. I could just swap out that ignition rectangle for a brand new one. It would be working once again.

The problem is where do you get one of those ignition elements. Worse than that the wires to the ignition element receded to the back of the oven. To perform this fix I would also need to rewire the element possibly requiring solder, a soldering iron, and other tools. Plus I would want to make sure I did not create any risk of an electrical fire in my kitchen. So instead of delving deeper into the issue, I decided to call the appliance repair company.

Alternatively, with a bit more time on my hands, I possibly could have fixed it myself, exploring how the ignition mechanism works and what materials are involved. I could have even built my own ignition element finding material with the appropriate resistance value. Instead, I decided to let this inquiry go for the moment and focus instead on how to bake a pizza using only the broiler.

In my non-pizza-making life, I teach computer science classes to high school students. One of the most important skills of being a computer programmer is called debugging. This is a term that draws from the history of computing. In 1947 Grace Hopper found what is considered the first computer “bug.” There was a moth flying around the hardware causing short circuits I suppose and interfering with the proper running of the computer. The term stuck and now when a computer program does not produce the expected results we still call it a bug. In the process of gaining expertise in programming, you will inevitably face significant bugs at various points that are challenging to resolve. How you face these moments will define you as a programmer. Luckily debugging is a skill that can be learned.

As a computer science teacher, I spend many classes talking about the art of debugging. We look closely at our code. We learn to read what the computer tells us through its text output and other less obvious clues. We also learn to manage our emotions as frustration levels can sometimes rise. Ultimately debugging is a type of meditation that involves active listening, staying calm, and being curious about what is going on.

I shared the pizza story because I think it shows a bit of the thinking and temperament of the debugging process. As I reflect on this I am realizing that debugging is not unique to the computer programmer. Lately, I have been reading the book Zen and the Art of Motor Cycle Maintenance by Robert M. Pirsig. Pirsig describes the temperament of what he considers proper motorcycle repair. It involves knowledge and patience. It is as much about a way to approach life as it is about finding out what is wrong with the bike. I would say that what is described in the book as motorcycle repair is in fact a form of debugging. I think debugging could be a good way to approach learning in general. There are many times when you try to learn something or just do something that you need the debugging mindset to make progress. The development of such a mindset is what great learning is all about.

When I think about innovation in education I want to guide students to develop key mindsets such as the debugging mindset that I describe above. Mindsets involve knowledge, attitudes, curiosity, and motivation. These are the qualities that I am trying to instill in my students, whether they plan to continue coding in the future or not. Mindsets are the key to becoming a lifelong learner. I shared the story about debugging the pizza oven because it got me excited about learning and discovering. I also think that the mindset of debugging that I brought to that experience has often allowed me to be successful in different parts of my life.

I forgot to photograph the described pizza so this is a different one that I made.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Greg Benedis-Grab

Greg Benedis-Grab

exploring the intersection of coding, education and disciplinary knowledge