How do you deal with co-workers who dont know about SOLID?

If they don't have an open mind about it, you'll probably have to wait until a real world example comes up that demonstrates the reason why those principles exist.

So in the situation you outlined above, you would probably have to wait until a change or bug fix is needed in that code where had it used the Open-Closed Principle in the first place, it would have been trivial or easier to change.

Alternatively, you could write up both solutions and compare them. (But that might not work well because they may just find their non-SOLID solution more appealing because that's what they wanted and expect in the first place.)

Otherwise I would suggest you apply SOLID principles where ever you can without causing much friction at work. SOLID is great but it doesn't mean much if the team can't work together. Maybe you can apply it to implementation details. Or if you're given leniency to write a module of code yourself without specific instructions/oversight from the senior dev, do it with SOLID. But from the sounds of it, I would not over-engineer it either. Don't introduce a dependency injection framework just to satisfy the "D". Don't build a tonne of helper classes just to satisfy the "S". You'll need to slowly coax your coworkers over by producing something that looks better but still familiar, otherwise they'll probably look at at and consider it confusing or over engineered or too "enterprisey" which will probably work against you. It'll have to be immediately understandable by them looking at it and hopefully not have them ask too many questions "why" it's done that way and just see it for its usefulness and elegance.

Alternatively, have you considered solving P=NP?

/r/csharp Thread