Sunday, October 11, 2009

When Others Then NULL

Dan Morgan and I had a great chat at breakfast and then we jumped the bus from Moscone West to the Hilton where we saw Tom Kyte's keynote.

Assuming you work with Oracle database, are a developer of applications that store information in an Oracle database, or are in management for a company that has such developers, you have probably heard of Tom.

If you have not had the chance to listen to Tom, I strongly encourage you listen to one of his presentations. He has two types of presentations - technical details and philosophy. The tech details presentations are always interesting, but I now believe the philosophical ones are much more important.

This keynote was in that latter group.

Of the many nuggets Tom presented, the one I liked best was: design your application for production - keep security, performance and error handling in mind early. Indeed, trying to patch those on after the fact is rarely properly thought out.

As a specific example, when doing error handling avoid the exception block 'When Others Then NULL'. That exception block simply states

"If there is a problem, ignore it, and complete. Therefore any successful completion may be suspected of containing incorrect information. Therefore the reliability of the application is irrelevant."

That is not a nice way to treat your users ...

No comments: