One very important tactic for being robust under odd inputs is
to avoid having special cases in your code. Bugs often lurk in the
code for handling special cases, and in the interactions among parts
of the code intended to handle different special cases.
We observed above that software is
transparent when you can look at it and
immediately see what is going on. It is simple
when what is going on is uncomplicated enough for a human brain to
reason about all the potential cases without strain. The more
your programs have both of these qualities, the more robust they will
be.
Modularity (simple parts, clean interfaces) is a way to organize
programs to make them simpler. There are other ways to fight for
simplicity. Here's another one.
[an error occurred while processing this directive]