When rewrites make sense
- When it is the quickest way to deliver value to users, and reasons that led to the current mess are no longer applicable (things are always a mess, but often for good reason - your rewrite will be a mess too)
- These reasons should not be reliant on estimation ("I'm a better developer" / "it's probably not that much work" - we tend to be too optimistic)
- Examples of valid reasons:
- it was initially written to support a use case that is no longer relevant, the code needed to support that use case causes a lot of overhead, but it's not easy to identify what that code is.