Course
Seven lessons and one broken commodities service, aimed at a live pairing test.
Walk into the pairing test able to find what is wrong with a commodities service, say why out loud, and drive the fix test-first — while someone watches. Full statement in the mission.
Stack from the spec: Java 25 · Kotlin · Scala · TypeScript · Spring · Oracle · Redis · Postgres · React · Kubernetes · Docker · Linux · AWS
One Maven project runs through the whole course. It grows a little each lesson, and it always starts red.
cd ~/Desktop/training/bullionvault/exercise/commodities-service
JAVA_HOME=$(/usr/libexec/java_home -v 25) ~/.local/maven/bin/mvn test
Currently: 13 tests, 12 failing. Brief and full sources: browse the exercise. The domain is BullionVault's real published mechanics — kilograms, troy-ounce spot conversion, commission bands, price improvement, partial fills.
Troy ounces to kilograms; the division that throws; the integer division that silently charges nothing; rounding as a business decision. Seven MCQs, and the green test you must not trust.
Build the matching engine test-first. Best price wins, then first arrival; partial fills rest on the board; and the trap — a client deals at a better price than their limit when one is available.
Two threads hit the same resting offer. Watch the lost update happen in a
test, then fix it four ways — synchronized, a compare-and-set loop,
an immutable book, and a database lock — and be able to argue for one.
The spec asks for Oracle experience by name. Read consistency,
SELECT … FOR UPDATE, optimistic locking with a version column,
and why Oracle has no dirty reads to worry about.
Spring's @Transactional is a proxy, so a self-invocation is not
intercepted and your rollback never happens. Propagation, rollback rules, and the
questions that follow.
Caching a price feed in Redis. Cache-aside, TTLs, and the difference between a stale page and a stale price — one is a nuisance, the other is a mispriced trade.
A timed dry run against a fresh bug, narrating throughout, plus interleaved recall across everything above. Spacing and interleaving — the last lesson is deliberately a mixed bag.
Four rules, the rounding-mode table, and the money-type checklist. Every output on it was run, not recalled.
Troy ounce, bid/offer/spread, price improvement, partial match, commission bands, custody. The vocabulary the interview assumes.
| mission | why this course exists and what "ready" means |
| resources | primary sources, ordered by trust |
| learning records | what was decided, and what may need revisiting |
| exercise | the commodities-service brief and its sources |
This course is built to be argued with. If a test looks wrong, if a rounding call seems arbitrary, or if you want a lesson pulled forward — say so and I'll rebuild it.