Slowly Making Headway
Today I think I'm turning the corner with the Rock Star developer that joined recently. Today he came over to say that there's a problem in a class collection that I had put together. Basically, there's a general interface to a table and both the table and views into tables implement this interface. That means that they can be "stacked" and one view can be placed on another to make a rather advanced view on the base data table. The key is that the tables are like database tables, and the views are like database views, so in some cases - like an aggregated view, it's impossible to set a value of the underlying data because it's aggregated. Same with database views.
Anyway, Rock Star wanted to say that the setValue() method worked in some cases and threw an exception in others and that was dependent on the implementation of the general table interface. He was saying that this was a bad design. I told him that there were methods in the interface to see if you could set values on this instance, and that if the method returned false, then not try to set them as it was going to throw an exception.
He tried to say that this was an inconsistency. "Not at all", I said. It may not have been how he would have one it, but there's nothing inconsistent about it. He then spent about 15 minutes trying to say how he'd do it - with multiple interfaces inherited from each other to make it clear what one instance was capable of having done to it. I pointed out that this idea would then lead to a ton of interfaces and then you're going to have a ton of methods returning the values cast into the right interface, or a bunch of if-then logic with instanceof tests to see what interface it was.
In the end he agreed that it was his inexperience with the classes that lead him to believe there was a problem. I felt as if we might have turned the corner. It would be nice if he learned that before he comes over to tell me how badly something is done he does the legwork to make sure it's not going to come back and bit him in the rump - just like today. I think he's got talent, he just needs to adjust his attitude to the rest of us and the development/deployment environment we have in place here.