I was having a Skype conversation with Pete Brown and he said “Why don't you blog this stuff, or set up a GitHub project or something with these things?”. I told him, “well, actually, I just started blogging!”
That conversation gave me a figurative kick in the tuchus, so I decided to share a small nugget.
- Checking all your assumptions
- Checking all your parameters for null or incorrect values
- Verifying things like loop invariants, preconditions, postconditions, http://en.wikipedia.org/wiki/Code_contract, etc
Given that I think like this, I tend to use debug assertions a lot.