Thursday, June 28, 2012

Consistency in Software: Case #3841-22

chrome $ unzip --help
UnZip 5.52 of 28 February 2005, by Info-ZIP.  Maintained by C. Spieler.  Send
bug reports using; see README for details.

Usage: unzip [-Z] [-opts[modifiers]] file[.zip] [list] [-x xlist] [-d exdir]
# 2 dozen lines of helpful info omitted

chrome $ zip --help

zip error: Invalid command arguments (no such option: -)
chrome $ 

There's a very logical explanation for this, similar to why certain words in English are spelled in apparently arbitrary, inconsistent ways. For
example, while it might seem maddening to remember which adjectives end
in "able" and which end in "ible", all you have to remember is whether
the Latin word the adjective is derived from ends in "abilis" or "ibilis".
Another useful cue,which I can't come up with a concrete example for, is
knowing in whch rough century a word entered the English language. Knowledge
of the fashion at the time could help remembering whether a trade, for
example, would end in "er" or "or".

It's similar in software. Sometime around the turn of the century the GNU
Coding Standard calling for "--help" for command-line help options was
adopted nearly universally. Before that common ways of accessing help
were "-h", "-?", or programs often left the help to the man page[2].

The link program I run has a 2005 copyright on it, while the zip program
was last compiled in 1999.

So obviously to be a fluent user of a system you need to know when the
various tools you use were last compiled. Chances are, if you knew that,
you wouldn't need the online help -- there's enough in your head already.

Any program that supports "--help" and doesn't have a "-h" option, and is
unlikely to ever tie it up, might as well map "-h" to "--help". Doing
otherwise leaves the impression that the user is an incapible moron and
software is inflexable.

was dropped


No comments: