We'll refactor this next year anyways

https://programming.dev/post/12679593

We'll refactor this next year anyways - programming.dev

Have you ever been in an old house? Not old, like, on the Historic Register, well-preserved, rich bastard “old house”. Just a house that has been around awhile. A place that has seen a lot of living.

You’ll find light switches that don’t connect to anything; artwork hiding holes in the walls; sometimes walls have been added or removed and the floors no longer match.

Any construction that gets used, must change as needs change. Be it a house or a city or a program, these evolutions of need inevitably introduce complexity and flaws that are large enough to annoy, but small enough to ignore. Over time those issues accumulate until they reach a crisis point. Houses get remodeled or torn down, cities build or remove highways, and programs get refactored or replaced.

You can and should design for change, within reason, because all successful programs will need to change in ways you cannot predict. But the fact that a system eventually becomes complex and flawed is not due to engineering failures - it is inherent in the nature of changing systems.

the fact that a system eventually becomes complex and flawed is not due to engineering failures - it is inherent in the nature of changing systems

it is not. It’s just that there will be some point, where you need significant effort to keep the systems structure up to the new demands {1}. If find the debt-metaphor is quite apt [2]: In your scenario the debt accumulates until it’s easier to start fresh. But you can also manage your debt and keep going indefinitily. But in contrast to financial debt, paying of technical debt is much less obvious. First of all it pretty much impossible to put any kind of exact number on it. On the other hand, it’s very hard to tell what you actually should do to pay it off. (tangent: This is why experienced engineers are worth so much: (among other things) they have seen how debt evolves over time, and may see the early signs).

[1] …substack.com/…/the-openclosedopen-principle

[2] blog.pragmaticengineer.com/tech-debt/

The Open/Closed/Open Principle

First published June 2009. I still see folks making this mistake—”design good APIs”. Sure, fine, but what about when the APIs turn out not to be good? Or they were good but now they’re not? In addition to drawing boundaries between elements, we need to also be prepared to periodically re-draw those boundaries. I think this is difficult because re-drawing often crosses team boundaries, creating mis-aligned incentives (calling team needs the change but the called team has other priorities). I address cross-team design in the followup to

Software Design: Tidy First?