From 0% to Cleanly Refactored 100% tested code
summary
Guided demo on the Gilded Rose kata combines three techniques to go from zero tests to a refactored, working feature: add test commit revert and ApprovalTests to generate 408 combinatorial tests for full mutation-safe coverage, use coverage coloring to find dead paths, then apply provable refactorings (lift conditional, add explicit returns via scripts, automated extract/inline) to split logic. A conjured item is implemented to degrade twice as fast, tests pass, and the refactorings leave a provably safe, clearer code path.
AI-written summary · about
chapters (7)
- 0:00Start
- 8:57Combination Approvals
- 16:33Lift Conditional Refactoring
- 17:56If Statement
- 18:55Add Explicit Return Script
- 37:38Do You Squash these Commits before Pushing to Remote
- 39:32Axiom of Refactoring
related talks
01h 44mTUTORIAL: Refactoring without a net
01h 25mGetting a Handle on Legacy Code
31mGilding the Rose: Refactoring Legacy Code
35mRefactoring Frenzy - Don't settle for short term
48mA deep dive into the Gilded Rose
52mTest, Transform, Refactor
35mQuickly and Safely Refactoring Legacy Code
38mSurgical Refactoring of Non-Tested Code – A Worked Example
