Talk About Quality

Tom Harris

Tell it to your Teddy Bear

with 2 comments

After spending more time than I should have troubleshooting a coding (actually static code analysis) problem, I shared the story with a co-worker, who reminded me that Kernighan and Pike had been there before:

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, in The Practice of Programming

Seems that there are rules that we learn, then love to break, and are always sorry afterwards. Here’s how.

My code doesn’t work

  • I’ll just try this change to see if that fixes everything. And then this change, and this other change.
  • I’ve been stuck for 10 minutes, but since nobody knows this code like I do, I won’t ask anyone for help.
  • I know I don’t understand what every line of code does, but it’s OK — I’ll figure out the problem anyway.
  • A complete build takes only a few minutes, so there’s no need to try a 3-line sample instead.
  • I’ve read the documentation and I’m sure I’ve understood it, so I won’t ask anyone for a second opinion.
  • I already asked someone 3 times for help and got it, so I can’t bother him or her a fourth time.
  • It doesn’t compile (cleanly, or at all) just now, but soon it will again if I just keep at it

(The only way I got home today was that somehow I did realize it was, um, OK to call the tool support line.)

What are your favorite “justifications” for why it’s better to stay stuck than to get help, or at least take a break and share your problem with someone else?

While I’m waiting, I’ll go talk to my teddy bear.


Written by Tom Harris

August 30, 2010 at 8:50 pm

Posted in Agile

2 Responses

Subscribe to comments with RSS.

  1. Works in every line of work. Nice explained …though !:)


    February 20, 2012 at 9:26 pm

  2. […] of your head. Often problems are solved away from the screen, or in conversations with ducks or teddy bears. Tunnel vision is a dangerous trap in software […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: