Last active
April 28, 2022 01:10
-
-
Save reidjs/4355dd58619ab4f2b26f2492ff73c08e to your computer and use it in GitHub Desktop.
Keep Your Pull Requests Small, Explained Mathematically
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
It takes exponentially longer for a developer to review pull requests as they become more complex, | |
this is a simple model of the relationship: | |
t = k**n | |
t: time to complete code review | |
k: the number of files | |
n: the number of changes per file | |
This model demonstrates that smaller PRs are much faster to review. For example: | |
If you need to change 10 files and an average of 4 changes per file, | |
it will take 10**4 or 10,000 developer-time units to review the PR | |
If you can split that in half to 5 files, with an average of 4 changes per file, | |
it will take (5**4 + 5**4) or 1,250 developer-time units to review the PR | |
By splitting the PR in half, the time it takes to review it drops by nearly an order of magnitude (8x). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Couldn't agree more.