Author Topic: Teddy Bears Morph into Rubber Ducks  (Read 2012 times)

0 Members and 1 Guest are viewing this topic.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Teddy Bears Morph into Rubber Ducks
« on: March 14, 2012, 07:40:38 AM »

Another effective technique is to explain your code to someone else. 
This will often cause you to explain the bug to yourself. 
Sometimes it takes no more than a few sentences, followed by an embarrassed "Never mind, I see what's wrong. 
Sorry to bother you."  This works remarkably well; you can even use non-programmers as listeners. 
One university computer center kept a teddy bear near the help desk. 
Students with mysterious bugs were required to explain them to the bear before they could speak to a human counselor. 
~Brian Kernighan and Rob Pike, about debugging


Now the story is
http://www.codinghorror.com/blog/2012/03/rubber-duck-problem-solving.html

Interesting and usefull article :)
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

vegbruiser

  • Guest
Re: Teddy Bears Morph into Rubber Ducks
« Reply #1 on: March 14, 2012, 07:54:16 AM »
I once raised this as "Talk to the bear" in a design meeting and got laughed at;  :x But I firmly believe the principle is sound, if underused.

And I've done what the poster mentions as well; begun writing out a post and found the error as I was doing so. :)

Always good to get a reminder - thanks Kerry!

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: Teddy Bears Morph into Rubber Ducks
« Reply #2 on: March 19, 2012, 12:57:15 PM »
So many times the answer is the question.
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions