Foobar

From Wikipedia, the free encyclopedia
(Redirected from Foo)

Template:Short description Script error: No such module "Distinguish". Lua error in package.lua at line 80: module 'Module:Hatnote list' not found.

File:TC-dbl.PNG
Foobar being used to show transclusion

Template:DMCA The terms foobar,[a] foo, bar, baz, quux,[b] and others are used as metasyntactic variables in computer programming or computer-related documentation.[3][4] They have been used to name entities such as variables, functions, and commands whose exact identity is unimportant and serve only to demonstrate a concept.

History and etymology

Page Module:Side box/styles.css has no content.Page Template:Sister project/styles.css has no content.

It is possible that foobar is a playful allusion to the World War II-era military slang FUBAR (fucked up beyond all recognition).[5]

According to an RFC from the Internet Engineering Task Force, the word FOO originated as a nonsense word with its earliest documented use in the 1930s comic Smokey Stover by Bill Holman.[6] Holman states that he used the word due to having seen it on the bottom of a jade Chinese figurine in San Francisco Chinatown, purportedly signifying "good luck".[7] If true, this is presumably related to the Chinese word fu ("Script error: No such module "Lang".", sometimes transliterated foo, as in foo dog), which can mean happiness or blessing.[8]

The first known use of the terms in print in a programming context appears in a 1965 edition of MIT's Tech Engineering News.[9] The use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from c. 1960.[4] In the complex model system, there were scram switches located at multiple places around the room that could be thrown if something undesirable was about to occur, such as a train moving at full power towards 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 stated: "FOO: The first syllable of the misquoted sacred chant phrase 'foo mane padme hum.' Our first obligation is to keep the foo counters turning."[10] One book[which?] describing the MIT train room describes two buttons by the door labeled "foo" and "bar". These were general-purpose buttons and were often repurposed 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:[11]

Page Template:Blockquote/styles.css has no content.

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

Foobar was 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", a phrase from a historical quatrain in the classic English fairy tale Jack and the Beanstalk. Intel also used the term foo in their programming documentation in 1978.[12]

Examples in culture

See also

Lua error in mw.title.lua at line 404: bad argument #2 to 'title.new' (unrecognized namespace name 'Portal').

Notes

Page Template:Reflist/styles.css has no content.

  1. ^ /ˈfbɑːr/
  2. ^ /kwʌks/, regardless of length.[1] Can be extended as quu(u…)x for n desired variables; this includes the (more modern) backwards extrapolation qux.[2]

References

Page Template:Reflist/styles.css has no content.

  1. ^ Page Module:Citation/CS1/styles.css has no content.Eric S. Raymond (ed.). "quux". Jargon File. 4.4.7. Archived from the original on 2025-04-27. Retrieved 2025-09-09. quux: /kwuhks/
  2. ^ Page Module:Citation/CS1/styles.css has no content.Eric S. Raymond (ed.). "qux". Jargon File. 4.4.7. Archived from the original on 2025-04-28. Retrieved 2025-09-09. qux: /kwuhks/ […] the quu(u...)x series
  3. ^ Page Module:Citation/CS1/styles.css has no content.Eric S. Raymond (ed.). "metasyntactic variable". Jargon File. 4.4.8. Retrieved 2024-05-30.
  4. ^ a b Template:IETF RFC - Etymology of "Foo"
  5. ^ Page Module:Citation/CS1/styles.css has no content."What does foo mean?". Dictionary.com. Retrieved 2019-08-17.
  6. ^ Page Module:Citation/CS1/styles.css has no content.Eastlake, D; Manros, C; Raymond, E. "Etymology of "Foo"". The Internet Engineering Task Force. Retrieved 2016-04-17.
  7. ^ Page Module:Citation/CS1/styles.css has no content."The History of Bill Holman". Smokey Stover. 2007-06-13. Retrieved 2019-08-17.
  8. ^ Mieke Matthyssen, "Chinese happiness: A proverbial approach to popular philosophies of life", p. 190, ch. 9 in, Gerda Wielander, Derek Hird (eds), Chinese Discourses on Happiness, Hong Kong University Press, 2018 Template:ISBN.
  9. ^ Page Module:Citation/CS1/styles.css has no content.Tech Engineering News. Vol. 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", then an effective word search for "foobar" would find location "foo" and the location containing the "add" instruction as well.
  10. ^ Page Module:Citation/CS1/styles.css has no content."Computer Dictionary Online"., computer-dictionary-online.org
  11. ^ Page Module:Citation/CS1/styles.css has no content."Abridged Dictionary of the TMRC Language". Tech Model Railroad Club of MIT. Archived from the original on 2018-01-02. Retrieved 2013-03-12.
  12. ^ Page Module:Citation/CS1/styles.css has no content.MCS-86 Assembler Operating Instructions For ISIS-II Users (A32/379/10K/CP ed.). Santa Clara, California, USA: Intel Corporation. 1978. Manual Order No. 9800641A. Retrieved 2020-02-29. [1][2]
  13. ^ Page Module:Citation/CS1/styles.css has no content.Mike Ricciuti (2002-07-04). "Microsoft ploy to block Sun exposed". CNET. Retrieved 2019-08-17.