stopgaps
In high-school, the teacher who taught a programming class and worked to write a Java-based voting system insisted they build in logging functionality, in spite of the iron-clad storage of data into text files. This discussion made an impression upon me because the best and worst thing about programming and computers is they do exactly what they're told to do. Unfortunately, this means that the error of lowly humans can easily seep into what the code or program asks the computer to do.
We were reminded of this lesson at iContact. Just because your software 'should' never do something, doesn't mean you shouldn't make these rules explicit. An emergency bugfix to our queues at iContact had a trojan horse to allow messages from Client A to be matched with subscribers from Client B. Clearly this is bad, and now we're putting a patch in to detect and throw exceptions if any situation like this occurs. This is, however, a great example of where things that should never happen are still worthy of writing software to prevent. It's not shameful, it's insightful to admit that as a programmer we are human and don't understand as much as we might like.