Rule 11. Is It Twice as Good?
Every project eventually hits the natural limits of its architecture—you hit some problem that just doesn’t fit the way things work. Maybe you need to add a feature that can’t be expressed in your paradigm. Say you’ve got a filtering mechanism that lets you specify a set of criteria that all need to be met, and you run into a case where you need to OR
some criteria instead of AND
ing them.
Or the shape of the data has changed. You built the system to solve problems of some size, and over time it starts to be applied to problems of a different size or shape, and you’re running into existential performance problems.
It could be that things are just getting tangled. Your paradigm provides ways to tweak the core behavior of the system in special cases, which is one of the reasons it’s lasted as long as it has. But now the extension mechanism is used in every single case, not just special ones. Every use of the system is a hopscotch through different exceptional cases, and it’s hard for people to figure out whether something new works, much less how it works.
Maybe some bit of code is old enough that it just doesn’t fit with the rest of your codebase. You’ve got a bit of C code in your fairly forward-thinking C++ project, and you recoil at all of its hand-rolled pointer structures. It represents an older, alien way of thinking, and everyone wants to rewrite it in a more modern paradigm.
This sort of thing is natural and inevitable, and shouldn’t cause you ...
Get The Rules of Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.