2 September 2010

Network Dictionary – Rubber Duck Debugging

84DA4767-B85F-4BDF-BCB4-C4577125ED13.jpg

As found at http://lists.ethernal.org/oldarchives/cantlug-0211/msg00174.html

We called it the Rubber Duck method of debugging. It goes like this:

1) Beg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety)
2) Place rubber duck on desk and inform it you are just going to go over some code with it, if that’s all right.
3) Explain to the duck what you code is supposed to do, and then go into detail and explain things line by line
4) At some point you will tell the duck what you are doing next and then realise that that is not in fact what you are actually doing. The duck will sit there serenely, happy in the knowledge that it has helped you on your way.

Works every time. Actually, if you don’t have a rubber duck you could at a pinch ask a fellow programmer or engineer to sit in.

And don’t you feel foolish……

when, after hours or days of banging away and being completely stumped by something. Then you walk someone else through a problem, and you facepalm and realise EXACTLY WHERE the freaking problem was.

You blush, you mutter and say, thanks for the help. They look at you like you are an idiot and walk away grumbling.

AM I RIGHT ?

Please rate this post:

1 Star - It\\\'s Crud2 Stars - It\\\'s Tosh3 Stars - Something\\\'s missing4 Stars - Needs works5 Stars - Good Enough6 Stars - Good7 Stars - Excellent8 Stars - Brilliant9 Stars - Astonishing10 Stars - Awesomely Godlike? (1 votes, average: 7.00 out of 10)
Loading ... Loading ...

About Greg Ferro
Greg is a Network and Security Architect / Designer / Engineer working freelance in the UK and worked for Resellers, DotCom's, Large Corporate's and Service Providers across a variety of products & Vendors. He prefers to work for end users, believes in the life cycle, total cost of ownership and that near enough is often good enough. He likes talking about himself in the first person to feel "royal", even when hosting the Packet Pushers Podcast on Data Networking. More about Greg at http://etherealmind.com/who-am-i/ and you can follow him on Twitter.

Comments

  1. Aaron says:

    You are more than right. I don’t code any more, but, when I was in college, I remember having an issue with an assignment. I went to the professor, began to show him what I did, and realized about 3.5 seconds into my explanation what was happening. Of course, this followed 10 hours of troubleshooting to no avail.

    I may go get a duck just in case, though.

  2. Ethan says:

    I’ve used this technique in reverse where I’m the rubber duck. When I can’t seem to communicate to someone why their idea won’t work, I say, “Well, okay. Explain it to me, using a whiteboard and small words. Perhaps I’m missing something. (Quack.)” Three boxes and few lines into the drawing, I usually witness the facepalm and a crestfallen expression. “Oh, I get what you were telling me now. It WON’T work, will it…” ;-)

Trackbacks

  1. [...] a rub­ber duck who sits on my desk ready to listen when I have a prob­lem. This is known as Rubber Duck Debugging and is the well known tech­nique for solv­ing dif­fi­cult [...]

  2. [...] finally went downstairs, talked it over with my wife who is my rubber duck, and finally figured it wouldn’t hurt to change the order of the classes.  Once I put ICMP [...]

Speak Your Mind

*