Recently I attended Jeffrey Richter\'s training courses about .NET. He mentions one strategy of coding \"Dying is awesome\". That is, don\'t write \"catch (Exception ex)\" e
Also known as Offensive Programming.
You should check out, "Offensive Programming: Crash Early, Crash Often".
Which is a very different ideology from the norm of Defensive Programming:
[Defensive Programming] is intended to ensure the continuing function of a piece of software in spite of unforeseeable usage of said software.
I personally like the "Crash Early, Crash Often" philosophy.
I've seen far too many:
try
{
// ... Huge block of code goes here
}
catch(Exception ex)
{
// Do nothing...
}
Which is far worse than crashing hard. If exceptions are handled properly then a little defensive programming is fine.