We’ve all said we’d go back and clean it up later. Of course, in those days we didn’t know LeBlanc’s law: Later equals never.
As the mess builds, the productivity of the team continues to decrease, asymptotically approaching zero.
I, for one, love to see math concepts (“stochastic”, “exponentially”, “asymptotically”, “orthogonal”) and physics-envy (“LeBlanc’s Law”, “Goodhart’s Law”) applied liberally where they’re not just rhetorical filligree meant to bamboozle the dumb but also inaccuracies that end up hoodwinking the striver midwits who employ them for such purposes themselves. But I digress.
The Grand Redesign in the Sky
Eventually the team rebels. They inform management that they cannot continue to develop in this odious code base. They demand a redesign. Management does not want to expend the resources on a whole new redesign of the project, but they cannot deny that productivity is terrible. Eventually they bend to the demands of the developers and authorize the grand redesign in the sky.
The utility of “LeBlanc’s Law” illustrated in 2023:
# TODO: Refactor away from PGY as a param, use cohort_id instead. 10/10/18 -JD
# TODO: Eventually, we'll move this to an association, but since it will
# require some changes in behavior and a large migration, we will wait until
# after 07/01/2021 for the migration + refactor to be written. -JD 5/25/2021
# TODO: Extract this to a common Form Object base library. -JD 3/24/2021
# TODO: This is becoming increasingly important -- needs spec! -JD 10/3/2019
# TODO: Refactor once subscribers can have multiple programs. -JD 01/14/2019
As an aside: Bjarne Stroustrup’s comment is probably the best part of the book, accomplishing with elegance and efficiency what the book elaborates on laboriously:
I like my code to be elegant and efficient. The logic should be straightforward to make it hard for bugs to hide, the dependencies minimal to ease maintenance, error handling complete according to an articulated strategy, and performance close to optimal so as not to tempt people to make the code messy with unprincipled optimizations. Clean code does one thing well.