Book Deep-Read · Software Engineering at Google · Chapter 19

Critique: Google's Code Review Tool

Software Engineering at Google · Ch 19 · Critique: Google's Code Review Tool · Caitlin Sadowski, Ilham Kurnia, Ben Rohlfs · 2020

中文 →

What is this chapter about?

When a programmer changes code, they can't just drop it into the company's main codebase — a colleague has to look at it and nod first. That step is called "code review." GitHub pull requests and the review tools inside most companies all do this job. This chapter is about the most popular one inside Google, Critique. It isn't about how to review; it's about what a review tool people actually love looks like.

A surprising fact first

Of all the features Critique ever added, the one users praised most wasn't high tech at all: it simply shows in bold the name of whoever needs to act next. Once it shipped, people couldn't remember how they had lived without it — before, they had to message each other to ask "who is this change stuck on?"

Why the old way was hard

Review is like several people passing around a contract: the author sends it out, each reviewer scribbles notes, the author revises and sends it back, round after round. The trouble: nobody can say whose move it is; you can't tell which notes are "must fix" and which are "just a thought"; tiny problems a machine could catch (a stray space, bad formatting) still need a human to point out; and there's no clear signal for "this is approved." With tens of thousands of people passing around thousands of contracts a day, those small frictions add up to a huge waste of time.

How it works, intuitively

What it brings / how to choose

What you get: most changes need agreement from just two people, so things move fast; and years later, anyone who wonders "why was this line written this way?" can dig up the original review and find out. The honest cost: it is so tightly wired into Google's own codebase, editor and checking tools that nobody outside can use it — when Google works on open-source projects, it uses a different tool.

One line to remember

A good review tool doesn't do the talking for people. It does three things: lets machines catch the small stuff first, makes it obvious whose turn it is, and turns "can this go in?" into one clear green light — the rest is trust between colleagues.

Want to see what the tool adds at each of the six review stages, why analysis results come in just "red / not red," how the attention set updates itself, why LGTM and Approval are separate, why the "Needs More Work" score was cut, and how it differs from the open-source Gerrit? → Switch to Deep read