Software Entropy
The tendency of software systems to become increasingly disordered and complex over time without active maintenance.
Also known as: Code Entropy, Software Decay, Software Rot
Category: Software Development
Tags: software-engineering, code-quality, maintenance, principles, architecture
Explanation
Software entropy is the observation that software systems naturally tend toward disorder, complexity, and decay over time. The term borrows from thermodynamics, where entropy measures the degree of disorder in a system. Without deliberate effort to maintain order, codebases degrade.
## How entropy increases
- **Feature additions** - Each new feature adds complexity and potential interactions
- **Quick fixes** - Patches and workarounds that bypass proper design
- **Changing requirements** - The original architecture drifts from what the system actually needs
- **Team turnover** - New developers may not understand original design intent
- **Dependency rot** - Libraries evolve, deprecate APIs, or introduce breaking changes
- **Copy-paste programming** - Duplicated code that diverges over time
## Manifestations
1. **Increasing bug rates** - More defects per change as the system becomes fragile
2. **Slower development** - Simple changes take longer as developers navigate complexity
3. **Knowledge silos** - Only certain developers dare to touch certain parts
4. **Fear of refactoring** - The system is too fragile to improve safely
5. **Accumulating workarounds** - Layers of patches on patches
## The second law of software
Ivar Jacobson formulated this as: 'All software systems, left unmaintained, tend toward increasing entropy.' This is sometimes called the Second Law of Software Thermodynamics. Unlike physical entropy, software entropy can be reversed through active maintenance, refactoring, and disciplined engineering practices.
## Counteracting software entropy
- **Refactoring** - Regularly restructure code to improve design
- **Boy Scout Rule** - Leave code better than you found it
- **Automated testing** - Safety net that enables confident changes
- **Code reviews** - Catch entropy-increasing changes before they merge
- **Architecture governance** - Ensure changes align with system design
- **Technical debt management** - Track and allocate time to address debt
- **Documentation** - Preserve design intent for future developers
Related Concepts
← Back to all concepts