Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1313

Magic Number

Magic Number
Learn & MetacognitionHigh supportCognitive Science
Included
account_tree

Version 1.0.0 · Updated 2026-07-30

CORE DEFINITION

Refers to specific numbers used directly in code without explanation of their meaning (e.g., if x > 30). Good practice is to define numbers as meaningful constants (e.g., MAX_USER_LIMIT = 30).

SCAFFOLDING EFFECT

psychology

Reduce cognitive load

Enhance explicitness. In work and life, do not throw out conclusions without context (magic numbers), but explain the underlying logic and definitions (constant names). This greatly reduces the cost of understanding and maintenance for others.

anchor

Anchor fast decisions

The 'magic number' most commonly refers to Miller's (1956) finding that human working memory can hold about 7±2 chunks at once. Another meaning is the particularly stable proton/neutron numbers in nuclear physics (2, 8, 20...). Both refer to 'a number that happens to be critical'.

MINIMUM ACTION

In progress 0/3

Practice this model in one real situation:

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

Source support: Explicit

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

RELATED MODELS