Scott Hanselman

The art of Rubber Ducking or Rubber Duck Debugging

December 10, 2020 Comment on this post [33] Posted in Musings
Sponsored By

It works. Really.

"Put a rubber duck on your monitor and tell it how the code is supposed to work."

Rubber Ducking - Pic used under CCThe Rubber Duck can be your disinterested roommate, non-technical spouse, or your work-spouse. I call Damian Edwards or Tara Walker all the time and they just listen to me explain how it should work and somewhere in the middle of explaining it out loud I'll go...OOOOOOOOHHHH...and then I've solved it.

If you are new to programming, go check out my YouTube, specifically this one about being Overwhelmed with Programming. I talk about the importance of Rubber Ducking and verbalizing how your code should work.

This can be challenging in these remote times, so I recommend that you try to build a small community of like minded friends and developers. You can find folks on Discord and other community sites or consider reaching out to a friend on Twitter or from work and say "I can use you as a rubber duck sometimes?"

I have little Gundam and Gunpla (Amazon link) robot models on my desk and I'll use them to help me debug.

This might sound silly but it ABSOLUTELY works. Ask around. Try it.

You'll find that getting the problem outside your head, via your mouth, and then back into your ears is often enough to shake brain cells loose and help you solve the issue.

Rubber Ducking also is great practice in technical communication! Have you ever given a technical talk? There's actually not much distance between explaining a technical issue clearly, correctly, and concisely and giving a talk at a user group or conference!

Have you tried Rubber Duck Debugging? Let us know AND encourage early in career Code Newbies to consider (and normalize) this technique!

Sponsor: Suffering from a lack of clarity around software bugs? Give your customers the experience they deserve and expect with error monitoring from Installs in minutes, try it today!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Hosting By
Hosted in an Azure App Service
December 16, 2020 0:03
Hey Scott, we've been big fans of this at our agency for years now, and we've spread it beyond just programmers! For a reason lost to time, we call it duck talking, but it is all the same.
December 16, 2020 1:24
This works for many topics besides programming too. When you teach someone how to do something, you usually learn a bit yourself or at least cement the knowledge further in your brain.
December 16, 2020 4:23
There's an old adage that goes "the best way to learn is to teach". I think Rubber Ducking is the same principle in disguise: In trying to explain something to a person who has no prior knowledge, you force yourself to explain it in simple, fundamental terms. It helps to give you that external perspective, without having to wait for somebody else to provide it for you.
December 16, 2020 4:43
This is so true. I have never heard this term but the idea of talking through the code in natural language is something I have done and encouraged others to do for a long time. I personally find I get best results when I am explaining things to non technical people because then I have to think through it in non technical terms I guess. Glad to have a name to put on it. =P
December 16, 2020 5:05
We call this "being cardboard superman" where I work - the call will go out for someone to be a cardboard superman, meaning we just want someone to talk at about whatever code problem we're having. It's great!
December 16, 2020 6:42
I first saw the mention of a rubber duck in the "Interactively debug .NET apps with the Visual Studio Code debugger" course of Microsoft Docs Learn, but I thought it was a very crude joke.

Where I live, married people don't talk to rubber ducks. This is especially true when their spouses are in the same house with them because of COVID-19.
December 16, 2020 13:17
We call it being a 'yes man': that is, you just sit there and say 'yes' while the other person explains their problem. Generally, they find the answer before you've even really understood what the problem was.

In these lockdown times, I've found even writing an email to someone to explain the problem works pretty well also.
December 16, 2020 13:22
I first encountered this phenomenon as a child when my mum used to joke she had a "maths aura". I'd be stuck with my maths homework and while I was explaining the problem to her I'd figure out the answer!

