InterviewStack.io LogoInterviewStack.io

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.

EasyTechnical
61 practiced

As a systems engineer reviewing infrastructure code (Terraform, Ansible, Bash, Python), create a practical code-review checklist you would apply to pull requests. The checklist should cover correctness, clarity, maintainability, performance, security, testability, operational readiness (observability, rollback), documentation, and dependency/secret handling. For each checklist item include a 1-2 sentence rationale and a concrete example of what to look for in PR diffs or code.

EasyTechnical
67 practiced

You open a PR that contains 25 files with mixed issues: a bug in a provisioning script, a security misconfiguration in Terraform, and many minor style issues. As the reviewer, explain how you would triage and classify comments into 'must-fix before merge', 'should-fix before merge', and 'optional', and give two example comments for each category with justification.

MediumTechnical
88 practiced

You are reviewing an Ansible playbook intended to be idempotent. Identify problems in this snippet and propose changes to make it idempotent and testable.

yaml
- hosts: web
  tasks:
    - name: install nginx
      command: apt-get install -y nginx
    - name: create conf
      copy:
        content: "server { listen 80; }"
        dest: /etc/nginx/sites-enabled/default
    - name: restart nginx
      service:
        name: nginx
        state: restarted

What would you change and why? How would you test the playbook in CI?

MediumTechnical
84 practiced

You're reviewing a SQL database migration script that will alter a large table used by a high-traffic service (5GB, heavy writes). List the code-review and operational items you would check specifically for migrations. Cover transactional behavior, lock duration, backfills, rollout strategy, monitoring, and rollback.

Unlock Full Question Bank

Get access to all 31 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.