Lessons from 13 years of tricky bugs
- Some of the hardest bugs to track are those caused by code failing silently.
- Event order matters. Imagine all event orders possible while writing code.
- Complicated if statements & missing else statements cause more bugs than you think.
- Add enough logging so you can tell why the program does what it does.
- Always test with zero & null conditions.
- Reveal bugs by using random input.
- Always check that an action that shouldn’t happen doesn’t happen.
- Commit different changes in different commits and use clear descriptions of the changes.
Full post here, 9 mins read