Prefactoring: Clear the Way for Your New Feature

19 points by raymii


kornel

This is the best way to incrementally clean up tech debt in a codebase.

mw

One of the simplest and best techniques for keeping a codebase maintainable.

mdaniel

Yeah, sure, if the prefactor-candidate change fits in a tweet I'm not sure that even qualifies as tech debt

But "oh, shit, we modeled the relationships incorrectly and now it's making everything else hard" (a) won't fit in a tweet (b) won't be prioritized because the old model works just fine

It's the age old gap of "product owners do not experience implementation pain." It's actually true in real life, too, when pain signals for future bad outcomes are not strong enough to cause 18 year old you to save for retirement. YAGNI until you do and now it's a fire

pyj

If you're in an unfamiliar part of the codebase, the code review for a "prefactor" can also be a tacit approval for the testing and design methods of the desired follow up change.