Your goal: hold one steady working style through an extend, a debug and a production question, the way a real practical round is decided.
How this works (about 45 minutes)
- Part 1, extend (about 19 minutes): read the code, say your plan, make the change in small steps and run the tests whose input starts with
part1.
- Part 2, debug (about 16 minutes): Theo hands you a production report. Nothing is in it beyond the symptom; ask for facts and log lines, he gives one at a time. Reproduce it, fix it, and write
test_regression in the file. Its tests start with part2.
- Production question (about 6 minutes): questions about your own change.
- A shared notepad is there for the report and the log lines. Everything is made up for the exercise. No hints on purpose; a few if you are stuck. Your report comes after.
What scores well
- A plan said aloud before the first edit, then small steps you run
- The old tests kept green; a test that fails first for the new behaviour
- Scope first on the bug: how many, since when, what changed; a reproduction before a fix
- A regression test that fails on the old code, shown or argued
- The cause named apart from the trigger, and what you would do tonight
Tips
- Take Practical Diagnostic first, and the modules on extending and debugging before this.
- Keep your test self-contained: the driver runs it against the old code too.