Programs will evolve. Their requirements will change and their functionality will likely increase to meet this demand. However, the implementation of that functionality should be achieved without the programming flaws that frequently characterize modern software. It is patterned after the defensive driving techniques that many of us were taught when we took Driver s Education in secondary school. Driver s Education teaches prospective drivers to be prepared for unexpected driving situations.
Examples are sudden stops, lane changes, road hazards, and mechanical malfunctions.
A defensive driver will be in a position to safely navigate the highway in spite of these conditions. The term input includes not only the files that a program reads and writes but also the entire scope of a program s operating conditions. Examples are arguments, environment variables, credentials, open file descriptors, data streams, and system resources. A defensively written program anticipates anomalies in such inputs. For rlogin , the user did not just accidentally provide a TERM environment variable that happened to contain machine language instructions properly aligned with the requirements of the subroutine call stack.