Judgement… hard to teach
ctodx posted a blog entry of a discussion on teaching a team about design, specifically interface inheritance over implementation inheritance. I have to comments.
I am sure that judgement can be easy to teach, maybe even in some cases objective not subjective. I think the key here is to bring unit testing into the discussion. If a criteria of good design is testability then things get a bit easier. Well almost, that statement assumes that you value unit testing and are practicing it. Well designed test subjects are much easier to test than poorly designed test subjects. To take the example of Single Responsibility Principle (SRP), a test subject with many responsibilities is much harder to test than one with fewer. This is something that the developers with out much design experience or good design judgement can feel. If they are responsible for the testing then they are likely to be more interested in learning how to make things easier to test. Ahh motivation. Now you have instilled motivation and can use that as a fulcrum marinate your team in the design principles.
Interface inheritance is much easier to mock. The point of implementation inheritance is to share code.