Me Love You Runtime Code Monkey!

What's that duck for?

I’ve written about this before in my last, not so focused blog, but I’ll write it again. There are a few simple non-programming programmer rules I like to adhere to. These would be things like KISS (Keep It Simple Stupid) etc. Another lesser known one of these is Rubber Duck Debugging.

The duck on my desk

When you hit a conundrum while coding, it is very easy to sit and suffer, draw diagrams etc. Many (including myself) tend to internalise this and not speak it. Usually, if you then ask another programmer, by the time you have explained the problem you have worked it out because you have externalised the issue.

Rubber duck debugging gets round this (sort of). You get a rubber duck (you should always have one on your desk) and when you hit a conundrum, you pick the duck up and you explain the issue you are having. By doing this, you externalise the problem and it can really help. It feels daft, but it can really cure the issues of Cognitive Dissonance and make you feel much better.

Of course, asking someone else helps even more, but if they’re not about/you feel stupid asking because it feels like a simple issue, this is a great back up.

And that, ladies and gentlemen, is why I have a rubber duck on my desk.