Code Review and Working with Existing Codebases Questions

Reviewing others' code and navigating unfamiliar systems: giving and receiving actionable review feedback, spotting correctness and design issues, and reading and understanding large or legacy codebases before changing them. Covers collaborative coding norms, incremental change in shared repositories, and verifying changes against existing behavior. The team-facing side of day-to-day engineering.

HardSystem Design
64 practiced

You are reviewing a data migration that renames a heavily used column and requires backfilling millions of rows. Design a rollback-safe migration strategy that can be reviewed and approved. Cover schema changes, dual-write/read strategies, backfills, verification, monitoring, and how code review should verify each migration step.

MediumTechnical
80 practiced

Technical coding: Given the following Python function used in a deployment script, write pytest unit tests that cover normal behavior and edge cases. Mock external API calls.

python
import requests

def get_latest_image(repo):
    r = requests.get(f'https://registry.example/api/{repo}/latest')
    r.raise_for_status()
    return r.json()['tag']

Provide at least three tests and explain why you chose them.

EasyTechnical
61 practiced

Explain the primary goals of a code review in a software team. List at least three concrete categories reviewers typically evaluate (for example correctness, tests, readability) and give a one-sentence example of what a reviewer might look for in each category when reviewing a pull request.

MediumTechnical
112 practiced

You find this Python function in a PR: def append_to_list(item, lst=[]): lst.append(item); return lst. As a reviewer, explain the bug, why it occurs, how you would phrase the review comment, propose a corrected implementation, and write one unit test that would have caught the bug.

HardTechnical
74 practiced

Design a set of static analysis rules to detect common concurrency bugs in a Java codebase. Provide at least four rules, explain the detection heuristic and likely false positives for each, and suggest mitigations.

Unlock Full Question Bank

Get access to all Code Review and Working with Existing Codebases interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.