This was the part I felt most comfortable with, but I still fumbled a bit by jumping straight into line-level stuff before stepping back.
Start by summarizing the PR's purpose and scope, then evaluate its architecture against separation of concerns, layering, and API contracts. Provide balanced feedback, highlighting strengths and suggesting improvements with concrete examples.
Pro tip: Frame your critique around maintainability, scalability, and team velocity—Airbnb values engineers who think about long-term system health and cross-team impact, not just code correctness.
Read the PR description, linked issues, and any design docs to grasp the problem being solved and constraints. This ensures your critique is relevant and aligned with business goals.
Check if responsibilities are clearly divided among modules, classes, or services. Look for signs of god objects, mixed concerns (e.g., business logic in controllers), and tight coupling.
Verify that layers (e.g., presentation, domain, data) are respected and dependencies flow inward. Ensure that changes don't leak abstractions or bypass intended boundaries.
Examine public APIs, DTOs, and service interfaces for clarity, consistency, and backward compatibility. Check for proper versioning, error handling, and documentation.
Summarize findings, prioritize issues, and suggest concrete improvements. Discuss trade-offs (e.g., short-term speed vs. long-term maintainability) and ask clarifying questions.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Spotted the swallowed exception pretty fast, but completely missed a null return that should've thrown.
Systematically scan the PR for error-handling anti-patterns by tracing each function's failure paths, then classify issues by severity and impact. For each finding, explain the root cause, the potential production consequence, and a concrete fix that aligns with the codebase's conventions.
Pro tip: Prioritize issues that could cause silent data corruption or inconsistent state over those that merely log poorly—interviewers at Airbnb care most about correctness and blast radius. Also, mention how you'd add tests or assertions to prevent regressions, showing you think beyond the immediate fix.
Trace how errors flow through the changed code: identify every function call that can fail and check whether its error is returned, logged, or swallowed. Look for empty catch blocks, ignored return values, and default fallbacks that mask failures.
Check for null returns where an error should propagate, and for dereferences of potentially null values without guards. Verify that optional values are explicitly handled rather than silently defaulted.
Examine loops, array indexing, pagination, and arithmetic for off-by-one errors. Pay special attention to inclusive/exclusive bounds and empty-collection edge cases.
For each issue, determine the worst-case production impact (e.g., data loss, incorrect responses, crashes) and rank them by severity. This shows you can distinguish critical bugs from minor style issues.
Suggest concrete code changes (e.g., propagate errors, add validation, adjust loop bounds) and recommend tests or static analysis rules to catch similar issues in the future.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Start by clarifying the scope of the PR and the concurrency model (e.g., threads, async tasks, distributed nodes). Then systematically scan the code for shared mutable state and check-then-act patterns, explaining how each could lead to race conditions or data corruption. Finally, propose concrete fixes such as locks, atomic operations, or immutability, and discuss trade-offs.
Pro tip: Don't just list issues—prioritize them by likelihood and impact, and suggest how to test for them (e.g., stress tests, race detectors). This shows you think about prevention, not just detection.
Ask about the execution environment (threads, async, distributed) and the specific components in the PR. This ensures you focus on relevant concurrency issues.
Look for variables, objects, or resources accessed by multiple threads/tasks without synchronization. Note their scope and lifetime.
Find patterns where a condition is checked and then acted upon without atomicity (e.g., if (map.containsKey(k)) map.put(k, v)). These are prime race condition candidates.
Check if locks, atomic variables, or other mechanisms are used correctly. Look for missing locks, lock ordering issues, or overly coarse locking.
Suggest solutions like fine-grained locking, lock-free data structures, or immutability. Discuss performance, complexity, and correctness trade-offs.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.
Felt like the most open-ended part and I think I handled it okay.
Start by clarifying the PR's purpose and scope, then evaluate it against testability and long-term maintainability criteria. Frame your decision as a trade-off between short-term velocity and long-term health, and propose concrete changes if needed.
Pro tip: Show that you consider the PR's impact on the team's future velocity and the cost of ownership, not just the code itself. Mention that you'd pair with the author to address concerns collaboratively.
Ask about the problem it solves, the expected behavior, and any constraints. This ensures you understand the change before judging it.
Check if the code is easily testable: are there unit tests, integration tests, and clear interfaces? Identify any hard-to-test logic or missing coverage.
Look for code clarity, modularity, documentation, and adherence to team conventions. Consider future changes and potential technical debt.
Based on the assessment, choose to accept, request changes, or reject. Justify with specific examples related to testability and maintainability.
If requesting changes, suggest concrete improvements and offer to help. If accepting, note any follow-up work. If rejecting, explain why and suggest alternatives.
AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.