On my desk at work sits a collection of rubber ducks. They come in a variety of colors, shapes, and sizes. People visiting my desk rarely ask about my rubber ducks. They assume it’s just a programmer being weird. And they’re partly right. I am weird. But there is more to my rubber ducks than my visitors might know. Behind the rubber duck is a story, a tradition really, that has been a part of programming culture for over 20 years. And I suspect I may be the last ‘new programmer’ to have practiced it.
In 1999, a book titled The Pragmatic Programmer was published. I’ve never read it. But this book introduced and popularized many concepts which I later learned in school and at work. Some of these concepts programmers may recognize; DRY (don’t repeat yourself) is likely the biggest. But The Pragmatic Programmer introduced a second concept that gained widespread recognition, which was titled ‘rubber duck debugging’.
I was first introduced to rubber duck debugging late one night during school. It was dark outside, and I had been coding for hours. I couldn’t seem to solve a pernicious bug in the assignment our teacher had given us. At the end of my ropes, I called my friend Koby Lewis, who was and likely still is a far more talented programmer than I am. “Koby, I know it’s late, but I’d really like your help figuring out this problem”. Koby graciously agreed to help me out. In order to help me, Koby asked me to walk him through the problem. I began explaining, but Koby quickly pointed out that I was not providing enough detail for him to understand what the problem was. We dove deeper and deeper, until I ended up monologuing for about 5 minutes on exactly how the code worked. At the end of this five minute description, my detailed explanation to Koby revealed a logical mistake I had made in my program. “Aha!” I said. “I figured it out! Thanks Koby!” Koby laughed and responded, “Happy to be a rubber duck for you.” Huh? What did he mean?
Koby explained to me that rubber duck debugging was a term used to explain the concept of debugging a problem by literally explaining it out loud. In The Pragmatic Programmer, the author describes a software engineer literally carrying around a rubber duck, constantly explaining to it what he was stuck on. I realized, as I progressed through school, that my programming classes were teaching me something far more important than technical concepts, syntax, and best coding practices.They were teaching me how to problem solve. And the rubber duck helped me learn that skill.
I strongly believe that programming is one of the most intense problem solving exercises a human being can perform, excluding highly academic fields such as theoretical physics and math. Rubber duck debugging was a powerful method to help me learn how to think through problems. I eventually purchased a rubber duck and placed it on my desk at my internship. While I never verbalized out loud to the duck what I was stuck on, I would often look at the duck and be reminded that if I was stuck, I likely needed to just think harder about the problem rather than go running to my senior dev. The rubber duck tradition was one I grew proud of. At Christmas, I bought members of my team rubber ducks, and I credit the small rubber duck for helping me become the programmer I am today. People have gifted me several rubber ducks over the years, as I went from intern to full time developer, and I now have a small collection on my desk.
I sometimes wonder if I am the last student to leave college with a rubber duck. My final year of college, ChatGPT entered the scene. Now, students have a rubber duck that talks back to them. In many ways, this is a huge win. Students are able to overcome problems far more quickly. It’s like adding GPS to your car. However, as someone who grew up with GPS, I’ll be the first to tell you that without GPS, I have a much harder time getting around. Oh, I can still manage, but it’s not natural to me. It gives me anxiety. In a similar vein, I wonder about the next generation of students emerging from college. They’ve been given GPS, in a sense. I know they can get stuff done with AI. They’ll likely be building faster than students coming out of college 5 years ago. But part of me is sad that students won’t get to experience rubber duck debugging. Will the joy of solving a particularly nasty programming bug be the same if it’s ChatGPT that solved it instead of you? Influencers like Primagen often talk about this deep love of programming that they have. ChatGPT robs you of some of that. It transforms the programmer from director to actor, the same way that GPS lobotomizes drivers into mindlessly following instructions, even if it takes you off of a cliff.
I counteract that concern with the optimism that we still get to build amazing things with code, and take pride in the end result. The joy of programming was often in the journey before the destination. But now that the journey is automated, we programmers will have to learn to enjoy the destination a bit more. Even if new programmers don’t get to experience the pleasure of rubber duck debugging, they still get to enjoy the amazing things they build. So now my rubber ducks now slowly gather dust while my list of conversations with ChatGPT grows longer and longer. They sit there, a reminder of the way things used to be, a relic for new programmers visiting my desk to ask about.