![A stick figure smiling](/images/welcome.jpg)
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".](/images/uploads/the-pocket-guide-to-debugging-wizard-zines-42.png)
read the transcript!
It’s much easier to debug when your program does the exact same thing every time you run it.
Illustration of a sad stick figure with curly hair.
person (thinking): “the bug only happens 10% of the time, it’s SO HARD to figure out if my change fixed it or not.”
There are a bunch of tools for controlling your program’s inputs to reduce randomness, for example:
- many random number generators let you set the seed so you get the same results every time.
- faketime
fakes the current time.
- libraries like ruby’s vcr
can record http requests.
- record/replay debuggers like rr
record everything.
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!