Practice & Assessment
Test your understanding of Code Review: Reading Others' Changes
Multiple Choice Questions
6In a unified diff, what does a line starting with + indicate?
When reviewing a large pull request, what should you read first to get the best overview of what changed?
A code review comment says: 'Use === instead of =='. What is missing from this comment?
You're reviewing code that modifies a cryptographic key rotation process you know nothing about. What is the most valuable review action?
A reviewer leaves a comment you disagree with and requests a change. What is the correct response?
Which of these code review comments is a Blocker?
Coding Challenges
1Code Review Audit
Go to https://github.com/expressjs/express/pulls and find any merged pull request from the last 6 months with at least 5 files changed. Perform a code review by writing a review.md file containing: (1) Diff Summary — in 3 sentences, describe what behavioral change this PR made (read tests first). (2) Correctness Check — identify at least 2 things you verified are correct, with line references. (3) Issues Found — identify at least 1 real or potential issue you found (or note if you found none and why). (4) Feedback Comments — write 2 review comments in proper format: one Blocker or Suggestion with explanation of why, and one positive comment acknowledging something done well. Input: the chosen PR diff. Output: review.md. Time estimate: 20–25 minutes.
Mini Project
Code Review Practice Partner
Build a structured code review practice tool. It must: (1) Accept a GitHub PR URL as input (parse owner, repo, PR number). (2) Use the GitHub API (no auth needed for public repos) to fetch the PR diff and description. (3) Display the diff with + and - lines color-coded in the terminal or a simple HTML page. (4) Provide a guided review checklist the user completes interactively: correctness (null checks, error handling), security (input validation, auth), test coverage (visible in diff), and style conformance. (5) Accept the user's review comments for each checklist item and export them as a formatted review.md file. Use all Module 6 concepts: diff reading, review prioritization, comment classification, and feedback structuring. Optionally: use the GitHub API to post the review comments directly to the PR.
