Hunting the Bugs
summary
Advice is: write a failing integration test before touching code so the bug can’t silently return; start at the bottom of the stacktrace to find the exception and trace callers; use PDB breakpoints to stop midrun — remember pdb w prints the stack so you can inspect call context; concrete gotcha shown is a function that turns a number into a string causing a division error because bad_function mangles the type; when searching for fixes add a 3 to searches to avoid Python 2 results.
AI-written summary · about
chapters (6)
- 0:00Start
- 0:02HUNTING THE BUGS MARIA MCKINLEY
- 2:38WRITE AN INTEGRATION TEST THAT FAILS
- 11:50PUT A BREAK POINT IN CODE YOU BELIEVE YOUR TEST SHOULD PASS THROUGH
- 13:04LEAVE THE BREAKPOINT IN, USE A SIMILAR TEST
- 14:13ALWAYS SUSPECT YOUR OWN CODE FIRST
related talks
23mDebugging that bugger : Cleanly handling the errors
04mWhat Bug Hunting Taught Me About Hunting Bugs
23mEntomology 101: Effective Bug Hunting
38mLearning from your bugs
47mHunting Heisenbugs
23mTroubleshooting the fudge out of it
39mAdventures in Bug Hunting
01h 00mEliminating bugs: testing is not enough
