Skip to Content

A stick figure smiling

Here's a preview from my zine, The Pocket Guide to Debugging! If you want to see more comics like this, sign up for my saturday comics newsletter or browse more comics!

Image of a comic. To read the full HTML alt text, click "read the transcript".

browse more comics! get the zine!
read the transcript!

Some 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 this variable is undefined!!!

Illustration of a program, represented by a box with an unhappy face.
program (thinking): “this variable is undefined!!! STOP EVERYTHING!”

This is a great way to force yourself to think about what’s ALWAYS true in your program, and check if you’re right.

Illustration of a smiling stick figure with curly hair.
person (thinking): “the radius can never be 0, right? or can it?”

Saturday Morning Comics!

Want another comic like this in your email every Saturday? Sign up here!

I'll send you one of my favourite comics from my archives every Saturday.
© Julia Evans 2024 | All rights reserved (see the FAQ for notes about licensing)