A from-memory recreation of the live coding test that Lean Techniques offered as a contest at DevOpsDays Des Moines 2023 conference. There was a leaderboard and the top 3 fastest attempts won a prize.
The top score was 5 minutes, 1 millisecond.
Note: The actual integers used in the test assertions differ from what the LT test used, because I didn't memorize them verbatim. The test flow directly mimics the test provided by LT at DevOpsDays.
- Open
index.spec.js
andindex.js
in your IDE - Run
npm test
to execute the Jest test runner - Add logic to
calculator()
until it passes one or more unit tests - Repeat until all the tests pass
- Bonus: time yourself to see if you can beat the record!
The contest did not have Copilot, GPT, etc. enabled. Speed becomes quite trivial if using one of these tools, so try it without first!