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.

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.

HardTechnical
89 practiced

Leadership: You're in a large engineering org where reviewers are overloaded and PR latency is high. Propose a scalable manual-review strategy combining automation, triage, reviewer assignment rules, and code ownership. Explain how to maintain quality while reducing time-to-merge and preventing reviewer burnout.

EasyTechnical
67 practiced

You are reviewing a short Bash script authored by an operations engineer. Identify bugs, anti-patterns, portability and safety concerns, and propose fixes. The script:

bash
#!/bin/bash
DIR=$1
if [ ! -d $DIR ]; then
  mkdir $DIR
fi
for file in $(ls $DIR); do
  sudo echo 'Processing' $file
  rm -rf $DIR/$file
done

What would you comment on in the PR, and how would you rewrite or patch this script to be safer and idempotent?

EasyTechnical
60 practiced

You find a change in a PR that appears to add API keys and database passwords as plain text constants in a repository. As the reviewer, what steps do you take immediately and what long-term code-review policies and automated checks would you recommend to prevent credentials from being committed? Include remediation for secrets already committed to history.

HardTechnical
62 practiced

Advanced technical domain: A long-running monitoring agent has a memory leak in production. As a reviewer of the agent's codebase, describe the steps you would take to identify leaking code during review: which profilers and CI checks to add, which code patterns to look for (circular refs, global caches, goroutine leaks), and what automated tests or metrics would catch regressions early.

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.