I am feeling really burnt out at work and talking to my therapist she is asking why I always seem to feel defensive and I am realizing PRs trigger my anxiety from being nit picked and having borderline hostile PR reviews for the past few years.<p>I am really not sure what to do to break the cycle but I dread opening PRs at job and waste hours trying to guess what people are going to be critical of instead of just opening it and moving on.<p>Anyone else feel this way? Anyone have any advice?
As someone who nowadays reviews way more often than gets reviewed, there are some of things I always try to keep in mind to prevent any hostility from my part and foster constructive code reviews.<p>First and foremost, I like to think that as a reviewer I'm there not to point out issues but to provide useful feedback to the author. I'm not a compiler, therefore I shouldn't behave like one and dump error messages in the PR. Even if there are errors indeed.<p>Any and all feedback I provide is up for discussion. This is something I always like to highlight when I'm about to review someone else's code for the first time, no matter their level or experience. I'd rather have my comments discussed and challenged than taken for granted as issues that automatically need to be addressed. I might even throw in the occassional curve ball that I know needs challenging :)<p>I firmly believe the way I word my comments matters, and matters a lot - and I like to think I've managed to improve a bit over the years. PR comments are not commit messages. I avoid imperatives and quite often phrase comments as questions instead. Also, I favor using "we" as opposed to "you" ; in the end, what gets merged is the result not only of the author's but the whole team's work.<p>Also, I try to leverage PRs to educate when possible. I frequently include FYI comments illustrating e.g. more idiomatic implementations, potential refactorings or applications of design patterns, not as something I expect the author to fix but to learn from. Code snippets and links to e.g. documentation pages or articles are great ways of enriching a comment and providing guidance beyond the PR itself.<p>Finally, all these are things that I love to see when someone is reviewing my own PRs.
I used to feel kind of like that when I used to be part of a toxic team. I switched teams, and that feeling went away.<p>I eventually moved to a smaller company, and I worked to build a good relationship with my other peer.<p>Because I know what it feels like to have anxiety before submitting a PR, I will tell you the following: No one in the current times should be put under such environment when companies out there are desperate to hire developers.<p>Take care of yourself, mate!
I just moved to a job with no pull request reviews, and I'm enjoying it. The flip side is that it's very easy to have a major screw up that can mess things up big time, but there are tests and such which prevent major disasters. Further, one can do 'cleanups' every once in a while to reduce tech debt.<p>A lot of places where there are insane PR reviews are where management has abdicated its responsibility to oversee code quality; essentially, it is poor leadership, where management is either too apathetic, swamped with unnecessary meetings, or just lacking in technical direction with too many changes in direction.<p>It's almost always hard when you first start up at a place and get used to its standards when you merge your PRs the first few times, but if it is a recurring problem, then you are not at fault: the organization is fucked up.
Be your own harsh critic. I do find hostile PR stressful and I have both had to give them and got them. I stopped in management when I realised how unpleasant I found negative feedback processes. Trying to rectify a significant performance or behaviour issue is really hard.<p>Maybe you need to get to set expectations for delivery to a level you can achieve reliably, to get positive feedback for over achieving. If the company is obsessed with stretch goals push back a bit and rebalance the agenda.<p>Being willing to move roles or employer is out there. It's peak intensity for stress but may be worth it.<p>Best of luck. Keep talking to the therapist. Believe in yourself and remember some people thrive on hostility and some use it to mask their own fears and insecurities.
Repeat this exact question to your team - it will either let them know that you have a problem to fix together. and give you an opportunity to do so... or it will let you know that they aren't going to change and this is not a healthy place for you to remain.