Maybe I should phone her up when I'm stuck with programming ...
December 16, 2020 13:55
Yeah! this stuff really works! Also (incredible) way to debug complex program is to dream about it, because you can reason without the usual constraints.
It is more difficult to choose what to dream about, but if you are really obsessed by a piece of code it is quite possible. And the results are amazing. Did you ever tried?
December 16, 2020 15:52
I saw in some book (might have been The Pragmatic Programmer) that some computer class used this idea. If you had a problem, you would go and fetch the teddy bear, and explain it to him. If that didn't help, then you could ask the teacher.
December 16, 2020 21:00
I had never heard this described as Rubber Ducking. This technique is used in many different ways. The best writers know to read their material aloud to themselves. It's one of the basic principles of psychotherapy. During my 40 year career, many as a manager, I let everyone know they could come and vent to me. You've now made it clear that I could have been replaced by an inanimate object! Listening is key to many things.
December 16, 2020 22:49
This was called "teddy bearing" when I first heard about it, as in "explain it to the teddy bear sitting on your desk". Some folks had actual teddy bears on their desk to aid with debugging. Really works.
December 17, 2020 1:55
Hi Scott,

I'm a big fan to.

For young programmer born with an iPhone in the hand, it's hard to understand that thinking about a problem and finding a solution is a matter of technology. I'm 100% agree with you when you talk about the right environment, talking to a toy or writing on a paper notebook. Good technology is great but the process of thinking is in my view better than any other things.
December 17, 2020 5:05
Fantastic site. Plenty of helpful information here. I
am sending it to a few friends ans also sharing in delicious.

And obviously, thanks to your effort!
December 17, 2020 5:48
What's up, for all time i used to check weblog posts
here early in the morning, because i love to learn more and more.
December 17, 2020 7:25
Howdy! I'm at work surfing around your blog from my new iphone 4!
Just wanted to say I love reading through your blog and look forward to all your posts!
Keep up the great work!
December 17, 2020 13:07
Wonderful article! We will be linking to this great content on our site.

Keep up the good writing.
December 17, 2020 15:14
Hi there, I found your blog via Google while looking for a comparable topic, your web site got here
up, it looks great. I've bookmarked it in my google bookmarks.

Hello there, simply became alert to your weblog through Google,
and found that it's really informative. I am
gonna watch out for brussels. I'll appreciate in case you proceed this in future.
Many folks can be benefited from your writing. Cheers!
December 17, 2020 15:44
I just like the valuable information you provide in your articles.

I'll bookmark your weblog and check again here
frequently. I am slightly sure I'll be informed plenty of new stuff right right
here! Best of luck for the next!
December 17, 2020 16:00
If you wish for to improve your experience simply keep visiting
this website and be updated with the latest news update posted
December 17, 2020 18:34
Thanks for sharing your thoughts on Musings. Regards
December 17, 2020 20:39
Hey very interesting blog!
December 17, 2020 20:58
I like reading a post that will make men and women think.
Also, thanks for allowing me to comment!
December 17, 2020 21:26
You could certainly see your skills within the article you write.
The sector hopes for more passionate writers like you who are not afraid to say how
they believe. Always go after your heart.
December 17, 2020 21:35
Hi there everyone, it's my first visit at this website, and post is genuinely
fruitful in support of me, keep up posting these types of content.
December 18, 2020 0:40
Why viewers still make use of to read news papers when in this technological globe
everything is accessible on net?
December 18, 2020 2:25
You've rediscovered what is a known way to solve problems from at least Socrates in early Greece over 2000 years ago.

It's the "Socratic Method" and not "rubber ducking".

"Recoining" without anything new added should be avoided. ITIL vs DevOps, etc.
December 18, 2020 3:08
I’m not that much of a internet reader to be honest but your sites
really nice, keep it up! I'll go ahead and bookmark
your site to come back down the road. All
the best
December 18, 2020 6:12
Hello colleagues, how is the whole thing, and what you
wish for to say regarding this article, in my view its truly awesome for me.
December 18, 2020 11:52
December 18, 2020 11:53
This is really interesting, You're a very skilled blogger.
I have joined your feed and look forward to seeking more of your excellent post.

Also, I have shared your web site in my social networks!
December 18, 2020 15:56
Thanks designed for sharing such a pleasant opinion, post
is fastidious, thats why i have read it entirely
December 18, 2020 16:43
Fine way of telling, and pleasant post to take information concerning
my presentation topic, which i am going to convey in academy.

Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.