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?
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?