Live data from Hacker News

Ask HN: Rewrite or Refactor?

news.ycombinator.com

11–12 of 12 posts

Re: Ask HN: Rewrite or Refactor?

#11
post #3

> I recently adopted a codebase (and a team) Are you in charge? How big is the team? Is it a startup? Is the software making money? How important are new features to make money / gain clients? Usually with a rewrite, you will end up implementing features in both codebases. This can slow you down a lot, kill team morale for those working on the old project, etc. First, move to a monorepo. Put all the old monolithic st…

Well I'm not in charge, but I think my input has a high influence in the decision making. The company is a multi billion dollar international multi, so cost is not really the issue here. It's more an organizational problem. Therefore I also don't think moving to a specific framework or a new design pattern will help us by a lot. It's more transforming the current state to _any_ consistent pattern with a certain level of quality. And I'm trying to figure out whether the team would benefit from a radical or iterative approach.

Re: Ask HN: Rewrite or Refactor?

#12
post #8

I'm old. I've seen this more times than I can count. There's always a whole lot of assumptions that just never quite pan out as expected, do they ? Rewrites always end up taking way more time and resources than anticipated, and you'll ultimately end up with something that has fewer features and not necessarily considered "better" by your users. Refactors on the other hand can get you some wins faster, but will probab…

Yeah, basically I share those doubts. Still I'm still considering rewriting might be worth it at this point still. The question why it came to be is probably mismanagement, changing business requirements, a very inconsistent and highly volatile "microservice" backend made across hundreds of developers across the globe. Corporate shenanigans you name them. So the software being in a weird environment is nothing I can change. I just want this piece, the stuff me and my team works with to still be able to produce new stuff and be as much of a pleasure to work with as possible.

Some notes that make me actually favor a rewrite:

* Despite of being a considerable large codebase not a single piece of software made it past the "just for presentation" purpose - no customers or production software involved. (Also parts of it are infact already cancelled by management and therefore obsolete)

* Team morale is very low as practically any task currently means dealing with a ton of cruft

* We actually piled up a refactoring backlog, that grew so big it practically will touch everything. Like obsoleting an outdated store package that contains 70% of the business logic. Migrating to vue3 will pretty much touch every view as our class decorator syntax stuff won't be straightforward to migrate. Then theres not much left.

Post reply on HN