Wiki Home

Defensive Programming


Namespace: Wiki
Category 3 Star Topics

This is a summary of http://files.ocs.drexel.edu/courseweb/mcs350-991/lectures/1-19-99/tsld030.htm (Source no longer available)

There are two sides to defensive programming:
Warning: trying to make code handle any conceivable error will not result in a simple design or simple code. Sometimes people who claim to be practicing defensive programming end up with lots of checks in their code, making it complex and hard to change. You might argue that this is not true defensive programming, but they thought it was. Simplicity is very important, and I'd rather have a program that I understand that fails under well understood conditions than code that I don't understand, but I can't make it crash.
Category Coding Category Definitions
( Topic last updated: 2009.12.04 02:34:08 PM )