Yet another benefit of transparency, related to ease of
debugging, is that transparent systems are easier to perform recovery
actions on after a bug bites — and, often, more resistant to
damage from bugs in the first place.
In comparing the terminfo database with Windows registries
we noted that registries are notoriously subject to being corrupted
by buggy application code. This can make the entire system unusable.
Even if it doesn't, recovery can be difficult if the corruption
confuses the specialized registry-editing tools.
Our Unix case studies illustrate ways that designing for
transparency can prevent this class of problem. Because the terminfo
database is not one big file, botching one terminfo entry does not
make the whole terminfo data set unusable. Fully textual one-big-file
formats like termcap are usually parsed with methods which (unlike
block reads of binary structure dumps) can recover from single-point
errors. Syntax errors in an SNG file can be corrected by hand without
requiring specialized editors that might refuse to load a damaged PNG
image.
Going back to the kmail case study,
that program makes fault diagnosis easier because it obeys the Rule of
Repair: SMTP failures are noisy, usefully so.
You don't have to decode a layer of obfuscatory messages
generated by kmail itself to see
what the interaction with the SMTP server looks like. All you have to
do is look in the right place, because
kmail is being transparent and not throwing
away information about the error state. (It helps that SMTP itself is
textual and includes human-readable status messages in its
transactions.)
Discoverability tools like textualizers and browsers also make
fault diagnosis easier. We've already touched on one reason: they
make inspecting the state of the system easier. But there is another
effect at work as well; textualized versions of data tend to have
useful redundancies (such as using whitespace for visual separation as
well as explicit delimiters for parsing). These are present to make
them easier to read for humans, but also have the effect of making them
more resistant to being irreparably trashed by point failures. A
corrupted chunk in a PNG file is seldom recoverable, but the human
capacity for pattern recognition and reasoning from context might be
able to repair the equivalent SNG form.
Over and over again, the Rule of Robustness is clear.
Simplicity plus transparency lowers costs, reduces everybody's stress,
and frees people to concentrate on new problems rather than cleaning
up after old mistakes.