Gilding the Rose: Refactoring-Driven Development
summary
Walks the Gilded Rose kata from a tangled C# updateQuality method (16 ifs, 3 elses, quality assigned up to four times, indentation level 6) to a tested, incremental refactor: replace counting loops with foreach/range, shrink conditionals, extract a quality adjustment value computed once, clamp with min/max, add conjured items via tests, then replace hard‑coded string checks with regexes and a rule table (find first matching rule using LINQ) to yield a compact, declarative rule engine that preserves behavior while making future changes trivial.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 1:27Gilded Rose origins
- 12:26Legacy system analysis
- 21:30Code structure analysis
- 31:59Refactoring purpose
- 43:58Meaningful tests
- 51:19First refactoring steps
- 1:00:05Conditional logic refactor
- 1:15:18Refactoring steps
- 1:24:23Paradigm shifts
- 1:32:23Continuous refactoring
related talks
35mRefactoring Frenzy - Don't settle for short term
42mGilded Rose Refactoring Kata
32mFive Lines of Code
48mRefactoring from Good to Great - A Live-Coding Odyssey
48mThree Principles To Bring Your Legacy Code Into the Future
39mAll the Little Things
01h 18mKeynote: Refactoring Superpowers: Make Your IDE Do Your Work, Faster and More Safely
53mEnforce Coding Standards in .NET: Overcome Broken Window Syndrome
