Today’s thought for the day from A Word A Day is:
Not being able to govern events, I govern myself.
-Michel de Montaigne, essayist (1533-1592)
This struck me as being very much the idea behind defensive programming. Because we don’t know what sort of events life will throw at a programme, we need for it to be robust and able to respond to most anything, barring, of course, Fear, Fire, and Foes.
So how do we go about doing so? For starters, there’s testing, whether BDD or TDD. Boundary conditions and fencepost errors frequently cause grief. And any time the programme interracts with the “outside” there’s room for error — whether it be bad data or an I/O error.





The dyslexic interpretation of your hand-written comments:
Assume no one is good!
Trust Paranoia!
Nothing in moderation!
Of course, the corollary is “moderation is for monks”