Posted in 2024
Gilded Rose Refactoring Kata
- Sep 27, 2024
Not too long ago I tried “Gilded Rose Refactoring Kata”. It is an excellent exercise, and I highly recommend to try it. I’ve also seen many people sharing great solutions on GitHub and in personal blogs. However, almost all of the solutions I’ve seen did not reflect the reasoning about “why?” and “how?”. Why the current code needs to be refactored? How do I want to change code? How do I want to go about changing code? Why I refactored the code in this way and not another? So this post is my reflections on the “why?” and “how?” which I hope you will find useful and/or entertaining.
The kata and its test is kindly provided by Emily Bache and can be found on emilybache/GildedRose-Refactoring-Kata. I highly encourage to give it a go, as I had a lot of fun working on it. The kata goes like this: