Advice > Software engineering

How to crack the Google Code Review interview

By Kannika Peña with input from the following coaches: Rashmi V . September 11, 2024
person doing a code review

If you’re applying for the engineering manager role at Google, you may have encountered the code review interview round in your prep. It’s one of two options, the other one being the coding interview round that EM candidates are given during the onsite technical round.

You may have also found that there’s very little information about it online.

But not to worry—in this article, we’ll be going over everything you need to know to prepare for the code review interview round at Google. Here’s what we’ll cover:

Let’s get started!

1. What is the code review interview round at Google?

A code review interview simulates the real-world process of code review. During this round, your interviewer will give you a code snippet which you’ll then need to review to find bugs and errors and recommend ways to optimize it.

According to current Google EM and coach Rashmi: “Your aim during this interview round is to identify potential issues, suggest improvements, and communicate the findings to ensure that issues are caught early in the development cycle.” 

Rashmi makes the point that part of an engineering manager’s job is to help other engineers write better-quality code. So, aside from your technical skills, your ability to collaborate with your interviewer will be assessed as well.

How hard is it to pass a Google code review interview?

You can expect all Google interview rounds to be hard to pass, especially without any preparation. But many candidates say the code review round can be an easier option than the regular coding round, especially if you have real-world coding and code review experience. Just be sure to brush up on the latest code review standards.

2. How does the Google code review interview work?

If you’ve managed to clear the technical screens, your recruiter will inform you about your onsite interview, which will include a technical round. They’ll ask you to choose if you want to do coding or code review during this round. At this point, you should also tell them your preferred coding language.

Like the regular coding interview, the code review interview will last up to 45 minutes. Your interviewer will give you a code snippet, function, or file on Google Docs and instruct you to review it like you would in a real work setting. 

It’s best to leave comments during your code review unless your interviewer tells you specifically to make the corrections directly on the code snippet.

Overall, you’ll be expected to identify potential issues in the code like bugs, flaws in performance, readability, design, issues related to logging, exceptional handling, etc. You’ll also be asked to propose solutions to the issues you spot and improvements in the code.

2.1 What should be checked in a code review interview

During a code review interview, you’ll want to get as close as possible to how you would do a code review in real life, while also taking into account your time constraint.

Here’s a code review checklist that you can follow to make the most of your 45-minute session. This one is inspired by LinearB and Swimm.io’s code review checklists.

  • Functionality. Your first order of business is to spot errors and defects, however minor, to make sure the code functions as intended.
  • Code Quality and Consistency. You want to make sure the code is clear, readable, and maintainable. Check for inconsistent and non-descriptive naming, unclear coding segments without explanations, and unorganized and poorly formatted structure.
  • Security. You’ll need to check for any potential security vulnerabilities. Familiarize yourself with best secure coding practices and ensure that they’re applied. 
  • Performance. You should assess the code for performance implications. This includes efficiency and resource usage. You should also consider any potential impacts on system performance, address any bottlenecks you find, and suggest ways to prevent them.
  • Structure. You should evaluate whether the code is logically organized and that functions, classes, and modules are used appropriately. 
  • Consistency. You’ll want to make sure that in terms of style, conventions, and patterns, the code is consistent with the rest of the codebase.
  • Error-handling. You should check the code snippet for proper error handling and logging mechanisms and ensure that meaningful error messages are provided.
  • Test quality. You’ll want to confirm that appropriate unit tests and integration tests are in place and validate that there are tests that cover edge cases.
  • Dependencies.You should confirm whether the dependencies in the code are managed properly, are up to date, and necessary.
  • Documentation. You should check the quality of the inline comments, function, or method descriptions to make sure that they’re being effectively used.

While you won’t necessarily encounter issues in each of these items, it’s good to keep them in mind to keep your code review efficient and thorough. 

Also, don’t just be on the lookout for errors and bugs.“If the developer has written good quality code, provide positive feedback.” Google EM and coach Rashmi

