Skip to content

Another effective [debugging] technique is to explain your…

“Another effective [debugging] 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…” quote by Brian Kernighan
Download Open image
“Another effective [debugging] 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

About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

Explaining code aloud forces you to clarify your thinking, often revealing bugs you missed while silently reviewing.

In simple terms: Talking through code helps spot errors.

Key Takeaway

Explain your code to a peer or object.

Themes

communication debugging learning

Mood

reflective lighthearted practical

Type

advice anecdotal educational

When to use this quote

  • pair programming
  • code review
  • teaching
  • self‑debugging
  • teddy bear exercise

Key Concepts

metacognition self-explanation error detection

Questions to Reflect On

  • How does verbalizing a problem change your perception?
  • Can a non‑technical listener still help you debug?
A Different Perspective

May not work if the listener lacks technical context or you’re too embarrassed to articulate the problem.

★ ★ ★ ★ ★ No ratings yet

More by Brian Kernighan

Explore all 21 Brian Kernighan quotes

More Bears quotes

Browse all 4,111 Bears quotes