-5

How would you handle this as a senior manager? Given that there are already coding standards, process etc.

There are coding standards already set and the junior engineer is following the standards, yet the senior engineer is throwing pretty long and a number of comments on the junior engineer's code. This is annoying the junior engineer.

6
  • 9
    Your question is not very clear. Are the senior developers comments are in line with what is in your coding standards? What is the "process etc" you mention, who is not following it? Commented May 26, 2022 at 17:46
  • 2
    "How would you handle this" - look at what these comments are and if they are ok or not. Another response requires more details :-)
    – puck
    Commented May 26, 2022 at 18:23
  • 1
    Why does the junior programmer not like this? Should the code be refactored instead? Commented May 26, 2022 at 20:14
  • 2
    Just to be completely explicit and clear: these comments are thrown by senior dev to junior dev during code reviews. Is that correct? Or are those comments talking about comments inside code?
    – DarkCygnus
    Commented May 26, 2022 at 23:56
  • 2
    Is the senior developer/tech lead competent or not? That is the only question you should be asking yourself. Just imagine if a book author complained about his editor the same way. "My prose passes all the automated spell-checkers and all the all the automated grammar-checks. Why does my editor keep on annotating my writing?" Commented May 27, 2022 at 10:28

3 Answers 3

6

EDIT: The original answer was intended for the direct manager of both the junior engineer and the senior engineer involved. Since OP is a senior manager (and therefore not the direct manager of the people involved), I'm adding a second, more applicable answer. I'm leaving the original answer for posterity and because it may be useful.

New answer:

This is not your problem. You are a senior manager. You have way more important things to be dealing with than whether or not some junior developer 3 reporting steps below you likes his colleagues. If this issue is making its way to you then that means someone below you has dropped the ball. What you should do is find the people in the chain of command in between you and these 2 developers and ask them why they aren't doing their job and why these issues are making it into your realm of awareness. These issues should be handled way below your level, that's what those people are being paid for.

Call a very serious meeting with everyone in the chain of command between you and these 2 developers (not including these 2 developers themselves) and have those people explain themselves, as to why they were not able to successfully manage this conflict and resolve it in an amicable way. If you are not able to get a satisfactory response, then fire all of those people and hire competent middle-managers. Handling these sorts of conflicts so you don't have to is the sole responsibility of middle management, and if that's not being done then those people need to be replaced with people who can do the job.


Original answer:

This depends a lot on the types and volume of comments being made. Speaking as a (sort of) senior developer myself, one tactic I've used in dealing with junior developers is to allow them to merge their code if it reaches 80% of my code quality bar. Obviously a junior developer won't make 100% of my code quality bar, because I'm a senior and they're not, and it's really not worth spending twice as much time arguing over something silly, for 20% code quality. It's ok to let things slide once in a while.

It's also important that the comments being made teach important lessons. Junior developers are junior for a reason, because they're inexperienced. Telling someone to do something a particular way isn't helpful, because they'll make the same mistake again next time. Explaining to them why they shouldn't make that mistake is more helpful, because it teaches them why not to do something, so they won't make that mistake again, and they'll also complain about it less if they know the comment has a reason and is not just "do it because I said so", which a lot of senior dev comments tend to be (oh how I learned this early in my own career!). It's also important to try this once in a while as an exercise: If you make a comment on a PR but are unable to back up that comment with rationale or logic, then perhaps that "coding standard" is not as important as you think it is and maybe the junior is right to ignore it.

Conversely, there are some junior devs who don't understand why they're junior devs; they think they're hotshot rockstars from day 1 and any comment on their PR gets taken as a personal attack. That's also not productive, and if your junior dev is like that then you need to have a chat with them and bring them down to earth. The point in such a chat isn't to chastise them or break their spirit, but rather to bring some perspective: "You've been doing this for 6 months, Bob the Senior has been doing this for 6 years; he has some expertise that you don't have and he is happy to teach it to you if you are willing to learn".

Depending on the situation and the personalities involved, you may want to talk to your senior dev to "put on the kid gloves", so to speak, or to the junior dev to give them some perspective and put them in a learning mindset.

8
  • In some teams both junior and senior developers report to a senior manager, for example, when a middle manager is being hired the senior manager, manages both the junior and senior devs directly. In this case, your previous answer makes sense.
    – work_tech
    Commented May 27, 2022 at 21:53
  • @work_tech The solution to your problem depends very much, as you can see, on whether you're a middle manager or a senior manager. If you want an answer "as a senior manager", as you requested in your question, I will point you to the new answer. If you are acting as a middle manager as the direct report of these 2 engineers, then that's not "as a senior manager"; the fact is that true senior managers don't have to deal with this nonsense unless something in their chain of command has gone horribly awry.
    – Ertai87
    Commented May 28, 2022 at 5:47
  • Ertai87 - What about showing empathy to the junior engineer if their code review is upto the coding standards yet senior engineer has been throwing comments? I do not see anyone in this thread talking about showing empathy to the junior engineer, not sure why.
    – work_tech
    Commented May 31, 2022 at 18:05
  • @work_tech Please reread the first paragraph of my (original) answer.
    – Ertai87
    Commented May 31, 2022 at 18:18
  • yeah, that does not talk about showing empathy, it rather talks about helping the junior engineer understand where his code lacks so that they can ramp up and upgrade themselves to be on par with the coding standards of the team.
    – work_tech
    Commented May 31, 2022 at 18:23
0

How would you handle this as a senior manager? Given that there are already coding standards, process etc.

I would first point them to such coding standards, processes etc. that your company has defined.

You can also expand that with explaining the reason and benefits of including comments in code, specially when working on teams.

4
  • 1
    This answer is not helpful. This is basically the same as saying "do it because I said so"; if the personality of the person you're talking to is already someone who is reticent to receive negative feedback, giving them negative feedback and also saying "shut up because I said so" is worse. Having them read reams of documentation is a waste of time. This is why "mentorship" is a core competency of a senior developer, precisely because "read the docs" is not a good answer to a problem like this.
    – Ertai87
    Commented May 26, 2022 at 20:03
  • @Ertai87 You comment assumes many things of my answer. Never did I mentioned "shut up because I said so", that was your (very negative) interpretation, nor did I ever suggested that "do it because I said so"... Reading doc is a valuable skill, specially for self-learning. Furthermore, If you read the second part of my answer I also suggest that manager explains the reasons and benefits, which is on the line of "mentoring" and the complete opposite of "do it because I said so"... the good thing is that the answer you posted expands more on this mentor approach, as it is more verbose
    – DarkCygnus
    Commented May 26, 2022 at 21:29
  • 1
    OP's question says nothing about comments in code; your second part of your answer is irrelevant and I'm not quite sure where you got that. Also, simply slamming a ream of paper on the desk of a junior developer and saying "read this, it's important" is not necessarily conducive to that person actually learning anything and is more likely to upset them more than get positive results. I say this from experience, as this was done to me when I was a junior and it went...poorly, to say the least.
    – Ertai87
    Commented May 26, 2022 at 21:44
  • 1
    Yeah, i can see that this topic triggers you a bit, no worries. I took "comments" as "comments in code", as OP didn't specify. Although seeing the review tag, it's likely that "comments" refers to "comments during code review by senior"... if that's the case my assumption and answer would make no sense... let's hope OP clarifies that part
    – DarkCygnus
    Commented May 26, 2022 at 23:55
0

Whenever one person complains about another I get the two people together and ask them if there is an issue at hand.

I don't consider this a question about coding standards. I consider this a question about managing people.

Not the answer you're looking for? Browse other questions tagged .