Rubber Duck Debugging

Stop ducking around!

Our favourite debugging method needs no licence, no install and no internet connection. Just a duck.

Rubber Duck Debugging

The method

Rubber duck debugging in four steps

01Get a duckBeg, borrow, steal, buy, fabricate or otherwise obtain a rubber duck (bathtub variety).

02Introduce yourselfPlace the duck on your desk and tell it you’re just going to go over some code with it, if that’s all right.

03Explain everythingExplain to the duck what your code is supposed to do, then go into detail and explain it line by line.

04Spot the bugAt some point you’ll tell the duck what you’re doing next, and realise that’s not what you’re actually doing. The duck sits there serenely, happy it has helped.

A note on substitutes

In a pinch, a coworker will do

A coworker might be able to stand in for the duck. However, it’s often preferred to confide your mistakes to the duck instead of your coworker.

Original credit: ~Andy from lists.ethernal.org

The lounge at the ik.io office, with the red rubber duck

Still stuck after talking to the duck?

Our team builds and supports software every day. Tell us what you’re working on.