Code Review Anxiety

## Metadata
- Author: [[The Changelog: Software Development, Open Source]]
- Full Title: Code Review Anxiety
- Category: #podcasts
- URL: https://share.snipd.com/episode/374202b0-8299-42c7-8ad8-00f2f95d1020
## Document Notes
## Highlights
- **GitHub Mishap**
- Carol Lee messed up using Git/GitHub in the past and felt embarrassed.
- This personal experience sparked her interest in code review anxiety.
Transcript:
Carol Lee
Definitely messed up the whole GitHub thing. And that was very embarrassing. So I felt code review anxiety. Something that was super interesting is that people are always kind of commenting on how it's a common occurrence, right? ([Time 0:06:56](https://share.snipd.com/snip/1745bf6f-6040-45bb-8ff0-f93f3742de73))
- **Seniority and Anxiety**
- Code review anxiety is not exclusive to junior developers.
- Experienced engineers also struggle with code review anxiety, regardless of seniority.
Transcript:
Carol Lee
But as I kind of dove deeper into it, I came across some like really harmful myths in the industry. So one thing is that a lot of people talk about code review anxiety as if it's like this junior developer thing, right? Like, oh, you'll just kind of grow out of it. Everybody experiences it to begin with. And that's not actually true. In my research, we actually see that folks across experience levels experience code review anxiety, whether that's about giving a code review, getting a code review, whatever. We had folks in my intervention who were like principal engineers, folks who had anywhere between one to 65 years of coding experience who were like, you know what? I've had code review anxiety for 50 years and I just like never thought that this was something that I could do anything about. Like I was just like, well, it's too late now. That's embarrassing. Like, you know, and so I thought that was really striking and I wanted to kind of share, you know, hey, this is something that impacts all of us. ([Time 0:08:11](https://share.snipd.com/snip/60620a83-d8a3-410e-87bc-82f1a051e912))
- **Anxiety and Code Quality**
- Managing code review anxiety is not simply about writing better code.
- Anxiety is not merit-based and can affect even those who produce high-quality work.
Transcript:
Carol Lee
It's not dependent on how much experience you have. And then the other piece of it is that folks often think about code review anxiety management as writing better code. So if you kind of just do like a gentle Google search and you're like, how do I manage my code review anxiety? You'll get people who are like, oh, here are like 10 tips to write better code. Here are 10 tips to write cleaner code. And then they're like, and then like code of your anxiety done. Perfect. And that's not how anxiety works, right? Like you can feel anxious about things that you did super, super well. It's not, I always say anxiety isn't like merit-based. You don't like burn your way out of anxiety. It just kind of like happens to us. So I thought that was an important kind of thing to show with this research as well. ([Time 0:09:06](https://share.snipd.com/snip/447e9750-4dcc-409e-ba89-792622aff2a3))
- **Frequent Reviews**
- High code review frequency can lead to less thoughtful feedback.
- This can create anxiety as developers may misinterpret brief comments as personal attacks.
Transcript:
Carol Lee
Yeah. Well, it's interesting you say that too, because like you think about how we just kind of get used to or, you know, integrate processes like reviews. And if you're doing like, let's say one review every month or one review every quarter, right? It cues you to have like a more thoughtful review where you're like, hey, like, this is my review to Adam, like, here are the things that I, you know, I'm seeing here are some areas where I can see some growth, like it kind of like makes you be a little bit more thoughtful. But when you're kind of pushed to do like 10 reviews a day, I don't know, like however many you feel pressured to do, right, you see a lot of folks writing things like, looks good to me. And then the other person's like, does it? Like, I don't know, like this person or, you know, someone will say something like, just change this. And you're like, does this person hate me? And that kind of elicits a lot of code review anxiety because people don't feel like they have time to say, hey, like, I wonder if you could change, you know, kind of like couch things a Little bit more when they are pressured to like, kind of turn these out. ([Time 0:11:12](https://share.snipd.com/snip/e31d3b6d-4b3e-4727-a458-c81df9f29848))
- **Cognitive Biases**
- Address code review anxiety by understanding cognitive biases like probability and cost biases.
- Challenge these biases by realistically assessing the likelihood and impact of negative outcomes.
Transcript:
Adam Stacoviak
Right. I'm a dictionary, basically.
Carol Lee
I love this. No, I mean, not to get, you know, just gently get into some findings. I liken code review anxiety a lot to social anxiety. And this is actually based on a model of social anxiety, which is very common, you know, impacts 11% of the population. Fun fact. But I mean, you know, social anxiety has to do with like feeling like you're going to be judged, or just feeling anxious about any social interaction or some sort of like perceived performance Situation, right? And like code reviews, you're like interacting with people that social, and you're kind of like putting your work out to the world and be like, here I am, coder, wonderful, right? Which can feel like a lot of spotlight attention. And two like major things that impact social anxiety and kind of socially relevant anxiety are like probability and cost biases. So these are two cognitive biases that folks experience where like they overestimate the likelihood that something bad's going to happen. That's probability bias. So you're like, Adam's going to say something mean to me. I just know it, right? And what's really interesting is that they overestimate the cost of that bad thing happening. That's the cost bias. So I'm like, Adam says something mean to me. And that means that I'm a bad coder and I don't deserve to be here, right? It's not just like, Adam said something kind of rude. Like, F that guy, you know?
Jerod Santo
You're like. Right. It's on him, not me.
Carol Lee
Yeah. Like you take it as like something really intense and bad is happening. Um, and then you also experience this thing called low anxiety, self-efficacy where, you know, to the experience, you'll avoidance point. You're like, I can't handle this anxiety, right? Like there's nothing I can do about this. So, yeah. ([Time 0:15:53](https://share.snipd.com/snip/936264ae-30e6-4e15-bf3f-0acd7aa5a9ea))
- **Catastrophizing**
- Become aware of catastrophizing thoughts and challenge their validity.
- Ask yourself if there's evidence for these negative thoughts and consider alternative explanations.
Transcript:
Adam Stacoviak
That one you're talking about where you where you manufacture this this idea, so to speak, this this fear. It's called catastrophizing, right? Like when you like I I personally am a daily practicer of catastrophizing. I don't want to be, but I do. It's just something that you do. It's the gutter syndrome or the gutter spiral, whatever you want to think. Like it's not a good place. You would begin to assume certain truths are true. They're not true. But you've now just worked whatever it is up so bad that the outcome from this scenario is only the worst possible ever outcome. And that's the truth. Yep. You know, catastrophizing is absolutely the worst place to be. I can say that because I've been there. I've done it. And I've got the T-shirt. I'm not wearing it today, though.
Carol Lee
Adam, I am also a catastrophizer. I mean, so there's several kind of kind of we call them cognitive distortions that we go through. And, you know, I kind of have everyone be like, all right, like, chances are there's some of these where you're like, that one speaks to me, right? So some people are like, I am 100% a mind reader. I just think I know what everybody's thinking. And it's bad. But I actually don't know what this person's thinking at all. Right. And so it's kind of like a fun thing to be like, okay, like, nothing again. And like doing the mind reading again, like, come on, Carol, get it together. Right. So I think that could be super helpful, ([Time 0:23:36](https://share.snipd.com/snip/8df96b48-423f-4d47-88c5-560e66720489))
- **Awareness**
- Increase awareness of anxious thoughts and feelings during code reviews.
- Use tools like Carol Lee's toolkit to monitor and manage anxiety in real-time.
Transcript:
Adam Stacoviak
Affiliate link. Yeah, we'll get the affiliate link out there. Let me get these three out there. We're stuck on one. So there's three key processes. One is self-awareness or becoming aware. The second is reducing biased thinking and increasing constructive and compassionate thinking. And you go on. I'm not going to read it verbatim. And the last one you say is reducing avoidance. And you say exposure. So doing more of the code review, doing more of the thing that you're afraid of somehow, I don't understand this, somehow makes you less afraid. ([Time 0:29:31](https://share.snipd.com/snip/f4f96ef5-4e4d-4cb9-8b81-3330ff547881))
- **Express Anxieties**
- Express your anxieties and uncertainties when requesting code reviews.
- This encourages empathy and more constructive feedback from reviewers.
Transcript:
Carol Lee
A lot of times, and people kind of do this and they shoot themselves in the foot, where they're really anxious about their code. And maybe they are super confused, right? They don't feel comfortable with it. And they just kind of quietly put it out into the world. And they're like, it's done. And when you do that, people are like, okay, this person feels confident. Let me just give them the review. It's really hard to remember. And I say this even as a psychologist. When you're working on a computer, interacting with somebody's like work, it's sometimes really hard to remember that there is like a person with feelings on the other side of it, right? You're like, here's the code, I'm going to review it. But that code belongs to somebody. And that person has feelings and maybe anxiety, right? And so you can ask for a code review in a way that like, elicits some humanity. You can say things like, I'm just really not sure about this section, right? Like, kind of feeling anxious here. And like, oftentimes when folks read things like, I'm uncomfortable here, or I'm feeling anxious, that cues them to be like, oh, this person doesn't feel good. I should be gentle with them. Right? In contrast, when you just kind of put it out there, people are just kind of like, man, like, you should change this. And then you read that feedback and you're like, this person doesn't like me. Right. So you can actually elicit kind of code reviews by actually sharing that you're anxious. So I think that's just kind of an interesting way that exposure can work there, too. It's kind ([Time 0:33:44](https://share.snipd.com/snip/84ed6df1-41d5-4071-8c8d-d9f38090e590))
- **Detach from Code**
- Detach yourself from your code to reduce the personalization of criticism.
- View code as a discovered solution rather than a direct reflection of your worth.
Transcript:
Jerod Santo
Much does identity play into code review anxiety? And by that, I mean, how closely I identify with my code because the fear of judgment often is stronger when it's personalized. Like I am being judged, not my code is being judged. And I've found that over time I have benefited by detaching myself from the code that I wrote in order to not feel harmed by negative review of said code, which took some time, but it allowed The framing I changed. My mind was like, instead of I came up with a solution, it's like, I've discovered a solution. And it's not really, it's not me. It's just like, here's what I've discovered. You know, of course I wrote it, but is this good? And it's like, nah, maybe that's not the best discovery. Okay. Let's go find something else. And so that's helped me just to be like, it's not me. It's my code. ([Time 0:40:44](https://share.snipd.com/snip/c4e01068-bc04-4331-9eea-bb348b60c434))
- **Value of Code Review**
- Consider the value proposition of code reviews before investing in coping mechanisms.
- If code review is truly not beneficial, avoidance might be a valid strategy.
Transcript:
Jerod Santo
Another question for Carol, which is that we create frameworks and tools in our minds and in our lives in order to deal with situations that we are anxious about, we are nervous about, We have a problem with, but we have to go through them. And there are other situations that we don't do that for. For instance, I'm also very anxious about jumping into a swamp filled with crocodiles. Like that makes me very nervous. So I don't do that because there's no value there on the other side, no Indiana Jones. So apply that to code review. Why should we then have all these coping mechanisms and like building up exposure and do all this stuff so they're not so anxious? Is code review worth it then? Because if it's not worth it, we could just do the avoidance thing and that's actually a win. But is it worth it at the end? Or is there research on this? Is that actually ([Time 0:45:40](https://share.snipd.com/snip/7c7a5dbd-9f34-46ab-9e59-f4735489c3d2))
- **Rational vs. Positive Thinking**
- Carol Lee highlights the difference between rational thinking and positive thinking.
- It's crucial to acknowledge realistic negative possibilities instead of denying them.
Transcript:
Adam Stacoviak
Yeah, absolutely.
Carol Lee
So, I mean, something that I really stress in these workshops too, is that like it's rational thinking, not positive thinking, because you might have a thought like Jared's going to Nitpick this, Like Jared always nitpicks this. And like, maybe Jared does always nitpick this. Sometimes Jared nitpicks. You know, like maybe that's just Jared's thing, dude. Or, you know, maybe you have a thought like Jared doesn't like me. And you're like, actually, no, Jared doesn't like me because the other day he literally looked me in the eyes and said, I don like you right like it's not helpful to be like no he loves me He won't nitpick it this time like that's not reality exactly so in those cases you might be like okay well like jared is going to be mean to me we know this jared doesn't like me right so What are my thoughts about that i might feel like that's personal like because jared doesn't like me, and Jared is going to nitpick, that means there's something wrong with me, right? So then like, you might think, okay, this is going to happen. It sucks. It's going to happen. But that doesn't mean that like, I'm the worst thing ever. It's really interesting, actually. So something that I really love about love being, like a sad thing, but something I love about social anxiety is that with the other kinds of anxieties, we often talk about the probability, People overestimate the probability, and the probability is usually very, very low to none. Like if I hyperventilate, that means I'm going to have a heart attack and die. And you're like, that's not going to happen. Okay. But with social, you have these ideas of like, people are going to laugh at me. And it's like, you know what? They honestly might. Like the probability isn't zero with social like situations. So it's kind of an interesting thing where it's like recognizing the realistic probability instead of saying it's not going to happen. And instead really hammering in on, okay, like what's the cost of this? Like, yeah, someone laughs at me. Does that mean like, I'm the worst thing ever? Like, what does that mean? Right? Maybe this person's just kind of rude. ([Time 0:51:54](https://share.snipd.com/snip/8c3a9635-1c2b-4413-a6da-f34cf4604379))
- **Code Review Toolkit**
- Carol Lee and Kristen Foster Marks created a self-guided workbook and toolkit.
- These resources help developers manage code review anxiety and promote self-compassion.
Transcript:
Jerod Santo
The toolkit that you provided during the study, is it published somewhere like standalone or online?
Carol Lee
Yes. I totally forgot to mention this. I guess I should also mention that, you know, the results of the study were good. People got less anxious, just to kind of put that out there. Awesome. They also felt like they could handle their anxiety more and they were more self-compassionate. So really good findings all around for a pretty rigorous design. So because the study results were good, I wouldn't have done this if the study results were like, this doesn't work. Right. I actually created a workbook. So me and my coworker, Kristen Foster Marks, we created like a kind of self-guided workbook so that you can work through the intervention yourself if you wanted to. And then with this workbook, the kind of mini toolkit is also there as well. And then we're also actually in the process of working on like a themed retrospective template. So we've got a few requests from folks who are like, I want to talk about code review anxiety with my team, but I don't know how to do that. We're like, well, like we can write you a little template on like how to do that, for example. So yeah, both of those things are publicly available. I can provide a link and folks can kind of check it out if they want. ([Time 0:55:57](https://share.snipd.com/snip/b1a784e9-3f2b-40a1-9e12-3cc457137062))