Rubber Duck Problem Solving

One more technique: I never post a question until I’ve written the simplest possible program that demonstrates the problem. Most of the time, the act of doing this shows me the solution

If not, then at least I’ve provided the StackOverflow community with something concrete and simple that they can work from.

Plus it eliminates most of the “have you considered…” non-answers.

A couple of places I worked we called it “A Second Set of Eyes.” We hadn’t made the leap to an inanimate object.

And, I’m another one who has started to type up a question or two, only to abandon it. Either by ruling out obvious refining questions, or by producing a simple example of the problem.

Regardless of how detailed is your internal representation/understanding of the problem it always makes sense to just verbalise it - my theory is that it just activates different neural passages in your brain which eventually helps in finding the solution.

We always called this “talking to the bear”, after a plush teddy bear that allegedly at one time. It became traditional, when asking a co-worker a question, to start with “would you mind being the bear for a minute?”

I wish I’d thought of the funny nomenclature, but I didn’t. I did however, express this thought back in 2004: http://www.mooreds.com/wordpress/archives/193

Dan Moore

@Christopher Allen-Poole, if you’ve gone to the trouble of typing out the question, self-answering is encouraged on SO, so go ahead and give the community the benefit of your experience.

That exact thing happened to me a couple months ago: http://stackoverflow.com/q/8715738/99640

The question wound up so long and involved that it seemed a shame to throw it away, so I posted it and answered it myself.

I love your article, so please ask Bob the Duck out loud: “Why doesn’t Stackoverflow have a cancel button on the Ask Question page?”

I have had a duck by my work computer for the past 7 years. It has been a great help in maintaining an old code base.

Even though it was more or less dismissed in the linked coding buddy article this is basically the entire crux of pair programming in Agile development.

And for some reason many developers swear blind that they must only work alone without interruption from anyone else.

Plus of course there is another major benefit from pair coding that few talk about. http://almaer.com/blog/pair-programming-productivity

When I was a lone “engineer”, I once had an Exchange issue that I couldn’t solve - partly because I didn’t then know the answer and partly because I was too stretched for resources to devote the time needed to finding the answer.

Anyway, my employers agreed that in the short term they’d call a consultant in to help me fix the exchange issue and they’d hire me an assistant.

On the day the consultant turned up (he was one we’d used before and I knew quite well) I started explaining the problem to him, and yes, the sheer act of explaining the issue to someone who understood it and needed the technical details caused the probable fault and a solution to pop into my mind. The consultant started laughing when I told him this and claimed he could actually see the lightbulb start glowing over my head even before I told him this.

So it works with more than one person, and I guess with the rubber duck if you can bring yourself to explain the problem in proper detail to it.

The consultant was still useful; given how little time I had, he spent two days proving my latest theory and then implementing and testing my solution. It was still a two person job anyway and that’s something that rubber duck problem solving doesn’t help with.

It should be Teddy Bear not Rubber Duck!

See the 1999 book The Practice of Programming

http://cm.bell-labs.com/cm/cs/tpop/debugging.html

Our questions are directed towards a picture of Arthur Fonzarelli on the wall.

The Fonz always knows the answers.

The Fonz always knows the answers.

I answer questions on SO and I’m also a moderator at a Java forum website.

The overwhelming majority of people don’t seem to understand how to ask a question properly on SO or in the forums. Every day there are people posting a single line “Why doesn’t my program work?” followed by 1000 lines of code, people who post “I get an error!” without even bothering to write what the error message is, people who think that somehow someone else on the other side of the Internet can read their mind, people who don’t even know themselves what the question is that they’re asking, etc.

The rubber duck would certainly take care of many of those people. And if they ask “Bob”, they should at least try standing in the shoes of “Bob” so they realize what they need to tell Bob for their question to be answerable.

Also, I meant to link to this great blog post which is yet another example of this realization:

http://remarkablepixels.com/blog/2011/1/5/the-best-question-is-the-one-never-asked.html

Sometimes I wonder if you even need to ask the duck the question. Often if I can’t solve a problem I just move onto another task. When I come back to the original task a day or so later, the problem seems to be much easier to solve. (That obviously doesn’t work if you have a deadline and can’t just move on to another task.) Perhaps asking the duck is just taking your brain off the original problem and giving it something else to do for a while.

Sir, I've followed your suggestion, but then I have another question:

what about if I do not have a duck in my office ?
whom should I ask where I can find a duck to ask for ?

Hi Jeff: You are observing that “something about writing it down makes me think along extra lines of thought.”

I would like to add another observation, mainly because the link is obvious, but (still) not well understood: the acceptance of logical rules of inference (modus ponens, say) is closely related to literacy. There’s quite a body of research out there now showing that illiterate people are not willing, or unable to accept formal rules of inference, research which is adumbrated by the fact the the first formalization of logic, Aristoteles,’ was more or less concomitant with the introduction of literacy to Greek society (Socrates, for example, was still illiterate, (although he knew how to use logic well)).

A principal researcher in this field is Philip Johnson-Laird of Princeton

http://psych.princeton.edu/psychology/research/johnson_laird/index.php

By the way, have a look at my blog:

http://morefreedomfries.blogspot.ch/2012/09/freedom-fries-introduction.html#more

Cheers…

Framing is the question is always worthwhile. But the questions of newbies often make sense only in terms of a specific combination of ignorance and misapprehension. The best way to help is to look at what they do seem to know and hand them the corners of the metaphorical jigsaw puzzle. This often results in a much improved formulation of the question, a self-closure or self-answer.

But these people are made profoundly unwelcome by communities like Stack Overflow because they are not well equipped to ask a good question, and even if they do, they are not sufficiently steeped in the customs of that field to use phraseology that causes duplicates to show up while they are composing a question.

Recently I experienced this for myself when I embarked on a crash course of self-ed in Microsoft’s implementation of MVC with Durandal, Knockout and Bootstrap. For the first time in decades I floundered, not even knowing the extent of my ignorance. It was highly unpleasant and more than once I had a question closed as duplicate simply because I wasn’t wording things the way I would if I didn’t need to ask.

You can use digital version of Rubber Duck Debugger available on google play