finner

finner

The Pull Request

When you are under pressure to deliver you ideally want your Pull Request to be reviewed, approved and merged as quick as possible. So does everyone else! I’ve seen a Pull Request go through a review for over 52 days! An extreme example, and most of the debate was petty.
But where do you draw the line? Does the wrong variable name stop you from approving someone’s work? Or, would you ask for a complete redesign of a submitted solution?

I would like to open a discussion around the Pull Request and share our experiences and practices.
Here’s some questions that I have pondered many a time:

  • How do you review Pull Requests ?
  • When do you review Pull Requests ?
  • How long are you willing to wait for a review / approval?
  • How long do you spend reviewing a Pull Request?
  • How many Pull Requests would you review in a day ?
  • What is the best size (number of modifications/ additions) for a Pull Request ?
  • How frequently do you submit Pull Requests? (daily / weekly / monthly)?
  • How do you feel emotionally when someone suggests changes?
  • How do you feel emotionally when you suggest changes?

Most Liked

wolf4earth

wolf4earth

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. :yum:

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.

AstonJ

AstonJ

I would try not to take anything personally (so long as the feedback wasn’t rude). Just keep in mind that often personal taste, direction and experience are factors, and if a change is suggested it just means they are looking for something different, which may be based on their taste or experience.

For people suggesting changes I would say please just be kind :blush:

ohm

ohm

  • How do you review Pull Requests?
    • On GitHub
  • When do you review Pull Requests?
    • When I have time after I get assigned as reviewer or pinged to review
  • How long are you willing to wait for a review / approval?
    • As long as it takes. We do not merge unreviewed or unapproved PRs, even for production critical code.
  • How long do you spend reviewing a Pull Request?
    • Depends on the PR, but generally not more than 15 minutes. If the PR is too big, we tend to mark our review as “Too much code, please split into smaller more reviewable chunks”.
  • How many Pull Requests would you review in a day?
    • Between 0 and 10. It depends on the day and what project the other developers are working on.
  • What is the best size (number of modifications/ additions) for a Pull Request?
    • I don’t think there is a “best size” or a “one size fits all” answer to this. If you’ve made the same change in a thousand files, I’ll still count it as one change. Make the changes relevant to the problem you’re trying to solve.
  • How frequently do you submit Pull Requests? (daily / weekly / monthly)?
    • Again, it depends on what I’m working on. I would say around 5-10 per week on an average week.
  • How do you feel emotionally when someone suggests changes?
    • I feel happy, because it means that they care enough to actually check out what I’ve been doing. If I agree, I’ll give a :+1: and immediately fix it. If I don’t, we can have a discussion. Sometimes that discussion happens off of GitHub (Slack, Zoom, in person) or it can happen in the review. Once we come to an agreement, we’ll post the agreed upon changes and I’ll do that.
  • How do you feel emotionally when you suggest changes?
    • If the change is “you misspelled this” or “Please follow the style guide” I get annoyed, because it feel like the other person just don’t care. When I suggest changes other than that I tend to back it up with “previously we’ve done this in file X on line Y” or “We discussed here LINK that we would do it this way” or even “I would have done it like THIS, but if you feel like we should do it your way going forward, we can do that”.

Popular General Dev topics Top

AstonJ
If you’re a fan, why? If you’re not fussed on it, how comes?
New
AstonJ
Hey all… just testing our new diversity message feature :nerd: We have been in talks with members of minority groups and they have given...
New
chasekaylee
Just like the title says :smiley: which courses you find that have had the most impact in the span of your career as a developer?
New
AstonJ
Always interested in seeing what apps people use and how they organise their phones/home screens! Here’s mine…
New
Exadra37
So, if we can reduce the likelihood, we can reduce the overall risk. That’s good. It’s actually very similar to a very common idea called...
New
DevotionGeo
The V Programming Language Simple language for building maintainable programs V is already mentioned couple of times in the forum, but I...
New
Exadra37
Kubernetes is everywhere. Transactional apps, video streaming services and machine learning workloads are finding a home on this ever-gro...
New
chaptuck
I am thinking about getting a fitness tracker of some kind (probably one from Garmin). Have any of you developed your own widgets, watchf...
New
Exadra37
My brother got a VPS on https://contabo.com hosting provider, but I was not aware of them, and when my brother told me the price and spec...
New
harwind
I’m working on a Spring Boot project and I have a controller where I want to map multiple request paths to a single method. Let’s say I h...
New

Other popular topics Top

axelson
I’ve been really enjoying obsidian.md: It is very snappy (even though it is based on Electron). I love that it is all local by defaul...
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
New
AstonJ
SpaceVim seems to be gaining in features and popularity and I just wondered how it compares with SpaceMacs in 2020 - anyone have any thou...
New
DevotionGeo
I know that -t flag is used along with -i flag for getting an interactive shell. But I cannot digest what the man page for docker run com...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
AstonJ
poll poll Be sure to check out @Dusty’s article posted here: An Introduction to Alternative Keyboard Layouts It’s one of the best write-...
New
dimitarvp
Small essay with thoughts on macOS vs. Linux: I know @Exadra37 is just waiting around the corner to scream at me “I TOLD YOU SO!!!” but I...
New
PragmaticBookshelf
“A Mystical Experience” Hero’s Journey with Paolo Perrotta @nusco Ever wonder how authoring books compares to writing articles?...
New
wmnnd
Here’s the story how one of the world’s first production deployments of LiveView came to be - and how trying to improve it almost caused ...
New
PragmaticBookshelf
A Ruby-Centric Chat with Noel Rappin @noelrappin Once you start noodling around with Ruby you quickly figure out, as Noel Rappi...
New