- Foo
Foo is a
metasyntactic variable used heavily incomputer science to represent concepts abstractly and can be used to represent any part of a complicated system or idea including thedata ,variables , functions, andcommands . Foo is commonly used with the metasyntactic variables bar andfoobar .The word "foo" itself has no meaning and is merely a commonly used logical representation that is used much in the way that the letters and are used in
algebra to represent a number. In computer programming metasyntactic variables such as "foo" are used as a variable to represent the name of asubroutine , variable, or any other programmer named part of a program.It is likely that the use of foo in hacker and eventually programming context originated in MIT’s
Tech Model Railroad Club (TMRC). In the complex model system there were scram switches located at numerous places around the room that could be thwacked if something undesirable was about to occur, such as a train going full-bore at an obstruction. Another feature of the system was a digital clock on the dispatch board. When someone hit a scram switch the clock stopped and the display was replaced with the word "FOO"; at TMRC the scram switches are therefore called "foo switches". Because of this an entry in the 1959 Dictionary of the TMRC Language went something like this: “FOO: The first syllable of the sacred chant phrase "foo mane padme hum." Our first obligation is to keep the foo counters turning.” [cite web
url=http://www.computer-dictionary-online.org/?q=foo
title=Computer Dictionary Online]Foo has entered the English language as a
neologism due to its popularity in describing concepts in computer science and is considered by many to be thecanonical example of a metasyntactic variable. It is used extensively incomputer programming examples andpseudocode .Eric S. Raymond has called it an "important hackerism" alongsidekludge andcruft .cite book
url=http://books.google.com/books?id=POlUJW3Z9McC&pg=PA5&dq=foo+jargon&ei=GnIvR8PwGJiSpgK1qIT6CQ&ie=ISO-8859-1&sig=hIE0I8TtPGKUbSU-wgDTm4hQ8ig#PPA4,M1
title=The New Hacker's Dictionary
author=Eric S. Raymond
publisher=MIT Press
year=1996
isbn=0262680920]"Foo" and "bar" paired together are apparently derived from
FUBAR , but the etymology of the term "foo" is explored in the internetRequest for Comments 3092, which notes usage of "foo" in 1930s cartoons including "The Daffy Duck" and comic strips, especially "Smokey Stover " and "Pogo". From there the term migrated into military slang, where it merged with FUBAR. [cite web
url=http://www.ietf.org/rfc/rfc3092.txt
title=Etymology of "Foo"
author=D. Eastlake III et al.
year=2001
publisher=Internet Engineering Task Force
accessdate=2007-11-05]FOO as an abbreviation of
Forward Observation Officer was aBritish Army term in use as early as the First World War [http://www.1914-1918.net/Diaries/wardiary-118siege.htm Extract from War Diary of 118th Siege Battery WO95/322] The term has been adopted in other contexts. "$foo" is the name of aPerl programming magazine, [ [http://foo-magazin.de/ $foo PERL MAGAZIN de icon] ] andFoo Camp is an annual hacker convention (the name is also abackronym for Friends of O'Reilly, the event's sponsor).Example (pseudocode)
There are two functions: FOO and BAR FOO calls function BAR BAR returns the data FOOBARWhen there is more than one such
abstract entity to reference, the terms bar and baz or foobar are also usually used to refer to the second and third entities, respectively, as shown above. (In other words, the term 'bar' implies the existence of a primary entity 'foo', and so on.)The placeholders make this a template for any program fragment wherein one function calls another which returns data to the first.
Microsoft anti-trust lawsuit
During the
United States v. Microsoft trial, some evidence was presented that Microsoft had tried to use theWeb Services Interoperability organization as a means to stifle competition included e-mails in which top executives includingBill Gates referred to the WS-I using the codename "foo". [ [http://www.news.com/Microsoft-ploy-to-block-Sun-exposed/2100-1001_3-912906.html Microsoft ploy to block Sun exposed] ]ee also
*Bar
*Foobar
*Foo Camp
*PHP Notes
External links
* [http://tools.ietf.org/html/rfc3092 RFC3092 Etymology of "Foo"]
Wikimedia Foundation. 2010.