I am a big fan of assertions. Whenever I reach a point in my code where I say "that pointer can't possibly be null", I immediately write - assert( p != NULL ); - and whenever I say "this list can't possibly be longer than 256"... View Article
Contracts and protocols as a substitute to types and interfaces