Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M4137

Rubber Duck Debugging

Rubber Duck Debugging
Learn & MetacognitionHigh supportCognitive Science
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 a programmer cannot debug their code, they explain the code line by line to a rubber duck on the desk. Often, during the explanation, they discover the bug themselves. Scaffolding effect: externalizing thinking. When stuck, find a "listener" (even a duck) and state the problem aloud. The linear reorganization of language forces the brain to clarify logic, making tacit knowledge explicit.

How to use

Externalize thinking. When stuck, find a "listener" (even a duck) to state the problem. The linear reorganization of language forces the brain to clarify logic, making tacit knowledge explicit.

Mechanism

Same as rubber duck debugging: externalizing the explanation forces clarification of logic, making hidden errors explicit.

Practice

In progress 0/4

Practice this model in one real situation:

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

Cases

  • When stuck, explaining once locates a null pointer; before writing documentation, verbalize first.

Common pitfalls

  • Thinking that a real person is required; being embarrassed to "talk to an object" and missing the benefit.
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