Software must change to remain useful. The majority of software budget in large companies is devoted to evolving existing software, not developing new software.
- Business and technology changes drive evolution.
- Development and maintenance are increasingly blurred.
- Most systems evolve rather than being completely new.
Life-Cycle Stages
- Evolution
System in operational use. New requirements proposed and implemented. - Servicing
Only bug fixes and environment adaptations. No new functionality. - Phase-out
Software may still be used but no further changes are made.
Types of Maintenance
- Fault repair
Correcting deficiencies in how the system meets its requirements. - Adaptive maintenance
Changing the system to operate in a different environment. - Perfective maintenance
Modifying the system to satisfy new or changed requirements.
Lehman’s Laws
| Law | Description |
|---|---|
| Continuing Change | A program in real-world use must change or become progressively less useful. |
| Increasing Complexity | As a program evolves, its structure becomes more complex. Extra resources needed to preserve simplicity. |
| Large Program Evolution | Program evolution is self-regulating: size, release intervals, and errors are approximately invariant per release. |
| Organizational Stability | Development rate is approximately constant over lifetime, independent of resources devoted. |
| Conservation of Familiarity | Incremental change in each release is approximately constant over lifetime. |
| Continuing Growth | Functionality must continually increase to maintain user satisfaction. |
| Declining Quality | Quality declines unless the system is modified to reflect changes in the operational environment. |
| Feedback System | Evolution processes are multiagent, multiloop feedback systems. |
Reengineering
Re-structuring or rewriting part or all of a legacy system without changing its functionality. Applied after maintenance costs have risen. Uses automated tools. Lower risk and cost than full redevelopment.
Refactoring
Continuous improvement throughout development and evolution. Slows structural degradation without adding functionality.
Common bad smells that prompt refactoring:
- Duplicate code
- Long methods
- Switch statements
- Data clumping
- Speculative generality
Legacy System Strategy
| Quality | Business Value | Strategy |
|---|---|---|
| Low | Low | Scrap the system |
| Low | High | Re-engineer or replace |
| High | Low | Replace with COTS or scrap |
| High | High | Continue with normal maintenance |