Not only will this score you points for Googleyness, but it will also show your interviewer that you’re skilled enough to distinguish a good quality code from a bad one.

2.2 What skills do interviewers assess during the code review interview?

Based on this Medium article by engineering leader Manish Kumar, here are some of the skills interviewers will be on the lookout for in your code review round:

2.2.1 Deep understanding of coding/coding skills

Google is an engineer-led company, and so it comes as no surprise that it requires its engineering managers to have a deep understanding of coding. 

However, if you’ve been on the management side of things, you’ll most likely be rusty when it comes to actually writing code. Allowing for this, code reviews are a great way to assess whether your coding knowledge is advanced enough to spot errors and inefficiencies and whether you know what clean and maintainable code looks like. 

2.2.2 Problem-solving skills

As an engineering manager, part of your job is to identify problems and look for ways to solve them. Seeing how you review code and find ways to improve the codebase gives hiring managers insight into how you approach problem-solving.

2.2.3 Attention to detail

For a code review to be effective, you’ll need to be a stickler for details. On a code review round, interviewers can see how well enough you pay attention to details to spot bugs, mistakes, and stylistic problems that may result in suboptimal code.

2.2.4 Collaboration and communication skills

As an engineering leader, you’ll need to have a good balance of technical and interpersonal skills. Code review rounds are a great way to assess both. 

Not only will you have to demonstrate your deep coding knowledge, but you’ll also have to communicate your feedback and choices in a clear, concise, and respectful manner. How you listen to and apply your interviewer’s feedback and hints will also matter.

“Google is highly collaborative. During your code review, your interviewer will also evaluate the quality of comments provided and the language used. Basically evaluating candidates on the Googleyness aspect.” Google EM and coach Rashmi

3. Google code review interview best practices

Here are some tips and best practices to follow to ace your code review interview round at Google and other tech companies.

3.1 Have a code review checklist

You can follow the checklist we provided in Section 2, or come up with your own. Having a checklist will help you keep your code review more thorough.

3.2 Make sure you understand the requirements

Before reviewing the code closely, be sure to ask your interviewer for the requirements and the context of the code snippet you’re provided. They may even give you a hint of what to look for when you start reviewing the code.

3.3 Follow a structured approach

You can come up with a structured approach based on how you do a code review in real life. But you’ll want to polish your approach for the benefit of the interview.

If you don’t already have your own approach, a simple and systematic approach would be to do three passes.

  • First pass: read the entire code snippet to ensure you have a complete understanding; ask any clarifying questions
  • Second pass: do a line-by-line review and identify potential issues in the code like:
    • Bugs
    • Performance, readability, and design flaws 
    • Issues related to logging, exceptional handling, etc. 

Write your comments about errors and code duplications you’ve spotted, questions you may have about any unclear annotations, suggestions for naming variables, then discuss trade-offs, and explain why your choice is the best.

  • Third pass: list points for improvement (data structure, time and space complexity), suggestions for optimization

3.4 Talk your thought process through in a clear and concise way

As you do your review, don’t just quietly add your comments as you go. Discuss your thought process in a simple and straightforward way. Imagine you’re discussing your code review with a junior engineer in a respectful (i.e., non-condescending) manner. 

3.5 Listen for hints and apply feedback accordingly

If your interviewer tries to steer you in a certain direction, follow them. Close to 99% of interviewers have good intentions, and they're trying to help you focus on the interview.

Actively listening to your interviewer shows that you’re open to collaboration, an essential attribute that interviewers at Google are looking for.

3.6 Write respectful, constructive, and actionable comments; avoid nitpicking

Whether in an interview or a real work setting, it helps always to remember that a human made the code you’re reviewing. So be mindful and respectful of how you make comments.

Keep your comments constructive, specific, and actionable. Avoid nitpicking on minor stylistic issues that don’t affect the overall functionality of the code.

Also, keep your comments concise. Avoid overcomplicating your explanations.

4. How to prepare for a Google code review interview

