Probably the best resource for learning about words like
foo,
bar, and
baz is the
Jargon File
(available in print as
The New Hackers Dictionary).
To take a brief excerpt about from the "foo" entry
(the complete entry for
foo runs over 2 pages):
foo: /foo/ 1. interj. Term of disgust. 2. (very common) Used very generally as a sample name for absolutely anything, esp. programs
and files (esp. scratch files). 3. First on the standard list of metasyntactic variables used in syntax examples. See also bar, baz, qux,
quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud.
The Jargon file goes on from there to list several possible
origins including:
- derivitive of the WWII-era Army slang acronym FUBAR
- earliest documented uses were
in the "Smokey Stover" comic strip popular in the
1930s, which frequently included the word "foo".
- that hacker usage actually sprang from "FOO, Lampoons and Parody", the title
of a comic book first issued in September 1958, a joint project of Charles and Robert Crumb.
- FOO: The first syllable of the sacred chant phrase "FOO MANE PADME
HUM." Our first obligation is to keep the foo counters turning.
The Jargon File/New Hackers Dictionary is quite a good read.
I never let my copy stray too far from my side.