Zac Hatfield-Dodds
Zac grew up in Australia eating dark chocolate, reading books, and occasionally indulging in both at the same time. By day he works at Anthropic, an AI safety and research company in San Francisco; by night he (co-) maintains Hypothesis and Pytest, and contributes to a range of other Python projects. You can read more about him at https://zhd.dev/
Sessions
Writing correct software is difficult, and even scientists don’t always get it right
[citation needed].
Hypothesis is a testing package that will search for counterexamples to your
assertions – so you can write tests that provide a high-level description of your
code or system, and let the computer attempt a Popperian falsification. If it
fails, your code is (probably) OK… and if it succeeds you have a minimal input
to debug.
Come along and learn the principles of property-based testing, how to use
Hypothesis, and how to use it to check scientific code – whether highly-polished
or quick-and-dirty!