Defensive database programming

Alexander kuznetsov of sqlblog.com has made a summary of previous posts about defensive database programming,defensive programming is an approach that is designed to ensure high quality of software by eliminating existing bugs and avoiding potential ones. The goal of defensive programming to make sure that software robustly and gracefully handles cases of unintended use. Programming defensively includes the following techniques:

  • Explicitly list the assumptions that you made during development
  • Whenever feasible, remove assumptions that are not essential
  • Ensure that the essential assumptions always hold
  • Use all your imagination to come up with cases of unintended use, trying to break your module. Incorporate these cases into your testing suite.
  • Lay out your code in short, fully testable, and fully tested modules
  • Reuse your code whenever feasible

Read the entire post here:

http://sqlblog.com/blogs/alexander_kuznetsov/archive/2009/03/08/summarizing-previous-posts-about-defensive-database-programming.aspx

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.