jargon

Comparison

Boat anchorvsDead code

Boat anchor

the component is fully wired in, fully maintained, and used by exactly nothing, kept because it might be needed.

A piece of the system retained for a future use that has not arrived, still carrying maintenance, build time and dependency risk. It differs from dead code in intent — it was kept deliberately — which is what makes it harder to delete, because someone will defend it. The counter-argument is always the same: version control is where things you might need later belong.

Full entry →

Dead code

you changed the function, everything passed, and it turned out nothing had called it for a year.

Code that is never executed, or is executed and whose result is never used. It is more expensive than it looks: it is read during every investigation, updated during every refactor and upgraded during every dependency bump, all for nothing. Coverage tools and dead-code analysis find most of it, and the only reliable way to stop it accumulating is to delete on sight rather than comment out.

Full entry →

Related comparisons