What is Rubber Duck Debugging?

Joe Eames
Joe Eames
Sep 14 · 2 min read
Image for post
Image for post

You’ve been banging your head against a virtual wall for what seems like a month, and you are no closer to getting your code to actually do what it’s supposed to do. What now? Perhaps a new career? Something less frustrating like crash test dummy sounds pretty good all of a sudden.

Ok, you take a quick breath and realize that maybe you can get help from a coworker. Someone to come look at your code with you and help you find the problem. That is actually a proven recipe for success. Just the act of explaining in clear terms what you’re trying to accomplish in your code will lead to you discovering the problem, and the other person often doesn’t even need to really participate, they just need to listen.

Only what do you do if you work alone? Or it’s late at night and nobody else is with you? Or your only coworker is on vacation following the Grateful Dead around on tour?

There is another solution, that is proven to be 83.29% as effective as an actual human. And that is the rubber duck.

Image for post
Image for post

Yes, pull out your trusty rubber duck and set him/her/them/it on your desk and proceed to explain your code and how it works to Mr. Ducklesworth.

If you’ve never been exposed to this technique it can sound dumb, and even thinking about doing it may make you feel silly, but what is your priority? Looking as cool as David Hasslehoff or getting your code into production?

Don’t believe me? Here’s a great writeup on the psychology of rubber duck debugging.

So get your favorite artificial waterfowl, keep him handy, and when necessary, lay out your technical problems on his very capable and water-proof shoulders.

Happy coding!

Signup for my newsletter here.

Visit Us: thinkster.io | Facebook: @gothinkster | Twitter: @GoThinkster

Thinkster.io

Top Quality Tutorials

Joe Eames

Written by

Joe Eames

Mormon, Christian, Father, CEO of Thinkster.io, Organizer of @ngconf, @frameworksummit, React Conf. Front end developer, and Software Craftsmanship Evangelist.

Thinkster.io

Top Quality Tutorials

Joe Eames

Written by

Joe Eames

Mormon, Christian, Father, CEO of Thinkster.io, Organizer of @ngconf, @frameworksummit, React Conf. Front end developer, and Software Craftsmanship Evangelist.

Thinkster.io

Top Quality Tutorials

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch

Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore

Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store