4 ms·
I think the intuition that, in a large enough system, simple new features (from business pov) should be easy to implement is justified. So I always try my harde
by liviurau 4y ago
I think the intuition that, in a large enough system, simple new features (from business pov) should be easy to implement is justified. So I always try my hardest to agree. While the code is messy, there must be elements of what I need to implement for a new feature already in there somewhere. Somebody solved a similar problem, or the feature would be too novel and quite divorced from the rest of the system to call it simple. I search for those elements first. Write some tests around them, extract functions/methods, classes, modules, services , whatever really, with those elements. That is my 'refactoring'. Now I reassembly those elements for the new feature. This is usually done with just a few more lines of code. I am very suspicious of refactoring that does now have a new feature implementation at the end of it. I am very suspicious of developers that ask for refactoring iterations. They end up rewriting at least parts of the system. And that, some of us agree, is the worst thing you could do.