If you are going to jump on someone, at least make it a worthwhile endeavor.
At least do it when the person will actually learn from it. Don’t do it just because you are in a dire mood.
I used to work under a couple of people who were “past masters” at shooting down developers for no constructive reason. An example follows.
One day, when we were doing a proof of concept, I instantiated an object in a constructor to save the time of hooking up an IOC container. I then got jumped on by the team-lead when I explained that, “I used poor man’s dependency injection”. I can’t even remember the tirade, because there was nothing to be learnt from it. It was more of an exercise in solipsistic, self-indulgent ranting than anything. Somebody’s ego gave themselves the green light to knock me with their big swinging intellect.
I am reminded of this, because I just read this article by the great Dino Esposito. Let me just quote a paragraph from that article:
Because the controller class clearly has a dependency on the orchestrator, you might want to design the controller class to support dependency injection. Therefore, as a first step you abstract the orchestrator to an interface. The code above uses the poor man’s dependency injection schema (an overloaded constructor); feel free to rewrite that code to use your favorite IoC framework.
I wonder what Dino would have said if he had been on the pointy end of the ridiculous rant which I was exposed to.
People judge you at work. For good or bad. So if you are going to start swinging your ego around with no real benefit to the project, the team or the junior developer in question, prepare to be judged and remembered. Remembered as that person who didn’t really know that much, but who always had to service their insecurity with useless rants of no worth.