Refactoring - The Gilded Rose Kata

03 Mar 2022 . code craft . Comments #screencast #code kata #refactoring #java

The Gilded Rose Kata

Code katas provide an opportunity to practice our software development skills, recognize patterns, and learn how to apply techniques. In general, we professional software engineers don’t spend enough time practicing. The Gilded Rose Kata is one of my favorites. It helps build skills necessary for successful refactoring, to make small incremental changes relying on automated refactoring tools as much as possible.

Follow along as I refactor the Gilded Rose code to eliminate the code smells identified at the beginning of the screencast. My goal was to keep the screencast to an hour or less. I deferred a few design decisions and refactorings at the end. However, the most significant improvements made adding the new Conjured Inventory Item a simple, two-minute code change. The Gilded Rose Kata is an example of Kent Beck’s advice: