Why Does Explaining My Code to AI Feel So Satisfying? — Turns Out I’ve Been Doing This Since Before AI Existed

Rubber duck debugging is a real 1999 coding trick for catching your own bugs out loud. An AI assistant turns out to be the same duck, except it replies.

I was today days old when I wondered why typing out a bug for Claude or ChatGPT — walking it through what the code is supposed to do, line by line — feels genuinely satisfying before the model has said a single word back. Then I found out this isn’t a new feeling at all. It’s a 25-year-old technique with its own name, and it was built around an actual rubber duck.

Split illustration: on the left, a classic rubber duck listening silently to a programmer explaining lines of code; on the right, a matching chat bubble shaped like the same duck, listening to the same explained code but sending a reply back

Same trick, same code explained out loud — the only thing that changed is whether the listener talks back.

The original: a literal duck, 1999.

The term is ‘rubber duck debugging,’ and it traces to a specific, citable source: Andrew Hunt and David Thomas’s 1999 book The Pragmatic Programmer: From Journeyman to Master. The book’s own anecdote describes an old-time programmer who carried around a literal rubber duck and made himself explain his code to it, line by line, before he ever let himself go bother a human colleague with a question. The practice stuck, got a name, and has been standard advice in software engineering circles ever since — not armchair psychology, an actual documented technique with a known origin. Source: Wikipedia, Rubber Duck Debugging.

Why talking to a toy catches the bug before it ever answers.

The duck doesn’t need to understand code. It doesn’t need to say anything back, and in the original version, it can’t. What it does is make the explaining feel mandatory instead of silly — and the explaining itself is the whole mechanism. Forcing your own reasoning into words, out loud, in order, surfaces the assumptions and skipped steps your eyes glide straight past when you’re just re-reading your own code silently. Programmers have reported for decades that they solve their own problem mid-sentence, well before finishing the explanation, let alone getting a reply. The same effect shows up anywhere someone has to write a clear, detailed question for a real audience — plenty of longtime Stack Overflow users have noticed that the act of carefully typing out a question, so a stranger could actually follow it, is often enough to make the asker spot their own mistake before ever hitting submit.

The twist: now the duck talks back.

An AI coding assistant doesn’t replace this mechanism — it inherits it. You still have to put your reasoning into plain, ordered language to get anything useful out of a model, and that act alone still catches plenty of your own mistakes before it ever responds, exactly like the original duck. But then it layers something new on top that the 1999 version never offered: an actual, frequently useful reply. Sometimes it’s the fix. Sometimes it’s a question that reveals the blind spot you didn’t know you had. Sometimes it just confirms you were right, which a rubber duck was never going to do either way. Same mechanism, same payoff, plus a second one stacked on top.

A maybe, clearly labeled as a maybe: is some of this just wanting to talk to someone?

Here’s a purely speculative kicker, not a cited finding: maybe part of what makes this so satisfying isn’t only the debugging payoff. Coders skew introverted often enough that it’s a running joke in the field, and explaining your work to something that listens, on your own schedule, with zero social cost if you’re wrong, might be scratching a low-friction social itch that doesn’t always get scratched by walking over and bothering a human colleague. That’s a theory, not a measured fact about coders as a group — but it’s worth noticing that the original 1999 version of this trick needed an actual toy to talk to in the first place. Maybe the AI version didn’t invent a new need. It just gave the old one something that occasionally talks back.

« Back to All Stories