Tell someone you feel anxious about giving or receiving code reviews, and you’ll likely be told that it’s a “junior developer thing that you’ll eventually get over,” then given tips for writing “cleaner/ better code.”

While frequently well-intentioned, this advice gives developers the message that there’s something wrong with them or their code if they experience code review anxiety - a message that is not just inaccurate, but even damaging. So what can you do about code review anxiety? As a clinical scientist in the Developer Success Lab with expertise in stress and anxiety, I recently decided to go up against this harmful advice with scientific evidence on who experiences code review anxiety, how it is maintained and exacerbated, and what we can actually do to mitigate it. 

In this talk, I’ll share the story of my empirical research conducted with software engineers and developers across industries experiencing code review anxiety. You’ll learn about our new empirically tested model of code review anxiety and the important cognitive mechanisms like self-efficacy, probability bias, and cost bias that maintain and exacerbate code review anxiety. I’ll also share how a brief intervention can help junior and senior engineers manage their anxiety about giving and receiving code reviews. Along the way, I’ll pull the curtain back on how we do “developer science,” sharing the journey of developing and scientifically testing a code review anxiety intervention based on cognitive-behavioral therapies, using a rigorous randomized control experimental design – the same methods that we use to test interventions in complicated real-world settings like healthcare. I’ll end by providing science-backed, actionable recommendations for how developers can reduce their code review anxiety and create a code review culture that preemptively reduces code review anxiety in others.