Cognitive Scaffold

Preparing your thinking workspace

arrow_back_ios_new
MENTAL MODEL · M1349

The Boy Scout Rule

The Boy Scout Rule
BusinessmediumManagement
Included
account_tree

Updated 2026-07-30

Loading revision record…

Summary

Leave the campground cleaner than you found it.

Definition

"Leave the campground cleaner than you found it." In programming, it means that every time you modify code, you should also fix a bit of the surrounding messy code, rather than just doing the current task. Scaffold use: a micro-habit against entropy. Don't wait for a "big cleanup"; through small optimizations during each action, continuously repay technical debt or management debt, maintaining the long-term health of the system.

How to use

A micro-habit against entropy. Don't wait for a "big cleanup"; through small optimizations during each action, continuously repay technical debt or management debt, maintaining the long-term health of the system.

Mechanism

The Boy Scout Rule advocates that every time you leave a piece of code (or system), make it a little cleaner than when you arrived. Through continuous micro-improvements rather than a centralized big cleanup, it curbs system entropy and gradually repays technical debt.

Practice

In progress 0/1

Practice this model in one real situation:

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

Cases

  • A developer refactors a nearby function while modifying a feature; the team cleans up a TODO during each review, keeping long-term debt manageable.

Common pitfalls

  • Using "fix as you go" to make large changes, causing unrelated modifications and regression risks. Waiting for "free time" to do a unified cleanup, debt keeps accumulating.
Sources

Source support: Explicit

account_treeGenealogyexpand_more

RELATED MODELS