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:
- What is the code review interview round at Google?
- How does the Google code review interview work?
- Google code review interview best practices
- How to prepare for the Google code review interview
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 3-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 an expert
Practicing on your own works but only up to a point. You can practice with friends and peers, but you'll soon start noticing that the feedback you’re getting from them isn't helping you that much anymore.
That's why we recommend practicing code review mock interviews with ex-interviewers from Google and other top tech companies. This can make the difference between performing just fine in your interview versus doing great and getting the job.
If you know someone who has experience running code review interviews at Google, then that's fantastic. But for most of us, it's tough to find the right connections to make this happen. And it might also be difficult to practice multiple hours with that person unless you know them really well.
Here's the good news. We've already made the connections for you. We’ve created a coaching service where you can practice 1-on-1 with ex-interviewers from leading tech companies like Google.
Doing code review interview practice with ex-interviewers from Google will help you improve how you explain your thought process and how you write clear and concise comments, engage in the right kind of dialogue with the interviewer, and perform well under pressure. They can also help you with the rest of your EM interview rounds.
Make sure that you write down the feedback you receive after each mock interview session. Use it to create action items for yourself, and to know exactly what you should do to improve. The more mistakes you make and address in mock interviews, the fewer mistakes you’ll make when it counts! Learn more and start scheduling sessions today.