title: sprinkle assertions everywhere Many languages have an `assert` keyword that you can use to crash the program if a condition fails. Assertions let you: * come up with something that should ALWAYS be true * immediately crash the program if it isn't illustration: program (thinking): "STOP EVERYTHING! this variable is undefined!!!" For example, you might assert that: * "impossible" things aren't happening ("the radius should always be positive") * variables are defined (or nonzero, or nonempty)
https://files.mastodon.social/media_attachments/files/109/382/788/806/385/033/original/d08d5ed67ca3ec27.png