Boss lesson · Unit 04
Code nobody wrote
Plausible is not correct: run it, read the tests
What you practise
- Reviewing machine-written code: plausible but wrong, an API that does not exist, tests that assert nothing, claims to verify by running
Try a question from this lesson
Pick one
A teammate opens this pull request. What does the last line of its description give you as a reviewer?
Add leap year helper #301
Adds is_leap(year), written with
an AI assistant.
All tests pass.Correct answer
A claim to check: which tests, asserting what?
Why
"All tests pass" is true of an empty test file. The line tells you where to look next: at the tests, to see which inputs they try and what they assert. Who or what wrote the code does not change that.
The idea
Concept cards are short on purpose. In the app they appear between questions, after you have met the idea.
Concept
Plausible is not correct
Generated code is written to look right. It usually runs, reads well and arrives with tests. None of that is evidence.
Review it like any other change, and watch for its typical failures: a rule that is almost right, a function that does not exist, a test that asserts little, a test edited to agree with a bug.
Whoever opens the pull request is the author, and answers for every line.
10 more exercises in the app
- 2× type the answer
- 5× multiple choice
- 1× true or false
- 1× fill the blanks
- 1× match the pairs
Bitpath is an iOS app in development. Join the waitlist and you get one email when it is ready to try.