Skip to content
DevFlash

Live coding

Code review interview: identify problems and give useful feedback

A review guided by intent, consequences and actionable comments.

  • 5 min read
  • 5 sections
  • Updated November 2, 2026

This guide is under editorial review.

In 1 minute

  • Confirm purpose, scope and acceptance criteria before reviewing the diff.
  • Investigate correctness, edge cases and side effects with verifiable examples.
  • Write feedback with a location, rule and consequence, and reassess findings when new evidence appears.

A code review interview asks you to assess a change and communicate what deserves attention. Finding many details is not the same as reviewing well. You need to understand expected behavior, distinguish defects from preferences and justify each comment's priority. The author should be able to act on what you write.

This guide focuses on reading a proposed change and producing findings and feedback. For implementing with another person, see pair programming interviews. A review first delivers a verifiable diagnosis: which path fails, under what condition and with what consequence. Rewriting the whole solution may not be part of the activity.

How to approach a code review interview

  1. Confirm scope

    Ask about the change's purpose, review scope and available time.

  2. Agree on your role

    Establish whether you should comment only or also suggest fixes.

  3. Read the criteria

    Read the description before the diff and look for acceptance criteria. Otherwise, you may criticize an intentional exclusion or approve working code that does not meet the actual requirement.

  • Understand the result intended for the user or caller.
  • Locate the primary path and inputs that could change its behavior.
  • Read nearby tests and contracts before assuming a rule is missing.
  • Record provisional findings and confirm the most important ones before commenting.

Avoid starting with variable names before understanding whether the flow works. Data corruption deserves attention before formatting preferences. Still, unusual code is not automatically severe. Ask what consequence you can demonstrate. Reading should produce evidence rather than a collection of suspicions presented as facts.

Intent, contracts and change context

Follow data from input to result. Inspect callers, return-value consumers and validation in other layers. If a property may be absent, find the rule establishing that possibility. Do not call something a bug merely because an isolated snippet lacks every imaginable check. The contract may guarantee some conditions, and the review must account for that.

Read the test intended to protect the change. It may pass because it always uses the same reference or never exercises an error state. That does not prove the implementation is wrong; it identifies missing evidence. Use technical assessment criteria to organize correctness, readability and verification without assuming every team prioritizes them identically.

Example: hidden mutation in sorting

Consider a function returning the newest item from a list. Its contract requires preserving the original order for another consumer. The first version finds the item but sorts the input array. The second copies before sorting. Connect that difference to the affected consumer instead of merely claiming mutation is always forbidden.

type Entry = { id: string; createdAt: number };
function newestBefore(entries: Entry[]): Entry | undefined {
return entries.sort((a, b) => b.createdAt - a.createdAt)[0];
}
function newestAfter(entries: readonly Entry[]): Entry | undefined {
return [...entries].sort((a, b) => b.createdAt - a.createdAt)[0];
}
const entries = [{ id: "old", createdAt: 1 }, { id: "new", createdAt: 2 }];
newestAfter(entries);
console.assert(entries[0]?.id === "old");

A possible comment is: 'Blocking: sort changes the input array's order. The caller reuses this list for display order, which must remain unchanged. Could you preserve the input and add a test checking its order after the call?' The comment gives a condition, consequence and verifiable request without demanding a complete rewrite or assuming bad intent.

The copy preserves the array while sharing its objects; explain that limit if relevant. A scan without sorting is another option. Discuss its cost benefit separately according to expected input size. Combining a confirmed defect with optional optimizations makes it harder to tell what must be fixed.

Before and after: tangled lines on the left, aligned code bars on the right and a comment bubble between them.
A useful review connects feedback to a rule and a consequence that can be verified.

Blockers, suggestions and preferences

Explain severity through impact rather than dramatic labels. A blocker prevents the contract from being met or leaves a concrete risk requiring resolution before delivery. A suggestion improves clarity or maintenance without fixing a demonstrated failure. A preference concerns equivalent alternatives. Established project conventions provide better criteria than personal taste.

If there are many findings, lead with the strongest evidence and most consequential impact. Group repeated symptoms of the same cause. A problem in one function may appear across several lines, but the author does not need five equivalent requests. Phrase uncertain findings as questions and state what still needs confirmation.

Writing comments and discussing the review

Do

  • Write comments that identify the location, rule and consequence. Include a small example when it clarifies the issue.
  • Suggest a direction and reassess the finding if the author supplies an unknown constraint. Revising an opinion in response to evidence is part of good review.

Avoid

  • Presenting your implementation as the only option.

When discussion requires execution, use the live debugging approach to separate reproduction from hypotheses. If asked to implement the fix, explain your reasoning as in live coding. Close by summarizing confirmed blockers, open questions and optional suggestions. State which paths you could not inspect within the available time.

Frequently asked questions

How does a code review interview work?

You receive code or a proposed change to analyze and discuss. You may need to comment, prioritize findings or suggest edits. Confirm the format and focus on expected behavior and the consequences of the change.

What should I inspect first in a code review?

Start with the change's intent and acceptance criteria. Then follow the main path, contracts and tests. Style is easier to assess once you understand required behavior and the rules involved.

How can I give feedback without sounding aggressive?

Discuss code and consequences without judging ability or intent. Show an example, explain impact and make a clear request. Distinguish confirmed defects from questions and leave room for context you do not yet know.

Do I need to fix every issue I find?

Not necessarily. The activity may require review only, and time demands prioritization. Deliver the most relevant findings with evidence and severity. Implement changes only when that belongs to the agreed session scope.

Practice with real tests

Solve front-end exercises in the browser, with the same tests a reviewer would run.

See the exercises