| I have participated in a handful of rewrites. Most of them were indeed unnecessary or harmful. However, "X2" was definitely an example of an appropriate rewrite. It had the following conditions: * The existing code "X" was the product of an early-phase startup which hadn't yet figured out what it was going to do. "X" already existed at the point we were still asking questions like, "Who is the customer?" with possible answers like "The NSA and similar entities" even though it eventually became a consumer product - and so obviously it was very flexible but had also been greatly distorted from its original conception to produce a product we were actively selling. * The existing code was developed and maintained by a third party team. So the knowledge of how that system worked was something we'd need to absorb anyway to bring it in-house. Existing code reflected house style of that team, and X2 would be in our style. * It was modestly sized. I think our plan said our small team (less than half-a-dozen people, not all of them available for this full-time) would rewrite it in one calendar year, with an MVP in maybe six months and from there simultaneously copying less important features from "X" and also new want-to-have features to get the finished "X2", that's roughly the timeline we followed. * I was pretty confident we could execute from the initial description of the work to be attempted. I went into a meeting assuming (as I always do in all-hands meetings) that I'd get fired, and came out thinking I should brush up my Java (the chosen language for "X2") but it seemed very possible. * The non-technical leadership actually wanted a new system. "We need a new pig" is how it was explained back to me by the CEO. (From "Lipstick on a pig" the idea that superficial changes to a product can't really disguise its flaws) so there was buy-in of this idea and nobody yelling at us about why the "X2" MVP doesn't deliver most of the things "X" didn't have yet. [This software, and its predecessor, had code names but somebody let me name the successor software and I have no imagination so although it wasn't literally "X" and "X2" that's about how similar the code names were]. |