How To Do Refactoring the Right Way
Refactoring is not an option. It is a necessity.
Refactoring is essential for the quality of software products. There is no way around it. You may take steps to avoid or postpone big refactorings with proper application design using appropriate software paradigms. Still, you will never be able to mitigate the need for refactoring completely.
There are multiple reasons for that:
- Change of requirements
- New technologies
- Scaling
- Prototyping
- Deadlines
- Wrong abstractions and mistakes in software design
The idea that you would build on previously programmed without ever reconsidering them is nonrealistic. We should count refactoring as part of our daily jobs. Otherways management will blame us for prolonging deadlines and inability to add simple features. So it is on us to take responsibility for the state of code and don’t allow anyone to take “shortcuts.”
How to introduce refactoring?
You could do minor refactorings in regular tasks (scrum) without noticing management, but that is not always the case. You can also make some more significant refactoring as a prerequisite for the next…