I saw that "foo" has been used to name a lot of computer-related things.
I wonder
- if foo has some meaning itself beyond computer science?
- what it means in computer science?
- how it should be used?
|
I saw that "foo" has been used to name a lot of computer-related things. I wonder
|
||||
|
The Wikipedia entry for Foobar covers this pretty thoroughly (emphasis mine):
|
|||||||||
|
|
First, some short specific answers, and then let's take a longer etymological ramble of how it likely entered computer science.
Beyond computer science, foo was a nonsense word that was used in comics and American popular culture of the early 20th century.
In computer science, foo is a metasyntactic variable, a placeholder or alias for whatever is under discussion. Commonly used alongside bar.
It should be used in example code and when discussing code, such as this:
Are you sitting comfortably? Then I'll begin.
The use of lone "foo" as a nonsense word is pretty well documented in popular culture in the early 20th century, as is the military FUBAR. (Some background reading: FOLDOC FOLDOC Jargon File Jargon File Wikipedia RFC3092) OK, so let's find some references. STOP PRESS! After posting this answer, I discovered this perfect article about "foo" in the Friday 14th January 1938 edition of The Tech ("MIT's oldest and largest newspaper & the first newspaper published on the web"), Volume LVII. No. 57, Price Three Cents:
The Tech newspaper, a year earlier, the Letter to the Editor, September 1937:
And The Tech in December 1938:
The first documented "foo" in tech circles is probably 1959's Dictionary of the TMRC Language:
These are explained at FOLDOC. The dictionary's compiler Pete Samson said in 2005:
And from 1996's Jargon File 4.0.0:
A year before the TMRC dictionary, 1958's MIT Voo Doo Gazette ("Humor suplement of the MIT Deans' office") (PDF) mentions Foocom, in "The Laws of Murphy and Finagle" by John Banzhaf (an electrical engineering student):
Also 1964's MIT Voo Doo (PDF) references the TMRC usage:
Let's find "foo", "bar" and "foobar" published in code examples. So, Jargon File 4.4.7 says of "foobar":
The first published reference I can find is from February 1964, but written in June 1963, The Programming Language LISP: its Operation and Applications by Information International, Inc., with many authors, but including Timothy P. Hart and Michael Levin:
Also includes other metasyntactic variables such as: FOO CROCK GLITCH / POOT TOOR / ON YOU / SNAP CRACKLE POP / X Y Z I expect this is much the same as this next reference of "foo" from MIT's Project MAC in January 1964's AIM-064, or LISP Exercises by Timothy P. Hart and Michael Levin:
It shares many other metasyntactic variables like: CHI / BOSTON NEW YORK / SPINACH BUTTER STEAK / FOO CROCK GLITCH / POOT TOOP / TOOT TOOT / ISTHISATRIVIALEXCERCISE / PLOOP FLOT TOP / SNAP CRACKLE POP / ONE TWO THREE / PLANE SUB THRESHER For both "foo" and "bar" together, the earliest reference I could find is from MIT's Project MAC in June 1966's AIM-098, or PDP-6 LISP by none other than Peter Samson:
Some more recollections. @Walter Mitty recalled on this site in 2008:
John V. Everett recalls in 1996:
Daniel P. B. Smith in 1998:
Robert Schuldenfrei in 1996:
Paul M. Wexelblat in 1992:
Bruce B. Reynolds in 1996:
Here's a straight IBM "BAR" from 1955. Other early references:
I haven't been able to find any references to foo bar as "inverted foo signal" as suggested in RFC3092 and elsewhere. Here are a some of even earlier F00s but I think they're coincidences/false positives:
(From my answer to a couple of similar questions over on Programmers.SE) |
||||
|
|
|
Foo is a metasyntactic variable used to represent an unspecified entity. If part of a series of such entities, it is often the first in the series, and followed immediately by bar, for example: "Suppose we have two objects, foo and bar." It's a singular noun (which also has a plural: foos) and the usage reflects this fact. |
|||
|
|
|
You may also notice this extends to use of bar, too; interestingly or not, combining the two to construct foobar gives us a word resembling the acronym FUBAR, whether or not this is the phrase that gave rise to use, I surely don't know, but to answer your questions directly:
|
|||||||||
|
|
Here it is defined and some of its history noted, as well as examples of usage:
|
|||
|
|
|
I've not been able to find a specific web reference (in my whole 4 minutes of poking around since reading this), but during a Computer Organization class, the professor (an old US Airforce engineer) claimed the individual word FOO was an old acronym for "Flicker On/Off" or a blip on the radar. It was commonly used to identify objects that were otherwise unidentifiable via radar as well, making it an early pre-cursor to the term UFO. |
|||
|
|
For "meaning itself" it can be an alternate spelling of "fu". For example, as in Google-fu, mastery of the use of Google. |
|||||||||||
|
foomeans absolutely nothing —which is precisely why it is used! – Mechanical snail Oct 12 '11 at 0:33