Public code review lab
Free code review challenges with explanations and runnable examples
Published
Published by Unrust. Scoring and editorial method
Quick answer
Start with a written contract, predict a boundary case, then compare the original code and a repair using the same input. This public lab offers three worked examples: a retry budget, a consumed iterator and an explicit false default. Each includes an explanation and runnable checks.
Choose a review problem
These short examples focus on one reasoning error at a time. The published answers make them suitable for self-study, team discussion or an attributed tutorial. They are not timed assessments or evidence of a person’s skill level.
| Language | Contract to inspect | Counterexample |
|---|---|---|
| JavaScript | A total attempt budget | Zero and three allowed calls |
| Python | A finite iterable can be read once | The same rows as a list and generator |
| TypeScript | Preserve an explicit false | Omitted, true and false options |
Reproduce the examples
Clone the public MIT-licensed lab. Node.js 22 or later and Python 3 run the supplied checks. The TypeScript example is executed through its documented JavaScript runtime equivalent; its source is also checked by the site’s TypeScript-based authoring test. No account, API key or hosted code runner is required.
The site’s publication check executes each original and repaired snippet and compares the boundary outputs. These checks establish behavior for the stated cases, not a production reliability guarantee.
Use the lab for a focused review session
Give each reader the contract and original snippet first. Ask for a predicted output and the smallest input that could disprove the implementation. Reveal the explanation after everyone has committed to a prediction.
Keep the discussion about observable behavior. If you change the contract, revisit the repair. For example, an attempt budget that includes the first send differs from a retry count after that send.
For broader practice, explore Unrust’s unassisted diagnostic or a topic guide. The public lab is an open teaching resource and is not part of either assessment bank.
A small practice loop
- 01Choose one language and read the contract.
- 02Predict the original output without running it.
- 03Read the explanation and execute the checks.
- 04Publish your own new case with its assumptions and limits.
Common questions
Do these examples require an account?
No. All three worked challenges and the downloadable source are public.
Are these the answers to Unrust’s private assessment?
No. They are separate original teaching examples, deliberately published with their explanations.
Limits of this guide
Three small worked examples cannot establish coding proficiency or measure the effect of AI use.
Check your own starting point
Unrust uses short, timed, unassisted drills to give developers a per-skill snapshot. One session cannot explain the cause of a result, but it can show you what is worth practicing next.
Take the free diagnostic