read the transcript!
If your program already has tests, adding a failing test is a great way to work on your bug!
Illustration of a smiling stick figure with curly hair.
person (thinking): this function should return X, but it’s returning Y
- it forces you to pinpoint what exactly the bug is
- it’s easy to tell when you’ve fixed it (the test passes!)
- you can keep the test to make sure the bug doesn’t come back
© Julia Evans 2021 | All rights reserved (see the FAQ for notes about licensing)