
- By María Dueñas
- ·
- Posted 19 May 2023
Refactoring Databases: Strategies to minimise risks
What is database refactoring for? What are the risks involved and how can we avoid them? Is it really beneficial to our systems? Cameron Raw,..
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.
What is database refactoring for? What are the risks involved and how can we avoid them? Is it really beneficial to our systems? Cameron Raw,..
Join Danish Javed and Nick Choudhry, Software Craftspeople at Codurance, as they work through our Tennis kata using Python. In this screen kata they..
With Test-Driven Design’s focus on testing (it’s all in the name), it’s easy to fall into common mistakes and bad practices which can often waste..
Join our newsletter for expert tips and inspirational case studies
Join our newsletter for expert tips and inspirational case studies