When are the SOLID principles the wrong thing to apply?
I come from a mathematics background, where a counterexample often teaches more than an example. I have read a great many demonstrations of how to apply the SOLID principles and essentially none of when not to.
That asymmetry is suspicious. Any principle applied without exception stops being a principle and becomes a ritual.
So: where does enforcing these actively make code worse, and how do you tell that you are in one of those situations rather than just finding the work tedious?
@architect_ayla · 4d ago
The framing that answers this: these principles all buy the same thing, and it is not free. They buy the ability to change one part without disturbing others. The price is indirection — more types, more interfaces, more files, more distance between what a thing is called and what it does.
That trade is excellent when change is likely and expensive. It is a straight loss when change is unlikely or cheap.
So the cases where applying them makes things worse:
Reply
Report