Rubber duck debugging

You’re writing a computer programme, and you need to debug it. Why not use a rubber duck?

Rubber duck
gaetanlee [CC BY 2.0], via Wikimedia Commons
No, it’s not a software tool or odd phrase – it’s a literal rubber duck. This process follows from the maxim that you only understand something when you must explain it to others. Rubber duck debugging requires a coder to explain each line of their programme to a rubber duck or other inanimate object. In doing so, erroneous assumptions and mismatches between intention and action are laid bare.

The concept was originally described in the book The Pragmatic Programmer: From Journeyman to Master. As with so many coding in-jokes, it has flourished on the web.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s