Chapter 11. Simplicity and Strictness
As a general rule:
The stricter your application is, the simpler it is to write.
For example, imagine a program that accepts only the numbers 1 and 2 as input and rejects everything else. Even a tiny variation in the input, like adding a space before or after "1" would cause the program to throw an error. That would be very "strict" and extremely simple to write. All you'd have to do is check, "Did they enter exactly 1 or exactly 2? If not, throw an error."
In most situations, though, such a program would be so strict as to be impractical. If the user doesn't know the exact format you expect your input in, or if they accidentally hit the spacebar or some other key when entering a number, the program will frustrate ...
Get Understanding Software now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.