Surviving a Legacy Codebase
summary
A live refactoring of a legacy Java service for a board‑game product showing how to regain control by adding characterization end-to-end tests (HTTP calls via RestAssured) to lock down behavior and reveal a bug where duplicate nicknames return 201 instead of 400. The refactor introduces a GoodGame domain object, moves business logic out of HTTP handlers, uses code‑coverage to identify safe vs risky areas, and demonstrates handling an external dice service dependency before adding more unit tests.
AI-written summary · about
chapters (11)
- 0:00Surviving legacy code
- 3:59Understand context first
- 7:13Legacy code analysis example
- 11:02Secure with characterization tests
- 18:14Test coverage tools
- 21:43Incremental refactoring
- 27:53Tech debt priorities
- 33:52Extract domain logic
- 37:43Handle external dependencies
- 42:46Legacy code principles
- 47:06Summary
related talks
01h 00mTesting Legacy Code & Refactoring Patterns
54mTesting in Legacy: From Rags to Riches
46mRefactoring Legacy Code guided by Simple Design
49mWorking with C++ Legacy Code
48mLegacy, for lack of a better word, is good
42mWorking Effectively with (Android) Legacy Code
16mSecuring Your Legacy Rewrite with Capture and Characterization Tests
01h 01mYou Can Test Anything
