Originally published on https://blog.naba.run/posts/my-rubber-ducks/
There are times when I find myself stuck when solving any problem. This deadlock can arise due to several factors. Sometimes I need a new perspective of the problem. Sometimes I just need to go through my approach with a fresh mind.
I can ping my colleagues to get new perspectives or explain to them what I am trying to achieve. But, not always can I find someone to listen to me since everyone is busy with their work.
What I do in those situations is either
- write down my approach on a piece of paper in the simplest terms, or
- talk to my Rubber Ducks about the approach assuming that the ducks have ZERO knowledge about what I am doing.
I learned about the Rubber Duck debugging paradigm when reading The Pragmatic Programmer by Andrew Hunt and David Thomas. It is a gem of a book. I feel every software engineer looking to excel in their art should read the book. They discuss this method in the Debugging chapter of the book. The idea to find the cause of a problem by explaining it in very simple terms to someone else. The other person listening to you shouldn't speak a word and should just nod to what you are saying. This simple exercise of explaining your approach in very well defined and atomic steps can give you new insights to your problem.
Obviously you can't have someone with you all the time to just listen to you. And here comes the importance of inanimate objects that can't speak. They are the ideal ones that you can explain your problem to. There are some positive effects like they won't ever judge you, they are always with you no matter what happens. Having said all that, I want to introduce you to my rubber ducks:
In the front row is Goldie, then Zee, then Captain Kube and the tall bloke is Phippy. The whole gang is known as Phippy and Friends. They are always on my table looking over me and listen to me whenever I want to speak to them. I know it's a bit intimidating someone looking at you all the time, but eventually you get along with them. ;)
Do note that this method works for me, but not necessarily would it work for everyone. I always ask people to find their own debugging comfort zone.