Hacker News new | ask | show | jobs
by goto11 2443 days ago
Is the current system is so badly architected that it cannot be refactored gradually or rewritten piecemeal? Then the forces which caused these problems will also be in effect during the rewrite, so it will end in the same place when it reaches feature parity.

I can only think of a few places where a full rewrite is justified:

* You lost the source code

* The application is almost purely integration with some 3'rd party platform or component, and you need to replace that platform. (E.g. you are developing a registry cleaner and need to port it to Mac)

* You don't have any customers or users yet and time-to-market is not a concern.

* You are not a business and are writing the code purely for your own enjoyment

But these are business level considerations. For individual developers there may be compelling reasons to push for a rewrite:

* You find it more fun to work on green-field projects than to perform maintenance development.

* The new platform is more exciting or looks better on the CV than the old

1 comments

That's not necessarily true. Those forces will still be there but the learning of what not to do has also been had. People can improve and learn over time.
Yes but if you have improved over time, then at least the most recently developed parts of the code would be high-quality and would not need rewriting. So you would only need to rewrite some encapsulated legacy parts of the codebase, which is completely different from a full rewrite.