Misplaced Pages

Foobar: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 23:02, 16 September 2015 editClueBot NG (talk | contribs)Bots, Pending changes reviewers, Rollbackers6,438,433 editsm Reverting possible vandalism by 50.250.225.50 to version by Derekleungtszhei. Report False Positive? Thanks, ClueBot NG. (2352251) (Bot)← Previous edit Revision as of 23:11, 16 September 2015 edit undo96.24.79.91 (talk)No edit summaryTags: possible vandalism Mobile edit Mobile app editNext edit →
Line 1: Line 1:
soup
{{Distinguish|FUBAR}}
{{Redirect|Foo|other uses|Foo (disambiguation)}}
The terms '''foobar''' ({{IPAc-en|ˈ|f|uː|b|ɑr}}), '''fubar''', or '''foo''', '''bar''', '''baz''' and '''qux''' (alternatively, '''quux''') and sometimes '''norf'''<ref>http://www.vidyokarma.com/article.php?c=R-programming-language&page=1</ref><ref>http://rstudio-pubs-static.s3.amazonaws.com/43080_1d7db6d9f7044c8bae0e6a7f90c563cc.html</ref><ref>http://mathalope.co.uk/2015/03/08/swirl-r-programming-lesson-6-subsetting-vectors/</ref><ref>http://www.perlmonks.org/?node_id=1116433</ref> and many others<ref name="hackerdict">http://www.dourish.com/goodies/jargon.html</ref><ref>http://www.catb.org/jargon/html/M/metasyntactic-variable.html</ref> are sometimes used as ]s (also referred to as ]s) in ] or computer-related documentation.<ref name="rfc3092" /> They have been used to name entities such as ]s, ], and ]s whose exact identity is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. ''Foobar'' is sometimes used alone; ''foo'', ''bar'', and ''baz'' are sometimes used, when multiple entities are needed.

The usage in ] examples and ] varies; in certain circles, it is used extensively, but many prefer descriptive names, while others prefer to use single letters. ] has called it an "important hackerism" alongside ] and ].<ref name="Raymond">{{cite book|url=http://books.google.com/books?id=g80P_4v4QbIC&lpg=PP1&pg=PA5|title=The New Hacker's Dictionary|author=]|publisher=]|year=1996|isbn=0-262-68092-0}}</ref>


== History and etymology == == History and etymology ==

Revision as of 23:11, 16 September 2015

soup

History and etymology

Smokey Stover driving a "foomobile", with phoo visible on the front

The word foo originated as a nonsense word from the 1930s, the military term FUBAR emerged in the 1940s, and the use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from circa 1960. However, the precise relationship of these terms is not known with certainty, and several anecdotal theories have been advanced to identify them.

The etymology of foo is explored in the Internet Engineering Task Force (IETF) RFC 3092, which gives the earliest documented use as being in the 1930s comic Smokey Stover by Bill Holman, where it is used as a nonsense word. Holman states that he used the word due to having seen it on bottom of a jade Chinese figurine in Chinatown, San Francisco, meaning "good luck". This is presumably as a transliteration of the fu character (Mandarin: fú, Cantonese: fuk, 福), which is a common character for fortune, and figurines of the trio of eponymous male "star gods" Fú, Lù, Shòu (Cantonese: fuk luk sau, 福祿壽) are common in Chinese communities; compare Fu Manchu, fictional character popular in the 1930s. Smokey Stover ran 1935–73, and continued to feature foo prominently, as on the front of the "foomobile" illustrated in the cover at right. The word foo became very popular in the 1930s, and also appeared in other cartoons including the Looney Tunes cartoons of Bob Clampett such as The Daffy Doc and Porky in Wackyland (both 1938, with Daffy Duck and Porky Pig), and in other comic strips such as Pogo.

From there, the Foo migrated into military slang, merged with "FU" of the FUBAR. The term foo fighter was used by Allied aircraft pilots in World War II to describe various UFOs or mysterious aerial phenomena.

The first known use of the terms in print in a programming context appears in a 1965 edition of MIT's Tech Engineering News. Foobar may have come about as a result of the pre-existing "Foo" being conjoined with "bar" an addition borrowed from the military's FUBAR. The use of foo in hacker and eventually in programming context may have begun 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 thrown 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 misquoted sacred chant phrase 'foo mane padme hum.' Our first obligation is to keep the foo counters turning." One book describing the MIT train room describes two buttons by the door: labeled foo and bar. These were general purpose buttons and were often re-purposed for whatever fun idea the MIT hackers had at the time, hence the adoption of foo and bar as general purpose variable names. An entry in the "Abridged Dictionary of the TMRC Language" states:

Multiflush: stop-all-trains-button. Next best thing to the red door button. Also called FOO. Displays "FOO" on the clock when used.

The term foobar was propagated through computer science circles in the 1960s and early 1970s by system manuals from Digital Equipment Corporation. Foobar was also used as a variable name in the Fortran code of Colossal Cave Adventure (1977 Crowther and Woods version). The variable FOOBAR was used to contain the player's progress in saying the magic phrase "Fee Fie Foe Foo".

Usage in code

The terms are very often used in programming examples, much like the Hello World program is commonly used as an introduction. For example, foo and bar might be used to illustrate a simple string concatenation:

/* C code */
#include <stdio.h>
int main()
{
   char *foo = "Hello";
   char *bar = "World!";
   fprintf(stdout, "%s %s\n", foo, bar);
   return 0;
}

Also see metasyntactic variables.

Usage in speech

The terms are used in speech in an analogous way, although older synonyms may be used. For example, "Some function foo will then be called". In these cases, foo and bar are synonyms for whatever or whichever. Or: "A database record for user foo" is synonymous with: "A database record for user whoever".

Usage in culture

$foo is the name of a Perl programming magazine, and Foo Camp is an annual hacker convention.

During the United States v. Microsoft Corp. trial, some evidence was presented that Microsoft had tried to use the Web Services Interoperability organization as a means to stifle competition, including e-mails in which top executives including Bill Gates referred to the WS-I using the codename "foo".

These terms gave the name to foobar2000, an audio player independently developed using C++, as its author was more focused on producing a functional program than on aesthetics.

There is a character named "Master Foo" in Rootless Root, a collection of hacker koans.

Google released https://google.com/foobar in November 2014.

See also

References

  1. "Etymology of "Foo"".
  2. http://catb.org/jargon/html/F/foo.html foo
  3. http://catb.org/jargon/html/index.html
  4. http://www.smokey-stover.com/history.html
  5. smokey-stover.com
  6. http://members.aol.com/EOCostello/
  7. D. Eastlake III; et al. (2001). "Etymology of "Foo"". Internet Engineering Task Force. Retrieved 2007-11-05.
  8. Tech Engineering News, Volume 47. Massachusetts Institute of Technology. 1965. p. 63. Further, it is possible to search for an effective address; e.g., if an instruction such as "add 1 foo" were used, specifying indirect addressing thru location "foo", and location "foo" contained the address of location "foobar", than an effective word search for "foobar" would find location "foo" and the location containing the "add" instruction as well.
  9. "Computer Dictionary Online"., computer-dictionary-online.org
  10. "Abridged Dictionary of the TMRC Language". MIT.
  11. foo-magazin.de Template:De icon
  12. Microsoft ploy to block Sun exposed, news.com

External links

Categories: