How do you review Pull Requests?
Same as @ohm, on GitHub, but I want to go beyond the technical answer.
When I review PRs I’m very deliberate about my choice of words. I never write “you should do X” but I opt for wordings along “from where I’m standing it might be better to do X because of reason Y”.
I always explain the reasoning behind my suggestions and make liberal use of GitHub’s “suggestion” feature to ease integrating my suggestions for the author.
I’ve actually did a lightning talk on the topic a few years back, you can see it here (here is a great article on the topic which I also reference in the talk).
When do you review Pull Requests?
Usually in the morning or directly after lunch. I try to avoid interrupting my focus to do code reviews so I do them “when I have time”.
How long are you willing to wait for a review / approval?
As long as necessary. Usually they’re done on the same day, sometimes I need to wait another day. If it takes longer than that I tend to re-request the review as a more gentle version of pinging people on Slack.
How long do you spend reviewing a Pull Request?
Anything between 5-10 minutes for short PRs to up to an hour for bigger/complex PRs.
I really go through the code and try to understand the flow of the program which takes it’s time but also lets me spot things a more superficial code review would miss.
How many Pull Requests would you review in a day?
On busy days I’m reviewing around 3-4, haven’t had to review more than that so I can’t comment on what my “upper limit” would be.
What is the best size (number of modifications/ additions) for a Pull Request?
It’s great if the PR can stick below 100 changed lines that’s great because it eases the burden to understand the change. Sometimes that’s not possible but I think it’s a good rule of thumb to try to keep PRs small.
I struggle with this myself from time to time.
How frequently do you submit Pull Requests? (daily / weekly / monthly)?
A few times per week. Not necessarily daily.
How do you feel emotionally when someone suggests changes?
Depends on how the suggestions are phrased.
See my section above on how I do code reviews.
How do you feel emotionally when you suggest changes?
As said before, I always try to stay compassionate when reviewing and try to put myself into the author’s shoes. From the feedback I’m getting from colleagues I think I’m doing quite a good job at this.