Bears Quote by Brian Kernighan
“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.”
About This Quote
Source Book: The Practice of Programming, Brian Kernighan & Rob Pike, 1999
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.
Explain your code to a peer or object.
Themes
Mood
Type
When to use this quote
- pair programming
- code review
- teaching
- self‑debugging
- teddy bear exercise
Key Concepts
Questions to Reflect On
- How does verbalizing a problem change your perception?
- Can a non‑technical listener still help you debug?
May not work if the listener lacks technical context or you’re too embarrassed to articulate the problem.