Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M6311

Stub

Stub
StructureHigh supportLogic
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

Temporary code used to simulate a module or an external interface that has not yet been developed.

Definition

Temporary code used to simulate modules or external interfaces that have not yet been developed. It does not implement real functionality, but returns preset fake data to test the caller's logic. Scaffolding role: Scaffolding for modular advancement. When your work depends on others (because they haven't finished), don't wait. Write a "stub" (assume others have finished, return ideal results), and first get your own logic working. Don't let external blocking become your excuse.

How to use

Scaffolding for modular advancement. When your work depends on others (because they haven't finished), don't wait. Write a "stub" (assume others have finished, return ideal results), and first get your own logic working. Don't let external blocking become your excuse.

Mechanism

A stub is a placeholder implementation for modules that are not yet implemented, returning fake data or no-op, allowing the system to be integrated and tested early. Placeholder enables parallelism.

Practice

In progress 0/4

Practice this model in one real situation:

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

Cases

  • When frontend and backend are developed in parallel, frontend uses mock stubs; test doubles in testing; interfaces before implementation.

Common pitfalls

  • Stubs not replaced for a long time lead to false positives; stub behavior deviates from reality causing misjudgment; ignoring maintenance cost of stubs.
Sources

Source support: Explicit

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

account_treeGenealogyexpand_more

RELATED MODELS