Design patterns·The named ways it goes wrong
you changed the function, everything passed, and it turned out nothing had called it for a year.
Dead code
Also calledunreachable code, unused code
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.