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!
read the transcript!
Lots of code isn’t documented. But when there are no docs, there’s always the source code! It sounds intimidating at first, but a quick search of the code sometimes gets me my answer really quickly.
Tips for exploring an unfamiliar library’s code:
- search the tests! Tests are a GREAT source of examples.
- git clone it locally to make it easier to navigate.
- search for your error message and trace back.
- if it’s a Python/JS/Ruby library, sometimes I’ll edit the library’s code on my computer to add print statements (just remember to take them out after!)
Saturday Morning Comics!
Want another comic like this in your email every Saturday? Sign up here!