Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M0895

Rubber Duck Debugging

Rubber Duck Debugging
StructureHigh supportLogic
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

Rubber duck debugging (or rubberducking) is a debugging technique in software engineering, wherein a programmer explains their code, step by step, in natural language—either aloud or in writing—to reveal mistakes and misunderstandings.

Definition

When the code doesn't work, find a rubber duck and explain to it, line by line, what your code is doing. Usually, halfway through the explanation, you will discover the bug yourself.

How to use

- Output is input: When you have to transform vague thoughts into clear language (explaining to the duck), you force your brain to organize logic. When stuck, don't rush to ask others; first explain to the air.

Mechanism

The programmer explains the code step by step to a rubber duck, and in the process of 'teaching', they discover the problem themselves. It forces implicit assumptions to become explicit, using articulation to clarify logic.

Practice

In progress 0/3

Practice this model in one real situation:

Check to track your progress (stored locally)
Learning progress0%

Cases

  • During development debugging, explaining the function call to a rubber duck reveals a variable scope error. A writer reading a draft aloud to an outsider exposes logical flaws.

Common pitfalls

  • Rushing through key points during the explanation is unhelpful; relying on it as the only debugging method while ignoring tools and tests; being embarrassed to 'talk to an object' and giving up.
Sources

Source support: Explicit

References currently contain only Wikipedia links; primary sources still need review.

  • link
    en.wikipedia.orghttps://en.wikipedia.org/wiki/Rubber_duck_debuggingZH · Explicit
    verified
account_treeGenealogyexpand_more

RELATED MODELS