top of page
Search

The Rubber Duck Debugging Technique

yellow_duck

Who would think a Rubber Duck might help you with your (sometimes frustrating) programming issues? It still sounds crazy, right?

The duck works in mysterious ways… or not exactly. As it turns out, we often take certain things for granted and we don’t challenge them. Often enough, the part(s) we assume has/have nothing to do with our issue usually have a direct/indirect impact.

So what do we do? We go and ask for help to a colleague. Since the colleague is out of context, we need to explain the issue in detail in order to receive any feedback. As we lay all the details (even the ones we assumed are unrelated) we suddenly realize what went wrong, we thank our colleague for his/her support (even though he/she said nothing) and get back to fix our code.

We repeat the above experience several times and realize we don’t have to disturb our colleague anymore, the Duck can help.

I personally use the Rubber Duck for complex situations. Given the Duck is pretty stupid, I need to explain her even the simplest things and this way I make sure I’m not making any automatic assumptions. Don’t believe me? Here’s the proof – proudly sitting on my main monitor :).

The concept of the Rubber Duck was first introduced in a book called The Pragmatic Programmer, which I totally recommend.

And no, I’m not (that) crazy, there are other people talking about it and using it, look

Comentários


bottom of page