// you’re reading...


Rubber ducks help best with computer science

rubber ducking programming problems

“Rubber Ducking” – the phrase originated from The Pragmatic Programmer: From Journeyman to Master. The concept is that simply explaining the problem out loud, will often help one to come up with a solution, be it computer programming, design, or anything that requires thought really. In the words of the Pragmatic Programmer:

Place a rubber duck on your monitor and describe your problems to it. There’s something magical about stating your problems aloud that makes the solution more clear.

It doesn’t have to be a rubber duck, a Cardboard Programmer will do. Best described from the following example:

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.

Besides programming work assistance, rubber ducking also makes for an excellent learning tool to computer science students and instructors. My personal approach is to get students to ask the right questions that they could then answer themselves. It works surprisingly well. In another excerpt from the cardboard programmer link:

At a computer lab at UT (University of Texas) there was a lab assistant who required all people asking for help to first tell their problem to his TeddyBear which lived on his desk. He used to say that after talking to the bear more than 75% of the people solved their problems.

Often times I see students lock up in a “my program doesn’t work” attitude, while their mistake is obvious from simply reading the code. Explaining the program and the problem out loud, forces a more detailed attention that reveals such programming mistakes. Students learn better, and feel better for catching their own mistakes. Instructors can attend to more students, and don’t have to figure out what that a:f6 variable is supposed to be. Perfect.

So, what are you having problems with?

Read more


  1. Posted by Olga | February 12, 2007, 1:41 am

    I think its safe to assume a rubber duck will be among your birthday presents this year.

    Reply to comment

  2. Posted by Tony | February 12, 2007, 2:14 am

    Awesome, I’d be looking forward to that!

    Reply to comment

  3. Posted by Nicole | February 12, 2007, 2:49 pm

    Do you get any weirder?

    Reply to comment

  4. Posted by Tony | February 12, 2007, 3:23 pm

    Yes, but you’d have to subscribe to this blog’s feed to make sure ;)

    Reply to comment

  5. Posted by ranndino | October 10, 2007, 1:38 pm

    75% success rate? They should hire rubber ducks and teddy bears as tech support. Obvious benefits. You don’t have to pay them and they are much superior to the humans they normally hire for that role when it comes to doing their job.

    Reply to comment

  6. Posted by BTU | November 4, 2007, 2:14 am

    From several tech support calls I’ve made recently, I wouldn’t be surprised if some companies have already done so :P

    Reply to comment

  7. Posted by michaelp | January 8, 2008, 4:57 pm

    I never thought about trying to speak out loud to help solve my problems. I’ve thought about using a piece of paper, or asking questions. I might try that the next time I have a problem that I can’t solve by just thinking about it.

    Reply to comment

  8. Posted by Bruno Unna | February 13, 2008, 5:33 am

    On the one hand, I don’t think it is weird to believe that verbalizing a problem helps (very much) solving it. See what Paul Graham and Jason Fried have to say about good writing abilities.

    Besides, we are talking about a very old practice. Socrates used to question his disciples (insted of merely answering their question) until them found their answers by themselves.

    On the other hand, I’m quite surprised at the kind of responses I’ve read to Tony’s post. Why do people consider “weird” Tony’s reasoning?

    Reply to comment

  9. Posted by BTU | February 13, 2008, 2:56 pm

    While it’s true that both use verbalization to force a person to reorganize and arrange thoughts, I believe the socratic method has a lot more going on. Not only does it give the teacher a better understanding of the pupil’s current understanding of a subject, it also gives a good indication of how the pupil approaches learning and problem-solving. And don’t discount the long-term value of the “eureka” moment (apologies to Aristotle), that a pupil gains when they (hopefully) come to the correct conclusion.

    Reply to comment

  10. Posted by Nitin Reddy Katkam | July 9, 2008, 5:32 am

    It’s a little like whiteboarding, but with a rubber duck instead of a whiteboard! :-)

    I like drawing so I’ll stay with the stack of A4 sheets on my desk that mimic a whiteboard. I wish they would give me a tablet PC instead of a conventional notebook PC at work.

    Reply to comment

Post a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>