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.

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.

EasyBehavioral
73 practiced

Behavioral: Tell me about a time when you found a critical bug or security issue in infrastructure code during a code review. Use the STAR format: describe the Situation, the Task you had, the Actions you took as reviewer and with the team, and the Results (including any follow-up changes to process or automation).

MediumTechnical
79 practiced

Your team wants to improve the code-review process to reduce blind approvals and improve quality without slowing delivery. Propose concrete process changes, tooling adjustments, and rollout/feedback mechanisms to increase review effectiveness and collaboration.

HardTechnical
67 practiced

Technical debugging: review the following Python snippet intended to concurrently fetch metadata for hosts. Identify race conditions and concurrency issues, and propose a corrected, thread-safe implementation with reasoning.

python
import threading
hosts = ['a','b','c']
results = []

def fetch(h):
    data = get_metadata(h)
    results.append((h, data))

threads = []
for h in hosts:
    t = threading.Thread(target=fetch, args=(h,))
    threads.append(t)
    t.start()
for t in threads:
    t.join()
print(results)

Assume get_metadata may raise exceptions and is non-blocking I/O bound.

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.