load-bear·ing
/ˈloʊd ˌbɛr.ɪŋ/ (LOHD bair-ing) adjective informal
- Describes a piece of code, often odd-looking, that something else silently depends on, so removing it breaks things. The commented 'TODO: remove' timeout turned out to be load-bearing: without it, the payment webhook raced the order insert.
Origin
From building construction, where a load-bearing wall carries the weight of the structure above it.
In practice
If a line is load-bearing, say so in a comment that explains the load. Tests that pin the behaviour stop the next person removing it.
Say to your AI
Before deleting anything that looks unused, search for every caller and explain what would break. List what you couldn't verify.
In plain words
- we removed it and everything broke
- this weird line is actually important
- don't touch that, things depend on it
- the hack is holding everything up
See also Chesterton's fence Hyrum's law technical debt