5 ms·
> don't swing violently from "A is all good!" to "A is all bad!" Indeed. This clickbaity style of laying out arguments is not terribly constructive. Software i
by elric 6y ago
> don't swing violently from "A is all good!" to "A is all bad!"
Indeed. This clickbaity style of laying out arguments is not terribly constructive. Software is not black/white. It's entirely grey. And there's a lot of room for contextual nuance everywhere.
Principles like SOLID (and DRY, and YAGNI, etc) are principles. They are not laws. Principles are guidelines which can help you make solid (heh heh) decisions. They are subject to context and judgement.
If good software design were as easy as memorizing a couple of acronyms, we'd all be out of a job. But it's not. It takes practice and experience. Writers and academics can make things easier by presenting accumulated experience in principles and guidelines, but there are no silver bullets. It's unfair and pointless to expect SOLID (or anything else) to apply in any and all cases.
- dvlsg 6y ago> It's unfair and pointless to expect SOLID (or anything else) to apply in any and all cases. I think that's a big part of the problem, and how we end up with articles like this. A lot of developers do expect SOLID to apply to every case, and I've seen fine code get rejected in reviews because it wasn't SOLID enough.
- no-s 6y ago>>A lot of developers do expect SOLID to apply to every case, and I've seen fine code get rejected in reviews because it wasn't SOLID enough. Prescriptive principles without informed discretion. That is the problem, and it's not just software. "A foolish consistency is the hobgoblin of little minds." It's terrifying how easily a reasoned and seeming sensible polemic may be interpreted into a foolish oppression, even by otherwise rational folk...
- deleted 6y ago[deleted]
- cratermoon 6y ago> Software is not black/white. It's entirely grey entirely? There aren't parts that are black/white? That's seems a bit black/white.
- aroman 6y agoLet's settle on it being a gradient from black to white.
- elric 6y agoTouché. "Only the Sith deal in absolutes" and all that.
- cratermoon 6y agoWhich, in using the word "only", is itself an absolute. I don't know if it's a winnable game.
- wizzwizz4 6y agoAh, but that comment isn't software, is it? [0]: https://esolangs.org/wiki/English https://esolangs.org/wiki/English
- andrewprock 6y agoWell, the 0s are black and the 1s are white, except when it is the other way around.
- drewcoo 6y agoA thousand times this! Principles, heuristics, "best practices," and just generally good ideas are not absolute truth. SOLID is like hand washing. Please do it! Unless you have a good reason not to. The root of the "disprove a heuristic by a single counterexample" problem is a misunderstanding of logic. A heuristic is not a statement that universally all hands must always be washed. It is a milder claim that generally handwashing has proved useful via inductive means, so you should probably wash your hands if you want to minimize your risk. Any expert in a given field should know times when not washing hands has been justified. But by the same token, those people know that they should still recommend hand washing to the general public because they won't know when it's not justified. Wash your hands, please.