Foo

This MedLibrary.org supplementary page on Foo is provided directly from the open source Wikipedia as a service to our readers. Please see the note below on authorship of this content, as well as the Wikipedia usage guidelines. To search for other content from our encyclopedia supplement, please use the form below:

Look up Foo in
Wiktionary, the free dictionary.

Foo is a metasyntactic variable used heavily in computer science to represent concepts abstractly and can be used to represent any part of a complicated system or idea including the data, variables, functions, and commands. Foo is commonly used with the metasyntactic variables bar and foobar.

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 x and y 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 a subroutine, 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.”[1]

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 the canonical example of a metasyntactic variable. It is used extensively in computer programming examples and pseudocode. Eric S. Raymond has called it an "important hackerism" alongside kludge and cruft.[2]

Foo and bar paired together are apparently derived from FUBAR, but the etymology of the term "foo" is explored in the internet Request 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.[3]

FOO as an abbreviation of Forward Observation Officer was a British Army term in use as early as the First World War[4] The term has been adopted in other contexts. $foo is the name of a Perl programming magazine,[5] and Foo Camp is an annual hacker convention (the name is also a backronym for Friends of O'Reilly, the event's sponsor).

Contents

Example (pseudocode)

There are two functions: FOO and BAR
 FOO calls function BAR 
 BAR returns the data FOOBAR

When 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 the Web Services Interoperability organization as a means to stifle competition included e-mails in which top executives including Bill Gates referred to the WS-I using the codename "foo".[6]

See also

Notes

External links

Wikipedia content modification information:

  • This page was last modified on 6 October 2008, at 02:27.

Wikipedia Authorship and Review

Wikipedia content provided here is not reviewed directly by MedLibrary.org. Wikipedia content is authored by an open community of volunteers and is not produced by or in any way affiliated with MedLibrary.org.

Wikipedia Usage Guidelines

This article is licensed under the GNU Free Documentation License. It uses material from the Wikipedia article on "Foo".

The URL for this specific entry is:

All Wikipedia text is available under the terms of the GNU Free Documentation License. (See Copyrights for details). Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc.