The following strategies might help:
- Explain why you are s://forum.tuteehub.com/tag/right">right
- Ask him to explain why he is s://forum.tuteehub.com/tag/right">right
If he continues to be overbearing, you might also remind him that you have more experience than he has, and that management has entrusted you with teaching him. And if even that doesn't cause him to respect your judgment, you might actually have to involve management, because he has started to disrespect their judgment as well.
Here are some ways you might be putting this into practice:
J: Your code is too complex!
S: Really? What makes you think that?
J: I don't understand it!
S: What don't you understand about it?
...
J: Your method names are too verbose!
S: I find descriptive names helpful, because they allow me to tell at a glance what the method does. Besides, with a good IDE is not is if I had to type them by hand.
J: But my professor uses much shorter names!
J: Yes!
S: Might he not have enough room for longer names on his slides, since they have to be in large font to be readable from the back of the auditorium? Our code only needs to be readable from the chair in front of our monitor, and our 30'' monitors have plenty of room for some extra characters, you know ...
J: Oh.
...
J: Your code isn't documented!
S: How so?
J: There are no comments! Our professor says we should write plenty of comments!
S: Ah. Yes, that's what they tell you in first year so the assignments will be easier to mark. Next year, they'll start teaching how to write code that can be understood even without comments. You see, widespread comments are like training wheels, useful for beginners, but a pointless hindrance to professionals. I don't mind you using them for now, but you will need to learn to get by without them soon.
If you are sure of your facts, adopting a somewhat patronizing tone (as I do above) can help communicate your difference in experience, and that you expect more respect from him. It can help showing your irritation without making a mountain out of a molehill or requiring assistance from management. Do take care not to overdo it, though - your response should remain factual and instructive at all times.
manpreet
Best Answer
2 years ago
I have been working in the software industry for more than 2 years now, and have been studying it in school for the last 4. I work with an intern who has taken 2 introductory classes (Python and Java), and has never worked in the industry before this job. He is constantly telling me that my code is too complex, my methods have names that are too verbose, and my variable names are too specific. He also insists that every 3 lines or so of code requires a comment, as that is what they teach in the intro courses more often than not. He seems to lack the skill to be able to read code, and doesn't seem to understand that you should be able to write code in a way that is readable. We have gotten into several discussions about this, the last one got rather heated as I was attempting to explain to him that human-readable code is desirable, and verbose method names are not an issue.
During this latest exchange he attempted to tell me industry standards for source code, and how I wasn't following them, when he has never seen any industry code himself. Which is when I started to lose my cool. I am not a people person, which is why I went into computers, and am wondering what advice you all have for, in general, dealing with inexperienced people who attempt to apply the basic 'how-to-code' standards their professors taught them to the real world.