We recently started doing a code review of every PR that our team members make.
Most of the time I worry about commenting on something and requesting changes from them. Because in my head I am thinking what if this sounds rude to them or what if I am wrong, or what if they don't feel good about my comments?
Have you witnessed a similar situation? How do you handle that?
Top comments (8)
I have a few personal guidelines I try to follow when reviewing pull requests.
code example
and then compose it in these places like thatanother code example
. Then the author will have a clearer idea of what I mean. Plus, if they are lazy they can just copy paste my suggestions.The bottom line is try to make sure that the code is good enough, and that you all are learning in the process, not try to make it as if you would have written it.
Hi Avalander,
Thanks a lot for the suggestions. These are very helpful. I'll follow them all.
Here is my experience.
A good approach is not requesting, only suggesting changes, and pointing out actual requests i.e. where the current situation is not acceptable. Always tell why so that the PR creator can work out a solution.
Also, it's important to know what is (your) preference/opinion vs. an actual issue with a code (bug, not clean enough etc.).
And most importantly, don't commit into the code unless you want to drive people nuts. :D
I think that if you're unsure then ask instead of stating things, and suggest instead of requesting. Assertive communication goes a long way, and every PR submitter needs to get used to getting their code reviewed.
Thanks a lot Gergely
I have shared a post exactly related to this , please take a look into it and leave feedback.
dev.to/divakarkumar/how-to-become-...
dev.to/divakarkumar/how-developer-...
Here you go sir, How Googler's do code review
Thank you
Hi Andy
Thank you, This is an excellent advice. I'll follow this for sure.