Foobar

The terms foobar (/ˈfuːbɑːr/), foo, bar, baz, 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).

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[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:

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

Tags:

Foobar History and etymologyFoobar Examples in cultureFoobarCommand (computing)Computer programmingFunction (computer science)GoogleHelp:IPA/EnglishMetasyntactic variablePlaceholder nameVariable (computer science)

🔥 Trending searches on Wiki English:

William, Prince of WalesMirna El HelbawiThe Moody BluesKeffiyehSophia BushSunil NarineList of Super Bowl champions2024 United States presidential electionAsmir BegovićElla PurnellSurvivor 46National Football LeagueKeon ColemanKim Soo-hyunGlen PowellAntony BlinkenDune (2021 film)Jake Paul vs. Mike TysonKashmera ShahRobert Downey Jr.Blinding LightsJesusLok SabhaNew York CityDarién GapThe Three-Body Problem (novel)Ryan GarciaYodha (2024 film)Aavesham (2024 film)Civil War (film)Bharatiya Janata PartyOppenheimer (film)ZendayaGeorge WashingtonDiana, Princess of WalesChicago BearsUnited StatesSouth Korea2024 World Snooker ChampionshipJoseph StalinIndian National Developmental Inclusive AllianceUEFA Euro 2024WhatsAppRestrictions on TikTok in the United StatesLisa LopesArtificial intelligenceGervonta DavisDJ TilluJohnny DeppPavi CaretakerMason Rudolph (American football)UkraineKYURApple Inc.Tillu SquareNicole KidmanGrey's AnatomyGeorge VKylian MbappéGhoul (Fallout)Alexander the GreatCamila AlvesNico HülkenbergMarcus AureliusQueen of TearsKillers of the Flower Moon (film)KombuchaIndian Premier LeagueMoisés AriasTreaty of London (1915)Wayne GretzkyYouTube PremiumMac JonesNarendra ModiICC Men's T20 World CupTrap (2024 film)Olga DanilovićMichael Porter Jr.🡆 More