Developer’s best friend: the rubber duck

Developer’s best friend: the rubber duck

You wouldn’t say, but rubber ducks are really great mentors, which is why I think they’re such good friends of programmers. There aren’t many rubber duck with a diploma, but they have a very useful super power: understand absolutely nothing about the bug you have as a developer. You may be wondering now, how does this help? After all, any static object has this quality.

Let me explain. It’s called Rubber Duck debugging. In fact, it can be anything: a cat or even a Kinder egg toy, in case you like sweets as much as I do. Basically, all you have to do is tell your problem to the duck, and only by explaining, in as much detail as possible, what your code is supposed to do, somehow – it happens almost all the time – you will find the solution. The duck will stay there motionless, satisfied knowing that she helped you on your way.

This is what the rubber duck terminology refers to and comes from a book written by Andrew Hunt and David Thomas: The Pragmatic Programmer. The authors tell a story about a programmer who carried a rubber duck with him and debugged their code by explaining what is happening in the code, line-by-line to that duck.

There are studies that show that verbal explanation of a concept helps you understand it better. This is because we all have the impression that we understand a concept, but we often neglect to generate a detailed explanation for ourselves. The question of a stranger somehow forces us to replace our false sense of understanding with a logical, rational explanation. Once you have to explain to someone who doesn’t understand anything, it makes you stop taking things for granted and look at the problem with fresh eyes.

Another reason why this technique is so popular is that we often no longer need to seek the help of our teammates who may be busy. Our duck will have a lot of patience with us and has no expectations. Of course, if you’re really stuck, you shouldn’t be ashamed to ask your teammates for help.

In case you are bored with your rubber duck, you can find other virtual ones here. Or even become one,(without growing your beak) by collaborating with others real-time, and listening to their technical problems.

Comments (0)
Join the discussion
Read them all


one × five =

Hide Comments

This is a unique website which will require a more modern browser to work!

Please upgrade today!