DEV Community

Cover image for 11 practical tips to make code reviews easier as a developer

11 practical tips to make code reviews easier as a developer

Anmol Baranwal on February 24, 2025

Code reviews are one of the most underrated parts of building great software. It might seem tough and confusing at first, but it's surprisingly ea...
Collapse
 
rcls profile image
OssiDev • Edited

I have a simple list that helps me set the tone when adding comments.

[πŸŽ‰ Praise] Insert praise here
[πŸ’‘ Suggestion] Insert suggestion here
[🦠 Bug] Report possible bug here
[πŸ€” Question] Ask clarification
[🀏 Nitpick] Minor inconvenience to reviewer that can be fixed, but doesn't block

This list can easily be adjusted to satisfy personal preference or team needs, and it really helps set the tone so you don't come off as a jerk.

Collapse
 
guerra2fernando profile image
Fernando Guerra

thats really cool, simple and effective

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Awesome to know! Emojis are somehow tied to emotions, so they really helps a lot in expressing inner feelings. Thanks for reading Ossi! πŸ™Œ

Collapse
 
madhurima_rawat profile image
Madhurima Rawat

🌟 Awesome article! Love the human touchβ€”it really makes a difference! πŸ™Œ

  • Appreciation & recognition go a long way ❀️
  • Encouraging ownership is key, especially in open source 🀝
  • Even if there are issues, acknowledging contributions first is so important πŸš€

Honestly, when I first started on GitHub, I had no clue where to begin πŸ˜…, but over time, I figured things out. Articles and guides like this help a tonβ€”seriously, kudos to you! πŸŽ‰

Your insights really show your experience & expertiseβ€”great job! πŸ‘πŸ”₯

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Thanks for reading, Madhurima! One suggestion would be just write whatever you feel after reading the post, even if there are grammatical errors.. ai just destroys that emotion.

appreciate your support :)

Collapse
 
madhurima_rawat profile image
Madhurima Rawat • Edited

I agree! Its just that I tend to overthink and want it to be mistake-free, so it sometimes sounds too polished. πŸ€·β€β™€οΈ

Thanks for your suggestion though. I will make sure next time.

Collapse
 
jmccabe profile image
John McCabe

Re #6 - that would be brilliant. Unfortunately it's proven not to be that simple in practise. We tried to introduce clang-format on a 4yr old C++ code base, however there are so many options, and so many dependencies between options, that it was taking a long time to find an acceptable set to try to match up with our existing style and avoid wholesale, disruptive changes to the code layout. We got to the point of using it to reject commits but, day by day, we'd find new sections of code where we couldn't get an easily readable layout and ended up with numerous sections where it was switched off. Unfortunately, with clang-format, it's all or nothing; there's no granularity implemented to allow specific rules to be disabled. For example, if we wanted to define an aggregate in a tabular format, clang-format would remove the extra spaces we'd put in for alignment, so we had to switch formatting off round that whole section, which meant other rules weren't being checked.

Of course, I realise:

  1. It's a compromise; if we chose to just use a default set of rules and live with it, we'd get there, but we'd ideally need to work over our complete codebase, and it would probably end up ugly (like the clang sources! ;-))
  2. There may be a combination that did work for us but, with thousands of options, and tens (if not hundreds) of thousands of lines of code, the time to determine a suitable set is huge.

I'm thinking, at this point, that perhaps an AI tool, that can analyse our code and work out what we like, might help for that, but it needs to be self-hosted and work with git/bitbucket data center.

Any suggestions would be welcomed, as it seems that expecting a developer to follow layout rules on their own these days is asking a bit much! :-)

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

That’s a super detailed breakdown, appreciate that! Finding the balance can indeed be complex (especially for c++). I believe it's much easier in other languages... I haven't worked much with legacy C++ codebases (only did it for CP) but you might find tools like AStyle, Tabby, Cody useful. I'm not sure which would be the perfect fit so you should check over reddit (there are always interesting discussions).

Anyway, thanks for reading John. πŸ™Œ

Collapse
 
jmccabe profile image
John McCabe

Thanks for your reply. Interestingly, AStyle was something I'd got some success with but, at the time, it was looking for a new maintainer or Andre had just taken over, so I was a bit hesitant to adopt it, having been stung by abandoned tools in the past (admittedly not OSS, but CodePro Analytix, when Google bought the company out)! I may take another look, and at Tabby and Cody, which I haven't investigated yet.

Thanks again.

Collapse
 
dev_kiran profile image
Kiran Naragund

Good tips Anmol βœ…

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Awesome! Thanks for reading, Kiran.

Collapse
 
rohan_sharma profile image
Rohan Sharma

I wanted this for my ask-her-out website. Someone keeps on spamming! Huuh

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Spamming the final boss huh. Found the guy lol (it's just 2 prs). You haven't seen real spamming… people go crazy over points. πŸ˜‚

Collapse
 
rohan_sharma profile image
Rohan Sharma

I'm not a part of such event. That guys really ignored my comments. It's so painful. Huuh..

Collapse
 
nock profile image
James Nock

LGTM = Let's Get This Merged, no?

Collapse
 
rohan_sharma profile image
Rohan Sharma

I wish it was. But there's another round of review by some other dev/maintainer. Haha!

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Yeah, it should be right. When I was reviewing something, there was a rule of 3 approval reviews, which was really bad (especially for small changes). Imagine asking 3 people to say LGTM... sometimes people just aren't that free, so it just gets delayed.

But in most cases, once a single maintainer approves it, the others will follow... kind of a trust thing (at least in a good organization).

Thanks for reading, James. πŸ™Œ

Collapse
 
komsenapati profile image
K Om Senapati

Great list of tools πŸ”₯πŸ”₯

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Thanks Om! Appreciate your support.

Collapse
 
salam_abdulsalam_e4f3a588 profile image
Salam Abdulsalam

Thanks a lot

Collapse
 
the_greatbonnie profile image
Bonnie • Edited

I have used CodeRabbit and worked on a few articles about it.

Soon I will be publishing an article about CodeRabbit.

Thanks for sharing this article, Anmol.

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Awesome Bonnie! πŸ”₯ I'm also trying CodeRabbit and really excited to see how useful it is.... usually, I’m not a fan of AI stuff, but some are definitely worth it.

Looking forward to your article :)

Collapse
 
sachin_maurya_4aa454540c6 profile image
Sachin Maurya

awesome
let's code future

Collapse
 
anmolbaranwal profile image
Anmol Baranwal

Hey Sachin, thanks for dropping by! πŸ”₯ Feels great to publish under Let's Code Future, plus I really enjoy reading your articles on Medium :)