Non-FictionBusiness BriefCode ReviewSoftware Engineering

Async Code Review Best Practices Manual eBook

Write clear PR descriptions, use review checklists

by Ellsworth Altagracia

  • English
  • 91 pages
  • 2026
  • SamEnrico

Write clear PR descriptions, use review checklists, and give actionable feedback asynchronously on GitHub.

Formats

Free sample

Chapter 1: The Small PR Habit...--You have just opened a pull request. It is 2,847 lines of changes. Forty-seven files. Fourteen commits. The title is "Update stuff." The description is blank.

You scroll through the diff for ten minutes, your eyes glazing over by the twenty-fifth file. You close the tab. You tell yourself you will come back to it later. You do not come back to it later. Three days pass.

The author pings you on Slack. You feel guilty. You open the PR again. You skim the remaining twenty-two files in five minutes. You type "LGTM" and click Approve.

You have no idea if the code works. Neither, frankly, does the author.This is not a failure of will. It is not a failure of the reviewer. It is not even a failure of the author, exactly. It is a failure of the process.

The single biggest predictor of a good code review is not the skill of the reviewer, the quality of the tests, or the complexity of the change. It is the size of the pull request. Small PRs are reviewed faster, more thoroughly, and with less frustration. Large PRs are skimmed, approved without real understanding, or rejected outright. And the line between "small" and "large" is far lower than most engineers believe.This chapter is the foundation of everything that follows.

If you take only one lesson from this book, make it this one: keep your pull requests small. Not because small is elegant or tidy, but because small is the only way to get a review that matters.The Data That Changed How We Review In 2006, a team of researchers at Cisco Systems conducted a study that would reshape how the software industry thought about code review. They analyzed thousands of code reviews across hundreds of projects, measuring both the size of the change and the number of defects found. The result was a clear, unambiguous curve.Up to about 200 lines of changes, reviewers found roughly 85 percent of the defects present in the code. Between 200 and 400 lines, defect detection dropped to about 75 percent.

Between 400 and 1,000 lines, it fell to around 60 percent. Beyond 1,000 lines, defect detection plummeted to below 30 percent—barely better than random chance. Reviewers were rubber-stamping.Follow-up studies at Google and Microsoft confirmed the finding. In 2015, a large-scale analysis of code review data from both companies found that the optimal PR size for thorough review is under 400 lines. Beyond that, review effectiveness drops dramatically.

Beyond 1,000 lines, reviewers find no more bugs than they would by flipping a coin.The reasons are not mysterious. They are grounded in the basic limitations of human cognition.Cognitive load. Working memory can hold approximately four to seven items at once. A 400-line PR might contain fifty distinct changes. By the time a reviewer reaches the bottom of the diff, the top has already been pushed out of working memory.

The reviewer cannot hold the entire change in their head simultaneously, so they cannot reason about interactions between changes. They cannot ask, "Does this change over here break that assumption over there?" because they have already forgotten the assumption over there.Context switching. Large PRs almost always mix multiple concerns. A single 2,000-line PR might contain a bug fix, a refactor, a new feature, and a documentation update. The reviewer must constantly switch mental contexts: now I am thinking about the bug, now about the refactor, now about the new feature.

Each switch costs time and mental energy. The cumulative cost is exhaustion. After the fifth context switch, the reviewer's brain is fried. They are not reviewing anymore. They are surviving.Fatigue.

Reviewing code is mentally demanding work. It requires sustained attention, pattern matching, and logical reasoning. After twenty minutes of focused review, attention begins to wander. After forty minutes, most reviewers are skimming. After an hour, they are barely looking at the screen.

A 400-line PR can be reviewed in twenty to thirty minutes by an experienced reviewer working at a sustainable pace. A 2,000-line PR takes two hours—but the reviewer is not actually reviewing for two hours. They are reviewing for twenty minutes and skimming for one hundred.The data is clear. The cognitive science is clear. And yet, most teams continue to submit and accept large PRs.

Why?The Rationalizations We Tell Ourselves Engineers are masters of rationalization. When confronted with the evidence about PR size, the objections come quickly. Let me address the most common ones."My feature can't be split." This is almost never true. Any feature that adds value to users can be broken into smaller, shippable chunks. A "shippable chunk" does not need to be deployed to production—it needs to be a complete, working, tested change that could theoretically be deployed.

The user authentication feature can be split: add the database schema first, then the registration form, then the email verification, then the login, then the password reset. Each piece is reviewable on its own. Each piece builds on the last. Each piece is small."The refactoring is necessary for the feature." This is a trap. Refactoring makes code cleaner but does not change behavior.

Feature work changes behavior but may leave code messy. When you mix them, reviewers cannot tell which changes are safe (refactoring) and which are risky (feature work). A renamed variable in a refactoring looks exactly like a logic change in the diff. The reviewer must assume that every change could be risky. They must scrutinize everything.

The review takes longer and is more exhausting. Do this instead: refactor first, in its own PR. Merge it. Then build the feature in a separate PR, on top of the refactored code. The refactoring PR is small and safe.

The feature PR is also small, because it builds on clean code. Both are easy to review."I'm just moving code around." Code movement is not innocent. When you move a function from one file to another, you change the visibility, the import paths, and the mental model of the codebase. Reviewers must verify that the moved code is identical (not just similar), that nothing was accidentally changed, and that all callers have been updated. This is real work.

Do it in a separate PR. A PR that only moves code—no logic changes, no new features, just relocation—is easy to review. A PR that moves code and adds a feature is impossible to review. Separate them."The tests are most of the lines." Tests count. They are code.

They can contain bugs. They need to be reviewed. However, generated test fixtures, boilerplate setup code, and repetitive assertions can be excluded from the line count if they are truly mechanical. Use your judgment. When in doubt, count them.

And remember: if your tests are 80 percent of the line count, then the non-test changes are 20 percent. That 20 percent still needs to be reviewed. It should not hide behind the volume of the tests."We have a deadline." Deadlines are not excuses for poor process. A large PR that is approved without real understanding will cause more delays downstream than the time saved by skipping proper review. The bug that reaches production because no one really understood the…

This is the end of the free sample. Get the eBook to keep going. Buy now

About this book

Write clear PR descriptions, use review checklists, and give actionable feedback asynchronously on GitHub.

Details

Author
Ellsworth Altagracia
Publisher
SamEnrico
Language
English
Genre
Non-Fiction, Business Brief, Code Review, Software Engineering
Released
2026-06-09
Pages (approx.)
91
Available as
eBook, Audiobook

Read better in the ZLOADR app

Your eBooks on your phone or tablet. Sign in with your SamEnrico account and start reading.

More by Ellsworth Altagracia

See all

You may also like

See all