By Jennifer Walker
I first encountered rubber duck debugging while attending Codeup. Each student had a duck at their seat on the first day of our 18 ½ week advanced full stack web development boot camp. The expression of each duck varied, but they all stared quietly and blankly at us as we took in our surroundings with excitement and anticipation. At the time, I had no idea what it was for or why we needed that bath time friend. Now I do.
Part of what I love about programming is the problem-solving. However, in the attempt to figure out a software solution the developer very often can get tunnel vision – stuck on solving a problem the same wrong way or just get stumped with no real direction. This is where rubber duck debugging is the most useful. It originated from a book called “The Pragmatic Programmer” by Andrew Hunt and David Thomas.
Rubber duck debugging is simple. It includes taking the problem you are trying to solve and explaining it out loud to the rubber duck. This may seem silly because most of us have not talked to inanimate objects since we were kids. However, by doing this it forces a developer to think in a different way and to look at an issue under a microscope. Talking out loud activates a different part of the human brain, which very often helps the developer solve a problem without ever talking to another person. It keeps us from wasting our own time and the time of others when the solution is right at our fingertips.
I have experienced this phenomenon myself when I try to explain aspects of programming to people who are not programmers. It forces me to think of programming in a different way. I have to lose the acronyms, and just speak plain English to a person who isn’t such an avid techie like myself. When I do that I walk away with new knowledge and a refreshed passion for what I have been discussing.
I also learned later that the rubber duck is the official mascot for Codeup. His name is Codey and he has a special meaning to me beyond just rubber duck debugging. I began to sketch him on the first day of class. Over time he began to express my struggles and triumphs while learning to code. He came alive for me and became a student of Codeup alongside me during my time there. If I had a bad day, he totally understood because he was in the fire with me. If I struggled to understand a concept, he got that too and listened while I talked to him about what I was trying to do. Now, as a proud graduate of Codeup working as a software developer at a fantastic company, I keep Codey with me. He is in my car and at my desk at work. He also sits on my desk at home – waiting patiently to hear my struggles and what I am trying to solve for that day.
If you do not have a rubber duck for debugging, I suggest you go out and get one!