Getting a Handle on Legacy Code
summary
Starts with the Gilded Rose kata, adds support for conjured items that must degrade quality twice as fast, and proves it with focused specs plus Golden‑Master checks using the approvals gem. Uses SimpleCov to drive tests to 100% line coverage briefly, runs flog to show complexity falling (update_quality ~155 → ~45), extracts methods (update_item, increase/decrease_quality), and commits baby‑step refactors. The feature is implemented and tests pass, leaving the code measurably cleaner and the behavior verified.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:13Workshop Setup
- 2:59The Spec: Can We Trust It?
- 4:19Workshop Structure
- 6:45The Legacy Code Algorithm
- 8:51Mob Programming Exercise
- 17:44Golden Master Testing
- 35:54Cleaning Up the Code
related talks
31mGilding the Rose: Refactoring Legacy Code
48mA deep dive into the Gilded Rose
43mFrom 0% to Cleanly Refactored 100% tested code
01h 44mTUTORIAL: Refactoring without a net
39mAll the Little Things
23mLoving Legacy Code
39mDown The Rabbit Hole: An Adventure in Legacy Code
35mRefactoring Frenzy - Don't settle for short term
