News for hackers. Stuff that matters.
Re:CUPID – the back story by elric on Sunday March 21, 2021 @01:07PM (#26531921)
> 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.

Re:CUPID – the back story by dvlsg on Sunday March 21, 2021 @01:34PM (#26532170)
> 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.

Re:CUPID – the back story by no-s on Sunday March 21, 2021 @02:27PM (#26532634)
>>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...

Re:CUPID – the back story by cratermoon on Sunday March 21, 2021 @01:48PM (#26532315)
> 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.

Re:CUPID – the back story by wizzwizz4 on Sunday March 21, 2021 @02:28PM (#26532644)
Ah, but that comment isn't software, is it?

[0]: https://esolangs.org/wiki/English

Re:CUPID – the back story by aroman on Sunday March 21, 2021 @01:59PM (#26532412)
Let's settle on it being a gradient from black to white.
Re:CUPID – the back story by andrewprock on Sunday March 21, 2021 @03:07PM (#26532968)
Well, the 0s are black and the 1s are white, except when it is the other way around.
Re:CUPID – the back story by elric on Sunday March 21, 2021 @02:08PM (#26532472)
Touché. "Only the Sith deal in absolutes" and all that.
Re:CUPID – the back story by cratermoon on Monday March 22, 2021 @01:05PM (#26543534)
Which, in using the word "only", is itself an absolute. I don't know if it's a winnable game.
Re:CUPID – the back story by drewcoo on Sunday March 21, 2021 @03:07PM (#26532972)
A 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.