S -> don’t write spagetti code.
O -> If you want your code to be extendable, explicitly choose the parts that can be extended so you can predictably deal with new functionality.
L -> If you extend code, don’t screw it up so the code doesn’t work the same way. Extensions shouldn’t break stuff.
I -> Make your interfaces tiny.
D -> Dependency inversion to make things testable; because testing is good right?
Well, DI is always a bit contraversial, but at least its easy to say why its good; its just a bit of pain to setup.
The interface segregation has always been the odd one out for me.
One method interfaces? I know the golang best practice folk love that stuff too, but I just find it irritating when I have to work on code that uses it extensively.
Anyone actually explain tangibly why its a good idea?
If you’re using it to defend against workmates who might abuse an interface with too many functions on it... well, thats kind of lame imo.
Sure, mega-interfaces are bad... I guess... but so are objects with massive sets of methods on them. Why the special focus on interfaces?