Skip to content
Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (76 sloc) 4.39 KB
layout author title date desc img imgdesc categories tags interesting toc
post
Wouter Van Schandevijl
Rubber Duck Debugging
2019-02-26 16:00:00 -0800
Don't confront someone with your problem right away, Talk to the Duck™ first.
rubber-duck-programming-duck-slippers.jpg
I own one of these! :)
productivity
debugging
git desc
atleastimtrying/rubber_duck
A tool for one person pairing.
url desc
Rubber Duck Debugging.com
title icon
Rubber Ducking
bug

Talk to the Duck

{: .hide-from-excerpt}

When confronted with a problem, don't ask the person next to you for help right away, he's probably doing something important as well!

Instead, first tell the duck about it - out loud. If you don't get to a solution, start explaining your problem in more and more detail until it hits you. If the mere explanation led to a solution, you avoid unwillingly turning your colleague into a CardboardProgrammer.

Most likely the duck will just sit there and appear to have done exactly nothing. Does it get satisfaction every time it assists someone in finding a solution? We will probably never know.

More Frivolous

My family somehow turned Rubber Duck Debugging into "give Wouter as many ducks as humanly possible".

The most magnificent duck I've received so far:

{% assign fileName = "rubber-duck-programming-big-duck.jpg" %} {% assign imgDesc = "At the office. The name is Ping, ask her anything!" %} {% include post/image.html file=fileName alt="Ducky!!" title="Ping hasn't pushed much code though" desc=imgDesc maxWidth="360px" %}

Rubber Duck Prank

Warning: This stuff is hilarious.

{% include post/youtube.html id="f5d8pVg3Qtg" desc="Not at all relevant to rubber duck debugging but still very funny!" %}

Further Reading

Pragmatic Programmers

The original idea was to blog about the Pragmatic Programmer Tips. The blog turned out quite differently however. Still, here we are, Rubber Duck Problem Solving, yet another thing I learned from the Pragmatic Programmers.

Tip 3: Provide Options, Don't Make Lame Excuses
Before you approach anyone to tell them why something can't be done, is late, or is broken, stop and listen to yourself. Talk to the rubber duck on your monitor, or the cat. Does your excuse sound reasonable, or stupid? How's it going to sound to your boss? - Andrew Hunt and David Thomas {: .notice--info}

One final tip (in this context!) from them pragmatic programmers: "Don't be afraid to ask, or to admit that you need help." No one knows everything.

Coding Horror

The effort of walking an imaginary someone through your problem, step by step and in some detail, is what will often lead you to your answer. ... Even if you don't get the answer you wanted, forcing yourself to fully explain your problem will frequently lead to new insights and discoveries. - Jeff Atwood in CodingHorror - Rubber Duck Problem Solving

StackOverflow also did a April Fools' Day joke in 2018 about this. Displaying a duck in the corner which, after some apparent thinking & writing, produced a quack.

WikiWikiWeb

At WikiwikiWeb they also have a RubberDucking page. They originally called it the CardboardProgrammer:

You've just spent the whole day trying to solve a problem, a design problem, a bug, etc. You know the solution is simple but you just can't see it.

A colleague walks past and notices your anguish: "What's up?". "Oh, I'm ...". You explain the problem and what you have done so far. However you suddenly discover the solution before you have finished speaking! So far your colleague has been as useful as a cardboard cutout.

Other, similar techniques:

And to finish this post, a business idea from the RubberDucking wiki page:

You can even pair program with a rubber duck.
It would be perfect if you added a little voice chip that asked, "Did you write the test?"

You can’t perform that action at this time.