In software, dead code is inventory waste: unused functions, commented-out code, and inactive feature flags consume cognitive resources and add maintenance burden without contributing to current work. section 7.2
Table 7.1 Code smell to TIMWOODS mapping
|
Code smell
|
Waste
|
How it creates waste
|
Flow impact
|
|
Long methods
|
Overprocessing
|
Must read 500 lines to change 3
|
Developers process 497 unnecessary lines per change
|
|
Duplicate code
|
Overproduction
|
Same rule implemented multiple times
|
Changes require hunting all copies; some get missed
|
|
Dead code
|
Inventory
|
Unused functions, commented code, inactive feature flags
|
Cognitive load, maintenance burden, confusing intent
|
|
Excessive branching
|
Defects
|
Nested conditionals create combinatorial complexity
|
Impossible to test all paths; bugs hide in untested
branches
|
|
Tight coupling
|
Waiting
|
Dependencies prevent parallel work
|
Changes ripple; testing requires full object graph
|
|
Unused abstractions
|
Motion
|
Premature generalization creates indirection
|
Developers navigate abstractions to find actual behavior
|
|
Overengineered patterns
|
Extra processing
|
Several classes for single-function jobs
|
Every feature change touches six files
|
|
Magic numbers
|
Waiting
|
Undocumented thresholds and constants
|
Developers investigate intent; changes break invariants
|
|
Poor naming
|
Motion
|
Variables named temp, data, and result
|
Developers re-read code to understand the purpose
|
|
No tests
|
Waiting
|
Manual verification required
|
30-minute deploy/test cycles vs. 2-second test runs
|
The mapping contrasts inventory waste with other code-smell categories and shows its impact on flow. section 7.2
