Code Comprehension · Introduction New round
Code comprehension
Google’s new interview round: an hour inside a small codebase you didn’t write. Read it, find and fix a bug, add a feature and make it faster, with an AI assistant whose answers you have to check. This course teaches the method, then trains it on 72 bugs to find and 5 full rounds.
On this page
The round in a minute
Google is piloting it for some junior and mid-level software engineering roles in the US. You get a small codebase, a few files, and about an hour, in stages: read it and say how it works, fix a reported bug, add a small feature, and optimise something slow. An AI assistant is open next to you. Using it is allowed; checking what it says is part of the score.
The interviewer isn’t only waiting for answers. They watch how you get there: do you understand the code before you change it, reproduce the bug, narrow it down with evidence, fix the cause, prove it with a test, and keep everything else working? Other companies run the same idea as a debugging round, a bug squash or a code review. Lesson 1 explains what’s known, and since it’s a pilot, ask your recruiter what yours will look like.
Try one now
Every page is one item short. The shop shows its products a page at a time. Customers report that every page has one product fewer than it should, and some products never appear on any page at all. Read the code, then click the line you think is wrong.
// Returns the items for one page. Pages start at 1.
function paginate(items, page, size) {
const start = (page - 1) * size;
const end = start + size;
return items.slice(start, end - 1);
}Read it, then pick a line.
What does slice do with its second argument: include it, or stop before it?
Found it? See the fix, how you’d find it and what to say.
What you’ll learn
First, the method, in 8 short lessons:
- 1The code comprehension round, explained
What Google’s new code comprehension round is, what happens in its hour, where else the same round shows up, and what the interviewer actually scores.
- 2Read code you didn’t write
Before you hunt for a bug you need to know what the code is meant to do and what it actually does. A way to read unfamiliar code fast, without getting lost.
- 3Reproduce it first
The step most people skip, and the one interviewers notice. Turn the report into a failing test before you change a line.
- 4Narrow it down
From a failing test to the exact line: read the symptom, guess the family, then check your guess cheaply. Change one thing at a time.
- 5Fix it, then prove it
Fix the cause, not the symptom. Keep the change small. Then prove it: the failing test passes, the others still do, and the edges are covered.
- 6Add a feature, then make it faster
After the fix, the round asks you to change working code: add a small feature, then make something faster. How to do both without breaking what already works.
- 7Work with the AI, and check it
In the new round an AI assistant sits next to your code. Using it is allowed; trusting it blindly is what loses the round. When to ask, how to ask, and how to catch a confident wrong answer.
- 8Say it out loud
The interviewer can only score what they hear. A simple script to talk through any debugging problem, what to say when you’re stuck, and how to sum up a full round.
Then Find the bug: 72 drills in 12 families, the kinds of bugs these rounds are built on, easy to hard. Each one is a single function and a report: the fastest way to train your eye.
- 1Off by one0/6
- 2Empty and null0/6
- 3Shared references0/6
- 4Types and comparisons0/6
- 5Numbers0/6
- 6Loops and closures0/6
- 7Async0/6
- 8Races0/6
- 9Strings and dates0/6
- 10Sort and search0/6
- 11Caching and state0/6
- 12Errors and security0/6
Last, the full rounds: 5 rounds in the real format, each a small codebase with a bug, an AI answer to check, a feature and a speed-up, against a 60-minute clock.
- ★Round 1: Order history Easy JavaScript
An orders API in three files: the newest orders are missing, then a filter to add and a query to cut.
- ★Round 2: Notification settings Medium JavaScript
A notification service with a settings cache: after one alert, users get SMS for everything. Then quiet hours, then a campaign that makes a thousand reads.
- ★Round 3: Checkout Hard JavaScript
A checkout in three files: some orders get free delivery they shouldn’t. Then a new coupon type, then one price call instead of one per line.
- ★Round 4: The API rate limiter Medium Python
An API’s rate limiter in two files: free users get one request too many. Then a pro plan, then memory that never stops growing.
- ★Round 5: Stock import Hard Python
A stock importer in three files: its report keeps listing old problems. Then suppliers’ new file format, then a lookup that scans everything.
How a drill works
- 1Read the reportWhat users see going wrong. Say what the code should do before you read it.
- 2Read the codeTrace a small input by hand, then click the line you think is wrong.
- 3Open the answerThe bug, the fix as a diff, and how you’d have found it, step by step.
- 4Keep the testThe test that catches it, and the words to say in the interview. Then tick it done.
How a full round works
- 1Start the clockSixty minutes, like the real round. Read the handover and every file first.
- 2Fix the bugReproduce the report, lock in a hypothesis, find the line, then compare with the fix and its test.
- 3Check the AIAn assistant has answered the report confidently. Decide if it’s right before you look.
- 4Add a featureA small change request. Build it to fit the code, with a test, without breaking anything.
- 5Make it fasterCount what it does too much of, fix that, and say what the speed-up costs.
- 6Score yourselfWhat to say at the end, and an honest checklist of what the interviewer scores.
How to finish it
The 8 lessons take an evening or two. Then a family of drills a day (six drills, easy to hard) takes about two weeks. Then the full rounds, one a day, against the clock and out loud, as if it were the interview. The night before, re-read the “Remember” boxes and the end-of-round summaries.
Everything is real code, run before it’s published: each bug really fails its test and each fix really passes; in a round, every stage is run too. Your ticks stay on this device.