
- By Liz Baker
- ·
- Posted 04 Feb 2023
It’s Kataday – String Calculator
String Calculator is a great follow up Test-Driven Development (TDD) kata to two of our favourite katas; Fizz Buzz andLeap Year.
Sometimes, rewriting and modernising code just isn't an option. When this happens, refactoring is one of the best options.
James Mason, Software Craftsperson at Codurance, in his recent blog Refactor before you rewrite, looked at the benefits of refactoring.
Being able to enter a totally unknown area of code, understand it, work with it and extend it, is a valuable coding skill.
James recommended the Gilded Rose kata as a great way to practice refactoring.
I wholeheartedly recommend spending some time working through the Gilded Rose kata using the approach described while making sure to stick strictly to the defined rules. It’s a great, if not slightly contrived example of refactoring legacy code.
You won’t fix everything that's wrong with this code and that's ok. After the most complex part of the system looks a little better, the rest becomes trivial. If after working through the kata, you are still not sold on the approach, try doing it again, but add the “conjured items” feature first. Which approach did you prefer?
The Gilded Rose kata is aimed at extending the skills of the competent developer focusing on Property Based Testing and Legacy Code.
Getting set up can be the roadblock to starting a kata. In our screenkatas you can join our Software Craftspeople and let them show you how to set up your repositories for Java, PHP, Python and Typescript. For other languages, check out our guide on GitHub.
Love our #kataday challenges? Then find them all here and don't forget that our Katalyst portal is filled with programming problems to expand and sharpen your coding skills.
String Calculator is a great follow up Test-Driven Development (TDD) kata to two of our favourite katas; Fizz Buzz andLeap Year.
This week, Emmanuel Valverde has set us another new kata to work through. Building on last week's kata, ATM machine, he has set us the task of..
This week, Emmanuel Valverde has set us a new kata to work through. Using the knowledge of Test-Driven Development (TDD), that you have been working..
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.
Join our newsletter for expert tips and inspirational case studies
Your welcome email is on its way! You can pick the emails you’d like to receive by clicking the link to the Preference Centre.