Processes and rules make code review less intimidating
- Published at
- Updated at
- Reading time
- 2min
Code reviews are, by nature, intimidating. Sometimes even brutal. If you've been in the game for long enough, you probably experienced the following: you worked hard on a feature, you're proud of yourself and open the PR to be praised and land your changes, and then... it rains comments, suggestions and nitpicks. And if it's really bad, you're forced to take multiple feedback and clean-up rounds. It sucks.
Getting open and constructive feedback is part of the game, though. Only teamwork enables shipping the best code to prod. As a result, everybody needs to learn to put ego aside. It took me ages to disconnect and respect that my code changes aren't me. It's surprising, but people still like me even though they're tearing my beautiful code apart in front of my eyes. It's wild, isn't it?
Still, a gnarly and never-ending code review gets to me sometimes.
And as a process person, I'm 100% convinced that rules make things easier for everybody. Today, I discovered conventional: comments
.
Which of these three comments do you want to see in your code reviews?
I'm voting for the third option because it tells me there's an issue in my code but that it's not blocking me from moving forward.
And maybe it's just me, but when I look at code feedback that's formatted in a certain way, it feels more "factual". It's less about two people arguing over code but rather a process to follow.
Conventional comments remind me of Netlify's Feedback Ladders.
Back in 2020, they grouped their feedback into five emoji-encoded buckets.
- ⛰ Mountain / Blocking and requires immediate action
- 🧗 Boulder / Blocking
- ⚪️ Pebble / Non-blocking but requires future action
- ⏳ Sand / Non-blocking but requires future consideration
- 🌫 Dust / Non-blocking, “take it or leave it”
I liked this so much that I even established this approach in my team. We learned that emoji encoding takes a surprisingly long time to remember, though. So, today, I'd prefer text formatting over something visual.
But anyway, if you're daunted by code reviews or your team is struggling with endless feedback loops, maybe you want to try some communication rules. And if you do, let me know how it goes!
Join 5.4k readers and learn something new every week with Web Weekly.