All Articles

Rubber duck debugging

I recently was struggling with a problem and I couldn’t come up with a simple solution without constructing complex hoops through jump through. But then I had a little chit chat without a friend of mine. All I did was just explain him the solution I came up with and it didn’t take much time for me to realize my mistakes and I felt dumb after coming up with a really simple solution. this method is called Rubber duck debugging.

In rubber duck debugging you need to explain the flow of your code in line by line to another person who has no knowledge of the subject or to a rubber duck. In doing so you are forced to retrace the path you took while writing the code and to rethink your logic thus to find a flaw in it.

There is another similar technique called Feymen’s technique. Awesome physicist Richard Feyman whenever he learnt something new or thought of something he would explain it to his students or colleagues in really simple words. That will force him to see the gap in his understanding. There is a reason why he is called “The Great explainer”. People often tend to use lots of jargon in their words just to make themselves feel smart. While jargons may sound cool and smart they are often dumb and will help you get away with half-baked knowledge of the subject. Using simple words to explain complex subject is very hard and to do that you will need a good grasp of the subject at hand.

There has been tons of research done to explain Feymen’s technique (ironically most these papers use complex jargons). I guess we don’t need to be just programmers but rather we need great explainers.

Further Reading