4 ms·
> It's no different to any other legacy refactoring project There are two approaches to a project like that, as you say, take something which works and iterati
by DougBTX 6y ago
> It's no different to any other legacy refactoring project
There are two approaches to a project like that, as you say, take something which works and iteratively make it better, or derive a specification from the project which works and create a new from-scratch implementation to meet that specification.
My experience with the "from-scratch" approach is that it is very easy to miss details in the specification that will only be found out later, so it is very easy to underestimate the amount of work required. Ironically, that contributes towards making it easier to kick off the project, as it looks like it will be easier and cheaper. Especially if there is a view to drop features in the new version, which is fine until the actual users find out about the plan.
Another issue is that the old system which is being improved is often actually still in use, and the users still want new features even while the new system is being developed. Either those requests can be rejected, or implemented twice (once in the new system, once in the old). When incrementally improving the current system instead, those new features may end up touching areas of the code that have already been improved, making them cheaper to implement, not more expensive.
Basically, I think you're right. Keep the current system working, and improve it without breaking it.
- selfhoster11 6y agoThe more I read about legacy (and actively maintained) project refactoring, the more firmly I find myself agreeing that the gradual replacement is the right way to go about things in nearly every case. Whether we like it or not, the old system is a source of truth about how things are done, so the only way to preserve this knowledge fully is to copy the whole thing as-is and then "restate" parts of that knowledge in a more organised/modern way by refactoring, leaving the rest in place.
- steveklabnik 6y agoIf you’re interested in this topic, you should read “How to work effectively with legacy code” by Michael Feathers.
- selfhoster11 6y agoIt's been on my reading list for a while, I'll take this as a reminder to read it :)
- grey-area 6y agoThat looks really interesting, thanks for recommending it here.