0

How to overcome feeling of distress and anxiety with code review process

Profile picture
Senior Software Engineer at Taro Community22 days ago

I am a machine learning engineer and switched my job 3 months ago. My previous company did not have rigorous code review process, owe it to culture or lack of care for good code quality. In my current company, I am doing decent job but at times I really am impacted with code review process. I sometimes have fear that I'll lose job if code quality is not up to the mark, I get some good feedback from team lead for code quality - which I think is good for team as well as my own learning. In the last week, I got a few nitpick reviews - it was a PR with lot of code and I would ideally want to reduce the number of these nitpick comments in the near future.

Any suggestions on how to overcome the feeling of guilt, fear and at the same time improve the code quality? How do developers deal with it?

Additionally, there have been a couple of time when I was caught off guard - I did not know the reason behind choosing a particular approach completely. I sometimes freeze when having such conversations thinking what would the person in front of me think about me if I reasoning is not correct. Any suggestions on overcoming such scenarios in a nicer way?

37
2

Discussion

(2 comments)
  • 1
    Profile picture
    Tech Lead/Manager at Meta, Pinterest, Kosei
    19 days ago
    • Reframe your approach to code review and view it as a learning opportunity instead of a time of judgment. Code review is a powerful way to build engineering culture and transfer knowledge. You are lucky to join a company where this is taken seriously!
    • For larger/more ambiguous changes, outline your approach with someone senior on the team before you write the code. This will avoid the scenario where your code review has major issues due to having the wrong structure/pattern.
    • If you have a work-in-progress (WIP) code change, acknowledge that in the code review. This was a hack often used by very senior people at Meta (Facebook): they'd put together a very hacky version of a change and put it out for initial comments. They'd make clear that this was WIP by putting it in the title of the code change and then commenting the places where reviewers could safely ignore.
  • 1
    Profile picture
    Eng @ Taro
    18 days ago

    I am doing decent job but at times I really am impacted with code review process. I sometimes have fear that I'll lose job if code quality is not up to the mark

    Any suggestions on how to overcome the feeling of guilt, fear and at the same time improve the code quality?

    I sometimes freeze when having such conversations thinking what would the person in front of me think about me if I reasoning is not correct.

    Like Rahul said, I would try to reframe your current mindset into one where your actions are based on the higher level goal of doing good work quickly to push the company forward rather than one that's reactive that is more based on people's perception.

    With the more proactive mindset, your actions are taken as a result of moving quickly, so there is bound to be feedback from others about how to improve. Remember to cut yourself some slack because you just started in your position. No one expects you to be perfect from the very beginning.

    Remember that you had some hypothesis as to why you did something. Have conviction in your reasoning and explain it to the person who might judge you. If you thought about the problem's solution logically, how do you know that the person questioning you isn't the one that's wrong?