Boss lesson · Unit 03
Review a pull request
Description, tests, diff, verdict
What you practise
- A description, a diff and its tests: choose the comments that matter, order them, and decide: approve, request changes, or ask
Try a question from this lesson
Pick one
You are asked to review a pull request and start with its description. What is this description to you as the reviewer?
Add coupon codes to checkout #212
Adds apply_coupon(total, code).
Totals are whole cents.
Unknown codes are ignored.
Tests added.Correct answer
A list of claims to check against the diff
Why
Each line is a claim: what was added, in which unit, how odd input behaves, what is tested. Reading it first gives you four things to verify, and any gap between claim and code is a finding.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
A reading order for reviews
1. The description: what is claimed, and why. 2. The tests: which claims are proven. 3. The diff: boundaries, missing cases, defaults, callers. 4. The inputs the author did not try.
Then write your comments, the heaviest first, and give a verdict that follows from them.
10 more exercises in the app
- 2× type the answer
- 4× multiple choice
- 1× fill the blanks
- 1× match the pairs
- 2× order the lines
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.