Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • I'm glad you mentioned tests, that was honestly my first thought too. On the plus side, the original author is still at the company, and management has tasked the two of us to get this codebase under control, and ready for production this Summer, as well as ensuring that we can maintain and run it for years to come. I've been told to do whatever necessary to accomplish this. I'm thinking there are 2 approaches, a) rewrite from scratch, or b) as you stated, refactor small parts over time. It seems to me though, that b) would take a tremendous amount of time. Commented Feb 18, 2020 at 3:01
  • 1
    @Kyle My sympathises. As for complete rewrites, if it took N years to write a piece of software the first time, what are the chances that this is the universe in which the second attempt takes just six months? Burning it to the ground creates a vacuum, and vacuums take an enormous amount of work to maintain. The pressures that caused that software to be created in the first place still exist, and are still demanding change over time. This leaves a hole, or a game of catch up. Taking the refactor road is perhaps more gruelling but it still leaves you with working software after each change. Commented Feb 18, 2020 at 5:15
  • 1
    @Kyle: There might a third strategy between "rewrite from scratch" and "refactor small parts": set up a new empty project, and try to "migrate" the old code feature by feature into the new project. For each feature added, write tests and make it production ready. Whenever a feature is complete, release into production. That way, you can show real progress to your superiors, even if you don't get the full product running til summer. Of course, this means you see a sensible way of splitting the product into smaller, releasable parts, Commented Feb 18, 2020 at 9:12