Skip to main content
Part 7 of 7 · Chapter 3 of 4

Proving It Works, Not Just Believing It

Running a program and reading the output by eye works fine until it has more than one path through it. Write an assertion that checks the answer for you, and let it fail loudly the moment the code stops agreeing with itself.

Advanced10 min read

Read first: Naming a Piece of Work


Make a free account to read on

Every chapter is free — an account is how your progress, XP, and streak follow you from your laptop to your phone, and how you show up on the leaderboard. No payment, no trial.