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 00:45, 25 July 2024 edit2600:6c55:4200:1cc8:c475:945:a655:87e4 (talk)No edit summaryTags: Manual revert Visual edit← Previous edit Revision as of 16:36, 27 August 2024 edit undoQuiddity (talk | contribs)Autopatrolled, Extended confirmed users, Pending changes reviewers, Rollbackers40,758 edits rm duplicate ref from same sentence; rm gapNext edit →
Line 8: Line 8:


== History and etymology == == History and etymology ==
It is possible that ''foobar'' is a playful ]<ref name="dictionary" /> to the ]-era military slang ] (''Fucked Up Beyond All Recognition)''.<ref name="dictionary">{{Cite web|url=https://www.dictionary.com/e/foo/|title=What does foo mean?|publisher=]|access-date=2019-08-17}}</ref> It is possible that ''foobar'' is a playful ] to the ]-era military slang ] (''Fucked Up Beyond All Recognition)''.<ref name="dictionary">{{Cite web|url=https://www.dictionary.com/e/foo/|title=What does foo mean?|publisher=]|access-date=2019-08-17}}</ref>


Note however that the word ''foopaw'' was a Nantucket dialect word for a bungled job, apparently derived from the French ''faux pas'', <ref>Nathaniel Philbrick, "In the Heart of the Sea", p. 22, ch. 1, Harper Press, 2005 {{ISBN|9780006531203}}.</ref> quoted from William H. Macy's '"There She Blows - The Log of the Arethusa" (1877). Note however that the word ''foopaw'' was a Nantucket dialect word for a bungled job, apparently derived from the French ''faux pas'',<ref>Nathaniel Philbrick, "In the Heart of the Sea", p. 22, ch. 1, Harper Press, 2005 {{ISBN|9780006531203}}.</ref> quoted from William H. Macy's '"There She Blows - The Log of the Arethusa" (1877).


According to an ] ], the word FOO originated as a ] with its earliest documented use in the 1930s comic '']'' by ].<ref name="rfc30922">{{cite web|last1=Eastlake|first1=D|last2=Manros|first2=C|last3=Raymond|first3=E|title=Etymology of "Foo"|url=http://www.ietf.org/rfc/rfc3092.txt|website=The Internet Engineering Task Force|accessdate=17 April 2016}}</ref> Holman states that he used the word due to having seen it on the bottom of a jade Chinese figurine in ], purportedly signifying "good luck".<ref>{{Cite web|url=https://www.smokey-stover.com/history.html|title=The History of Bill Holman|date=2007-06-13|publisher=]|access-date=2019-08-17}}</ref> If true, this is presumably related to the Chinese word '']'' ("{{lang|zh|福}}", sometimes transliterated ''foo'', as in '']''), which can mean ''happiness'' or ''blessing''.<ref>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 {{ISBN|9888455729}}.</ref> According to an ] ], the word FOO originated as a ] with its earliest documented use in the 1930s comic '']'' by ].<ref name="rfc30922">{{cite web|last1=Eastlake|first1=D|last2=Manros|first2=C|last3=Raymond|first3=E|title=Etymology of "Foo"|url=http://www.ietf.org/rfc/rfc3092.txt|website=The Internet Engineering Task Force|accessdate=17 April 2016}}</ref> Holman states that he used the word due to having seen it on the bottom of a jade Chinese figurine in ], purportedly signifying "good luck".<ref>{{Cite web|url=https://www.smokey-stover.com/history.html|title=The History of Bill Holman|date=2007-06-13|publisher=]|access-date=2019-08-17}}</ref> If true, this is presumably related to the Chinese word '']'' ("{{lang|zh|福}}", sometimes transliterated ''foo'', as in '']''), which can mean ''happiness'' or ''blessing''.<ref>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 {{ISBN|9888455729}}.</ref>

Revision as of 16:36, 27 August 2024

Placeholder names in programming Not to be confused with FUBAR, foobar2000, or FUBAR (TV series). "Foo" redirects here. For other uses, see Foo (disambiguation).
Foobar being used to show Transclusion

The terms foobar (/ˈfuːbɑːr/), foo, bar, baz, qux, quux, and others are used as metasyntactic variables and placeholder names in computer programming or computer-related documentation. 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. The style guide for Google developer documentation recommends against using them as example project names because they are unclear and can cause confusion.

History and etymology

It is possible that foobar is a playful allusion to the World War II-era military slang FUBAR (Fucked Up Beyond All Recognition).

Note however that the word foopaw was a Nantucket dialect word for a bungled job, apparently derived from the French faux pas, quoted from William H. Macy's '"There She Blows - The Log of the Arethusa" (1877).

According to an Internet Engineering Task Force RFC, the word FOO originated as a nonsense word with its earliest documented use in the 1930s comic Smokey Stover by Bill Holman. 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". If true, this is presumably related to the Chinese word fu ("福", sometimes transliterated foo, as in foo dog), which can mean happiness or blessing.

The first known use of the terms in print in a programming context appears in a 1965 edition of MIT's Tech Engineering News. The use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from c. 1960. 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 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 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 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:

Multiflush: stop-all-trains-button. Next best 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 an historical quatrain in the classic English fairy tale Jack and the Beanstalk. Intel also used the term foo in their programming documentation in 1978.

Examples in culture

See also

References

  1. Eric S. Raymond (ed.). "The on-line hacker Jargon File, version 4.4.8. metasyntactic variable". Jargon File. Retrieved 2024-05-30.
  2. ^ RFC 3092 - Etymology of "Foo"
  3. "Example domains and names | Google developer documentation style guide". Google for Developers. 2023-06-23. Retrieved 2023-06-26. Ensure that the name is applicable to the user's environment. Don't use unclear terms like foo, bar, and baz.
  4. "What does foo mean?". Dictionary.com. Retrieved 2019-08-17.
  5. Nathaniel Philbrick, "In the Heart of the Sea", p. 22, ch. 1, Harper Press, 2005 ISBN 9780006531203.
  6. Eastlake, D; Manros, C; Raymond, E. "Etymology of "Foo"". The Internet Engineering Task Force. Retrieved 2016-04-17.
  7. "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 ISBN 9888455729.
  9. 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. "Computer Dictionary Online"., computer-dictionary-online.org
  11. "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. 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.
  13. Mike Ricciuti (2002-07-04). "Microsoft ploy to block Sun exposed". CNET. Retrieved 2019-08-17.

External links

Categories: