Why talking to a rubber duck can make you a better programmer
Not a Medium Member? Read here for free.
Rubber duck debugging has been around for a long time. It was popularized by Andrew Hunt and David Thomas in their book The Pragmatic Programmer in 1999. In this story, I want to show why it is still relevant today.
We probably have all been in the situation: you get stuck trying to solve a problem and get frustrated so you ask a friend or a colleague to help you out. You start describing your problem from a higher level and then go into the details step by step. Suddenly, before you even get to ask your question, you realize a logical mistake you made. Without your colleague saying anything, the process of taking a step back from your problem and explaining it to someone else made you solve your problem.
Instead of pestering your colleague with your problems, you could also have talked to a rubber duck (or anything else).
Not only does rubber duck debugging help you get unstuck, but it also makes you a better problem solver. Here are three reasons why this technique is essential for a programmer: