Why does rubber-ducking work?

3 minute read Published: 2025-05-23

Because it forces you to serialise your thoughts in a way you otherwise might not have. Next question please.

“Wait, don't go! What is this ‘rubber-ducking’?”

Oh, I thought that was common knowledge! Alright, let me elaborate.

Have you ever heard the term “literal genie”? It refers to something that, instead of giving you what you want, just gives you what you asked for—which might have no relation to what you actually wanted.

As it turns out, computers are the absolute literal genies: you have to be 100% precise in what you're telling them to do, or they'll do the wrong thing. Therefore, a common source of frustration for programmers is realising that their programs do not do what they are supposed to, and have to be corrected. This is called “debugging”, and is a very common source of frustration for programmers.

Debugging being as hard as it is, people frequently need help doing it. And, in asking a volunteer for help, they need to first explain to the volunteer how the program is structured… which frequently magically creates a solution to the problem even with no input from the volunteer. Therefore, since the volunteer ended up only nodding his or her head along with the explanations, s/he ended up being likened to a rubber duck floating up and down in the water.

(I mean… I think a much better comparison would be the bobble-head nodding dogs that people put on their dashboards, but the nomenclature has already stuck and I'm not about to fight it.)

“And that works‽

Oh yes, much better than you might expect in fact. Rubber-ducking is a venerated debugging technique, enough so to warrant its own article on Wikipedia.

As for why? I think it all boils down to the thing I mentioned at the beginning. To program is to communicate, and computers need to be communicated to in the most linear and exhaustive method possible. And, in the absence of ways to do so directly, doing so indirectly can be an excellent work-around.

It's a bit like… you know that advice about remembering your dreams, that says to write them down as soon as you wake up? The important thing is not that they'll end up written down; the important thing is that you'll need to verbally process the dream you just saw. Some times, that's all it takes to remember it.