Claim: the ideal PR is 50 lines long
graphite.dev
Claim: the ideal PR is 50 lines long
1–10 of 127 posts
Re: Claim: the ideal PR is 50 lines long
#2Re: Claim: the ideal PR is 50 lines long
#3Re: Claim: the ideal PR is 50 lines long
#4Forget about refactoring then
Once PRs start to exceed 10k lines of code, they seem to become slightly “safer.”
I suspect this is because the extreme end of PR sizes includes refactors, which
maybe start including less functionality change and therefore have a slightly
lower chance of breaking. Alternatively, engineers may become progressively more
reluctant to revert PRs after 10k lines because of emotional anchoring and merge
conflicts.Re: Claim: the ideal PR is 50 lines long
#5Re: Claim: the ideal PR is 50 lines long
#6Reviewing a 50-line code change in 60% of the time it takes to review a 250-line code change means the shorter code review takes _four times_ as long to review per line.
Re: Claim: the ideal PR is 50 lines long
#7The “ideals” are almost never a thing I see in my daily job, and I’ve worked for countless companies as a contractor.
Re: Claim: the ideal PR is 50 lines long
#8Forget about refactoring then
FTA: Once PRs start to exceed 10k lines of code, they seem to become slightly “safer.” I suspect this is because the extreme end of PR sizes includes refactors, which maybe start including less functionality change and therefore have a slightly lower chance of breaking. Alternatively, engineers may become progressively more reluctant to revert PRs after 10k lines because of emotional anchoring and merge conflicts.
Re: Claim: the ideal PR is 50 lines long
#9Most of the tests for and new functionality alone in any of our PRs well exceed 50 lines. Indeed we have 2-3x more test code than actual code. So should we be writing less tests? Merging the code first and later the tests? Merging the broken, codeless tests first and then the code?
It’s all ridiculous. Just make PRs that represent unit change, whatever the means to you. The unit functionality is independent of lines of code. Sometimes that is 12 lines, sometimes it’s 800. Yeah large PRs are harder to understand but that’s why you have tests. Also XXL PRs aren’t usually happening every day. If they are, you have a very productive team and maybe you should count yourself lucky.
Re: Claim: the ideal PR is 50 lines long
#10Forget about refactoring then
FTA: Once PRs start to exceed 10k lines of code, they seem to become slightly “safer.” I suspect this is because the extreme end of PR sizes includes refactors, which maybe start including less functionality change and therefore have a slightly lower chance of breaking. Alternatively, engineers may become progressively more reluctant to revert PRs after 10k lines because of emotional anchoring and merge conflicts.