Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 History and etymology  





2 Examples in culture  





3 See also  





4 References  





5 External links  














Foobar: Difference between revisions






العربية

Català
Dansk
Deutsch
Español
فارسی

Ilokano
Bahasa Indonesia
Italiano
עברית
Magyar
Nederlands

Norsk bokmål
Polski
Português
Русский
Simple English
Slovenščina
Српски / srpski
Suomi
Українська
Tiếng Vit

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 




Print/export  



















Appearance
   

 





Help
 

From Wikipedia, the free encyclopedia
 


Browse history interactively
 Previous editNext edit 
Content deleted Content added
m Reverted edits by 86.8.89.206 (talk): unexplained content removal (HG) (3.4.12)
No edit summary
Line 3: Line 3:

{{Redirect|Foo|other uses|Foo (disambiguation)}}

{{Redirect|Foo|other uses|Foo (disambiguation)}}

{{Use dmy dates|date=February 2020|cs1-dates=y}}

{{Use dmy dates|date=February 2020|cs1-dates=y}}

The terms '''foobar''' ({{IPAc-en|ˈ|f|uː|b|ɑr}}), '''foo''', '''bar''', '''baz''', and others are used as [[metasyntactic variable]]s and [[placeholder name]]s in [[computer programming]] or computer-related documentation.<ref name="rfc3092">{{IETF RFC|3092}} - Etymology of "Foo"</ref> They have been used to name entities such as [[Variable (computer science)|variable]]s, [[Function (computer science)|functions]], and [[command (computing)|command]]s whose exact identity is unimportant and serve only to demonstrate a concept.

The terms '''foobar''' ({{IPAc-en|ˈ|f|uː|b|ɑr}}), '''foo''', '''bar''', '''baz, qux, quux''',<ref>{{Cite web |title=metasyntactic variable |url=http://www.catb.org/jargon/html/M/metasyntactic-variable.html |access-date=2024-05-30 |website=www.catb.org}}</ref> and others are used as [[metasyntactic variable]]s and [[placeholder name]]s in [[computer programming]] or computer-related documentation.<ref name="rfc3092">{{IETF RFC|3092}} - Etymology of "Foo"</ref> They have been used to name entities such as [[Variable (computer science)|variable]]s, [[Function (computer science)|functions]], and [[command (computing)|command]]s 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.<ref name="Google">{{cite web |title=Example domains and names {{!}} Google developer documentation style guide |url=https://developers.google.com/style/examples#example-project-names |website=Google for Developers |access-date=26 June 2023 |language=en |date=2023-06-23 |quote=Ensure that the name is applicable to the user's environment. Don't use unclear terms like foo, bar, and baz.}}</ref>

The style guide for [[Google]] developer documentation recommends against using them as example project names because they are unclear and can cause confusion.<ref name="Google">{{cite web |title=Example domains and names {{!}} Google developer documentation style guide |url=https://developers.google.com/style/examples#example-project-names |website=Google for Developers |access-date=26 June 2023 |language=en |date=2023-06-23 |quote=Ensure that the name is applicable to the user's environment. Don't use unclear terms like foo, bar, and baz.}}</ref>




Revision as of 17:53, 30 May 2024

The terms foobar (/ˈfbɑːr/), foo, bar, baz, qux, quux,[1] and others are used as metasyntactic variables and placeholder namesincomputer programming or computer-related documentation.[2] 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.[3]

History and etymology

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

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 StoverbyBill Holman.[5] 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".[6] If true, this is presumably related to the Chinese word fu ("", sometimes transliterated foo, as in foo dog), which can mean happinessorblessing.[7]

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

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.[11]

Examples in culture

See also

References

  1. ^ "metasyntactic variable". www.catb.org. Retrieved 2024-05-30.
  • ^ a b RFC 3092 - Etymology of "Foo"
  • ^ "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.
  • ^ a b "What does foo mean?". Dictionary.com. Retrieved 2019-08-17.
  • ^ Eastlake, D; Manros, C; Raymond, E. "Etymology of "Foo"". The Internet Engineering Task Force. Retrieved 2016-04-17.
  • ^ "The History of Bill Holman". Smokey Stover. 2007-06-13. Retrieved 2019-08-17.
  • ^ 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.
  • ^ 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.
  • ^ "Computer Dictionary Online"., computer-dictionary-online.org
  • ^ "Abridged Dictionary of the TMRC Language". Tech Model Railroad Club of MIT. Archived from the original on 2018-01-02. Retrieved 2013-03-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. [1][2]
  • ^ Mike Ricciuti (2002-07-04). "Microsoft ploy to block Sun exposed". CNET. Retrieved 2019-08-17.
  • External links


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Foobar&oldid=1226445483"

    Categories: 
    Placeholder names
    Computer programming folklore
    Computing terminology
    Hidden categories: 
    Articles with short description
    Short description matches Wikidata
    Use dmy dates from February 2020
    Articles containing Chinese-language text
    All articles with specifically marked weasel-worded phrases
    Articles with specifically marked weasel-worded phrases from November 2010
    Articles with example C code
     



    This page was last edited on 30 May 2024, at 17:53 (UTC).

    This version of the page has been revised. Besides normal editing, the reason for revision may have been that this version contains factual inaccuracies, vandalism, or material not compatible with the Creative Commons Attribution-ShareAlike License.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki