Hacker News new | ask | show | jobs
by hinkley 1308 days ago
> you think it needs a scratch rewrite rather than a refactor, you're unlikely to have learnt enough within that gap of time to make the rewrite significantly better than a refactor.

Relentless Refactoring replaces the ship piece by piece while it's under way. If you are effective at it, you can effectively (both definitions) rewrite the entire app with few people being any the wiser.

If you are not good at decomposing a problem into digestible, coherent steps, then you are also lousy at Relentless Refactoring. If you can't decompose the problem, your top-down rewrite is statistically guaranteed to fail. Someone somewhere will get lucky, accidentally beating 1:4 odds over and over for 50 failure points, but that person will probably not be you.

The people who can Relentlessly Refactor don't need to ask for a top-down rewrite. They just get down to doing it. Therefore most of the people who ask for one are incapable of taking advantage of such permission.

Ultimately, the only people who ask for a top-down rewrite are the people who don't deserve it. They believe in do-overs instead of doing the hard work of removing obstacles. They believe in the Second System (without the attendant Syndrome), not in observing and adapting to new information as it becomes available. They have, in essence, trained themselves to continue to misbehave in the face of new wisdom. They will repeat that behavior during the rewrite.

1 comments

I enjoy Relentess Refactoring as much as the next guy, but one dimension here is that it is much easier to do in a headless app (or in the backend) than in an app with a major UI. At some point there must be a complete switch from the old UI to the new UI, and that step is extremely complex. It also invites a big rewrite, in an almost irresistible way - "since we'll change the UI, let's just do it from the ground up".
The main lesson of the CI/CD era is that pain is information and ignoring it until later just makes things worse.

"Let's replace the whole UI at once" and "Let's replace the whole app at once" are bandaid-ripping activities, and the point of ripping off a bandaid is to get it over with before your pain receptors have a chance to tell you what an asshole you are right now. I'm sure most people have at least one experience, of their own or of someone they know, where ripping off the bandaid took a chunk of skin with it, possibly creating a bigger wound than the bandage originally covered.