Foo

Foo

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.” [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 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.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 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. [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 a British 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 a Perl programming magazine, [ [http://foo-magazin.de/ $foo PERL MAGAZIN de icon] ] and Foo Camp is an annual hacker convention (the name is also a backronym 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 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". [ [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.

Игры ⚽ Поможем сделать НИР

Look at other dictionaries:

  • Foo — Saltar a navegación, búsqueda Foo es un término genérico ampliamente usado para aludir a cualquier entidad informática cuyo nombre se ignora o no se quiere expresar. Por sí misma la palabra foo no tiene un significado preciso, solamente es una… …   Wikipedia Español

  • foo|ty — «FUT ee, FOO tee», adjective, ti|er, ti|est, noun, plural ties. Informal. –adj. poor; worthless; trashy. –n. a worthless person or thing …   Useful english dictionary

  • Foo — Foo,   amerikanischer Slangausdruck für etwas völlig Beliebiges. Der Begriff wird von Programmierern oft als provisorischer Name für Variablen oder Dateinamen oder als Texteingabe zu Testzwecken benutzt (vgl. Fred). Die Herkunft des Begriffs ist… …   Universal-Lexikon

  • Foo — Fubar ist ein Wort aus dem anglo amerikanischen Sprachraum, dessen Herkunft nicht genau bestimmt werden kann. Es ist auch die Schreibweise Foobar verbreitet, die wiederum die Verbindung zweier weiterer undefinierter Wörter, Foo und bar, ist. Mit… …   Deutsch Wikipedia

  • foo — che·foo; foo; foo·fa·raw; foo·tle; foo·tler; foo·ty; foo·zler; ma·foo; foo·chow; foo·zle; foo·foo·rah; foo·foo·rah; …   English syllables

  • Foo — Variable métasyntaxique En programmation informatique, une variable métasyntaxique est une variable générique, utilisée dans les exemples pour se concentrer sur le fond plutôt que sur la forme, et dont le nom est choisi pour être tacitement… …   Wikipédia en Français

  • Foo Go — Infobox Company name = Foo Go type = food manufacturer genre = foundation = 2001 founder = George Robinsoncite news last = Mesure first = Susie title = WH Smith to put sandwiches on the menu publisher = The Independent/Bnet date = Aug 29, 2006… …   Wikipedia

  • foo — noun /fuː/ a) 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. Suppose we have two objects, foo and bar. b) Also foo’.… …   Wiktionary

  • foo — ● ►en /fou/ np. ►ARGOT Voir foobar. L étymologie de foo est retracée dans la RFC 3092 …   Dictionnaire d'informatique francophone

  • foo — Fool. May be ghetto slang. Yo, what you be doin foo? Gettin all up on my grill like dat? …   Dictionary of american slang

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”