Legacy Code — Professional¶
Martin Fowler’s strangler pattern replaces capability by routing; Kubernetes API migrations use served/storage versions and conversion; large databases use expand-contract schemas so mixed application versions remain compatible. These mechanisms make modernization a controlled operational process.
At 10× estate size, scarce expertise and test environments dominate. At 100×, dependency maps, regulatory constraints, and migration coordination become portfolio risks. Track hotspot risk, unsupported runtime exposure, incident share, change lead time, migration age, and old-path traffic.
Design and operations checklist¶
- Tie modernization to an outcome and risk.
- Discover dependencies and undocumented contracts.
- Establish characterization and production baselines.
- Introduce routing or abstraction seams.
- Migrate reversible slices with comparison telemetry.
- Fund old-path removal and knowledge transfer.
BASELINE -> SEAM -> PARALLEL PATH -> COMPARE -> SHIFT -> REMOVE
preserve behavior + rollback + accountable ownership
Test yourself¶
- Build a portfolio model for ten legacy systems competing for investment.
- How do you test a migration with undocumented consumers?
- Which metric proves the new path is operationally better?
- When should a rewrite be rejected?
Further reading¶
- Michael Feathers, Working Effectively with Legacy Code.
- Martin Fowler, Refactoring and Strangler Fig Application.
- Kent Beck, Tidy First?.