Now that you know what to expect in a Google code review interview, here’s a 4-step plan you can follow to prepare for this particular interview round.

Click here for a more comprehensive interview guide for the Google engineering manager role. 

4.1 Familiarize yourself with Google’s coding standards and industry best practices

Take the time to brush up on the latest best practices in coding and code reviews, and make sure to read up on Google’s coding standards during your prep. Here are a few resources to get you started:

4.2 Practice with open-source projects

Check out open-source projects on GitHub, where you can both contribute and see how experts provide code review comments. 

Apart from brushing up on your code review skills and learning from the experts, don’t forget to practice writing code as well. “Someone who can write good quality code should be able to find high-quality code review comments.” Google EM and coach Rashmi

4.3 Practice with peers

If you have friends or peers who can do mock interviews with you, that's an option worth trying. It’s free, but be warned, you may come up against the following problems:

  • It’s hard to know if the feedback you get is accurate
  • They’re unlikely to have insider knowledge of interviews at your target company
  • On peer platforms, people often waste your time by not showing up

For those reasons, many candidates skip peer mock interviews and go straight to mock interviews with an expert. 

4.4 Practice with experienced coding interviewers

In our experience, practicing real interviews with experts who can give you company-specific feedback makes a huge difference.

Find a Google coding interview coach so you can:

  • Test yourself under real interview conditions
  • Get accurate feedback from a real expert
  • Build your confidence
  • Get company-specific insights
  • Save time by focusing your preparation

Landing a job at a big tech company often results in a $50,000 per year or more increase in total compensation. In our experience, three or four coaching sessions worth ~$500 make a significant difference in your ability to land the job. That’s an ROI of 100x!

Click here to book coding mock interviews with experienced Google interviewers.
 

Related articles:

String interview questions
Software engineeringJun 29, 2022
51 string interview questions (coding problems with solutions)
List of string questions for coding interviews with links to high-quality solutions, plus a string refresher and cheat sheet.
Read more
a female FAANG candidate smiles next to a whiteboard
Software engineeringNov 15, 2023
FAANG interview questions (SWE, PM, etc) + answers
Comprehensive list of FAANG interview questions for software engineers, product managers, engineering managers, etc. With links to high-quality answers, frameworks and explanations.
Read more
tree interview questions and answers
Software engineeringSep 17, 2021
50+ tree questions and solutions (easy, medium, hard)
50+ tree interview questions, all with links to high-quality solutions, plus a tree refresher and cheat sheet. Part 5 of our coding prep series to help you ace your software engineer interview.
Read more
Meta machine learning engineer interview
Software engineeringJul 10, 2024
Meta Machine Learning Engineer Interview (questions, process, prep)
Complete guide to Meta (formerly Facebook) machine learning engineer interviews. Learn more about the role and the interview process, practice with example questions, and learn key interview and prep tips.
Read more
a laptop split screen, with code on one side and a video call participant on the other
Software engineeringJul 27, 2023
47 Coding interview examples with answers (in Python, Java, C++, Etc.)
The best coding interview examples / questions with video answers in common coding languages including Python, Java, C++, Javascript, and SQL.
Read more
Meta logo interview process
Software engineeringAug 28, 2024
Meta Interview Process & Timeline: 7 Steps To Getting An Offer
Complete guide to the seven steps of the Meta interview process, including what to expect for each step, from screening to full loop interviews to hiring committee and offer stage.
Read more
Latency, throughput, and availability system design interview
Software engineeringFeb 14, 2023
Latency, throughput, and availability: system design interview concepts (3 of 9)
This guide covers latency, throughput, and availability, and how to approach them in system design. This is the 3rd of 9 foundational system design interview concepts that we're covering on our blog.
Read more
LinkedIn software engineer interview
Software engineeringSep 17, 2020
LinkedIn software engineer interview (questions and process)
This is a complete guide to LinkedIn software engineer (SWE) interviews. It covers LinkedIn's interview process, practice questions, and preparation tips.
Read more