What is code review? Explained with a second cook at the pass
Code review is when someone other than the author reads a code change, flags problems and approves it before it goes live. Like a second cook checking each plate before it leaves the kitchen.
- Author
Umair Mateen- Published
- Reading time
- 5 min
- Category
- Engineering
This week Anthropic's Claude Ship agents started reviewing GitHub pull requests, and GitHub said Copilot code reviews will be billed to the organization from 30 December, so here is what a code review actually is.
In one sentence: Code review is when someone other than the author reads a proposed change to a program, looks for problems, and either asks for fixes or approves it before it joins the main version.
The everyday picture
Picture a busy restaurant kitchen. A cook finishes a plate. Before it goes out to the dining room, a second cook at the pass takes a look.
They check the plate matches the order, nothing is missing, and it will hold up on the way to the table. If something is off, they say what and send it back. If it is good, it goes out.
The second cook is not there to cook it their own way. They are there to catch what the first cook could not see after a long shift. That check at the pass is code review.
The developer hands over a change, the reviewer sends notes back, and only the fixed, approved change goes live.
How it works, step by step
- The developer (the first cook) makes a change, usually on a separate copy of the code, and puts it forward for review. On GitHub this proposal is a pull request.
- The reviewer (the second cook at the pass) reads the change. Google's public review guide lists what to check: the design, whether it works as intended, whether it is simpler than it needs to be, tests, clear names, comments and style. It also says to look at the whole file, not just the changed lines.
- Review comments (the notes sent back with the plate) point to specific lines. On GitHub a reviewer can just comment, approve, or request changes that must be dealt with before merging.
- The fix (the plate corrected and brought back) is the developer answering the notes and updating the change. The reviewer looks again.
- Approval (the plate leaving the pass) lets the change join the main version. Google's guide says to approve once a change clearly improves the code overall, even if it is not perfect.
Try it · Everyday ↔ real
Can you match the kitchen to the code review?
Switch between the two and see how each part lines up.
- First cook
- Finished plate
- Second cook at the pass
- Notes sent back
- Plate goes out
A second cook checks each plate at the pass before it goes out.
| Everyday | Real |
|---|---|
| First cook | Developer (author) |
| Finished plate | Proposed code change |
| Second cook at the pass | Reviewer (person or AI) |
| Notes sent back | Review comments |
| Plate goes out | Change approved and merged |
Where the picture stops
- A plate is checked in seconds. A code change can be hundreds of lines, and some problems only show up when it meets the rest of the system. That is why reviewers also rely on automated tests.
- In a kitchen one person usually checks. In software a team can require several approvals, and GitHub can ask the owners of certain files to review any change to them.
- Today the second checker can be an AI tool. It reads quickly and suggests fixes, but GitHub says Copilot "is not guaranteed to spot all problems" and advises a human review as well.
Why it matters for your business
- Fewer bugs reach customers. A second reader catches mistakes, missing cases and risky shortcuts before they go live.
- Less dependence on one person. At least two people understand every change, so knowledge does not leave when someone does. Google's guide also notes reviews help teach good habits.
- AI review has a real cost and a real limit. AI reviewers can give fast first feedback, but they are billed per use and can miss problems. Decide who pays and keep a person in charge of approving.
- A record of who approved what. Review comments and approvals stay with the change, which helps when you need to trace a problem later.
Try it · Myth or fact
Code review: myth or fact?
Decide for yourself first, then tap each statement to check it.
0 of 4 checked
An example
Imagine a 12-person travel agency with one in-house developer and an outside contractor. The contractor changes how booking refunds are worked out. The developer reviews it and spots that refunds for cancelled group trips are now counted twice. They leave a comment on that line and request changes. The contractor fixes it and adds a test for group bookings. The developer approves, and the change goes live without a single wrong refund.
Frequently asked questions
Is code review the same as testing?
No. Tests are code that checks the program automatically. Review is a person, or an AI tool, reading the change. Good reviews also check that the right tests were added.
Can AI do code review?
Yes, tools like GitHub Copilot and Claude can review pull requests and suggest fixes. They can still miss problems, so most teams keep a human approval before anything merges.
What does a reviewer look for?
Mainly whether the change is well designed, works as intended, is easy to understand and has tests. Style and naming matter too, but small points are often marked as optional.
Does every change need a review?
Most teams review every change to their main code. On GitHub, admins can make approvals required, so nothing merges without one.
Related explainers
The DevDrift sets up workflows where AI tools review code and people make the final call: see how.
Sources
Could you explain this to a colleague now?
Mark it and posts that mention it will show a tick. Saved in this browser only.