DEV Community

Discussion on: How we use "ship small" to rapidly build new features at GitHub

Collapse
 
mscccc profile image
Mike Coutermarsh

Is this a situation you encounter and if so how do you prevent it? Do you manage to keep all your PRs small enough to make the review process better for everyone?

Definitely! Happens all the time and I still do this occasionally myself.

I have a few ideas around this.

  • Having feature flags helps out with this a lot. Because then the feature doesn't have to be functional to ship it.
  • A lot of this is cultural, the team has to be OK with merging things that are incomplete (for PR's like this, I recommend including an "up next" section in the description that lists out the plans to make it functioning)
  • If you find you have a huge branch. Sometimes I'll create a new branch, and then cherry-pick in specific files (just the backend for example). Put that in a PR to get it reviewed. Once it's merged, then I'll create another branch and cherry-pick in the frontend.

Also - sometimes making the PR small is more effort than it's worth. So sometimes it's necessary to have people review a large PR. I def try to avoid it though if possible.

Collapse
 
miku86 profile image
miku86

Hey Mike, thanks for your great post.

What's small for you? Do we talk about a PR per day? Per 3 days? 1 Week? Or is it more about the amount of code?

Sometimes there is a lot of code to write for a very small thing.
Any guidelines on this?

Thread Thread
 
mscccc profile image
Mike Coutermarsh

Hey!

For me, it's generally a day or two of work for a PR. I like to think about the person who is going to be reviewing it. Will it be easy for them?

Using feature flags and being OK with shipping partially working features helps make everything smaller.

I think it's OK to ship an empty page. Or a page that has static fake data, that needs to be connected to a database later. As long as it's all behind a flag and users don't see it, it helps the development process move faster.

Thread Thread
 
miku86 profile image
miku86

Thanks a lot,
I will keep that in mind!