All Topics  
Foobar

 

   Email Print
   Bookmark   Link






 

Foobar



 
 
The term foobar, along with foo, bar, and baz, is a common placeholder name
Placeholder name

Placeholder names are words that can refer to objects or people whose names are either irrelevant or unknown in the context in which it is being discussed....
 (also referred to as a metasyntactic variable
Metasyntactic variable

The phrase metasyntactic variable is a neologism that is used in some programmer communities to describe a placeholder name or an Aliasing term commonly used to denote the subject matter under discussion or an arbitrary member of a class of things under discussion....
) used in computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 or computer-related documentation. These four terms are used heavily in computer science to take the place of unknown values, typically while describing a scenario where the purpose of the unknown values are understood, but their precise values are arbitrary. The words themselves have no meaning and are merely commonly used logical representations that are used much like the letters x and y are used in algebra
Algebra

Algebra is a branch of mathematics concerning the study of structure , relation , and quantity. Together with geometry, mathematical analysis, combinatorics, and number theory, algebra is one of the main branches of mathematics....
.

echnology, the word foobar was probably originally propagated through system manuals by Digital Equipment Corporation
Digital Equipment Corporation

Digital Equipment Corporation was a pioneering United States company in the computer industry. It is often referred to within the computing industry as DEC ....
 in 1960s and early 1970s.






Discussion
Ask a question about 'Foobar'
Start a new discussion about 'Foobar'
Answer questions from other users
Full Discussion Forum



Encyclopedia


The term foobar, along with foo, bar, and baz, is a common placeholder name
Placeholder name

Placeholder names are words that can refer to objects or people whose names are either irrelevant or unknown in the context in which it is being discussed....
 (also referred to as a metasyntactic variable
Metasyntactic variable

The phrase metasyntactic variable is a neologism that is used in some programmer communities to describe a placeholder name or an Aliasing term commonly used to denote the subject matter under discussion or an arbitrary member of a class of things under discussion....
) used in computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 or computer-related documentation. These four terms are used heavily in computer science to take the place of unknown values, typically while describing a scenario where the purpose of the unknown values are understood, but their precise values are arbitrary. The words themselves have no meaning and are merely commonly used logical representations that are used much like the letters x and y are used in algebra
Algebra

Algebra is a branch of mathematics concerning the study of structure , relation , and quantity. Together with geometry, mathematical analysis, combinatorics, and number theory, algebra is one of the main branches of mathematics....
.

Origins

In technology, the word foobar was probably originally propagated through system manuals by Digital Equipment Corporation
Digital Equipment Corporation

Digital Equipment Corporation was a pioneering United States company in the computer industry. It is often referred to within the computing industry as DEC ....
 in 1960s and early 1970s. Another possibility is that foobar evolved from electronics, as an inverted foo signal. This is because if a digital signal is active low (so a negative or zero-voltage condition represents a "1") then a horizontal bar is commonly placed over the signal label.

It is likely that the use of foo in hacker and eventually in programming context originated in MIT’s Tech Model Railroad Club
Tech Model Railroad Club

The Tech Model Railroad Club is a student organization at Massachusetts Institute of Technology , one of the most famous Rail transport modelling clubs in the world, and a wellspring of hacker culture....
 (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 sacred chant phrase "foo mane padme hum
Om mani padme hum

Om mani padme hum , the six syllabled mantra of the bodhisattva of compassion, Avalokiteshvara . The mantra is particularly associated with the four-armed Shadakshari form of Avalokiteshvara....
." Our first obligation is to keep the foo counters turning.”

Foo has entered the English language as a neologism
Neologism

A neologism is a newly coined word that may be in the process of entering common use, but has not yet been accepted into mainstream language . Neologisms are often directly attributable to a specific person, publication, period, or event....
 due to its popularity in describing concepts in computer science and is considered by many to be the canonical
Canonical

Canonical is an adjective derived from wikt:canon. Canon comes from the Greek word kanon, "rule" , and is used in various meanings....
 example of a metasyntactic variable. It is used extensively in computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
 examples and pseudocode
Pseudocode

Pseudocode is a compact and informal high-level description of a computer programming algorithm that uses the structural conventions of some programming language, but is intended for human reading rather than machine reading....
. Eric S. Raymond
Eric S. Raymond

Eric Steven Raymond , often referred to as ESR, is a computer programmer, author and open source software advocate. His name became known within the hacker culture when he became the maintainer of the "Jargon File"....
 has called it an "important hackerism" alongside kludge
Kludge

A kludge is a workaround, an ad hoc engineering solution, a clumsy or inelegant solution to a problem, typically using parts that are cobbled together....
 and cruft
Cruft

Cruft is computing jargon for "Source code, data, or software of poor quality". The term may also refer to debris that accumulates on computer equipment....
.

Foo and bar paired together are apparently derived from FUBAR
FUBAR

FUBAR is an acronym that commonly means "Fucked Up Beyond All Repair", "Fucked Up Beyond All Recognition", or any of a number of similar constructions....
, but the etymology of the term "foo" is explored in the IETF
Internet Engineering Task Force

The Internet Engineering Task Force develops and promotes Internet standards, cooperating closely with the World Wide Web Consortium and International Organization for Standardization/International Electrotechnical Commission standard bodies and dealing in particular with standards of the TCP/IP and Internet protocol suite....
 Request for Comments
Request for Comments

In computer network engineering, a request for comments is a memorandum published by the Internet Engineering Task Force describing methods, behaviors, research, or innovations applicable to the working of the Internet and Internet-connected systems....
 3092, which notes usage of "foo" in 1930s cartoons including The Daffy Duck
List of Daffy Duck cartoons

This is a list of the various animated cartoons featuring Daffy Duck....
 and comic strips, especially Smokey Stover
Smokey Stover

Smokey Stover was a comic strip written and drawn by Bill Holman from the 1930s until he retired in 1973. Distributed through the Chicago Tribune, it featured the misadventures of the titular fireman, and had the longest run of any strip in the screwball genre....
 and Pogo. From there the term migrated into military slang, where it merged with FUBAR.

FOO as an abbreviation of Forward Observation Officer was a British Army
British Army

The British Army is the Army branch of the British Armed Forces. It came into being with the unification of the Kingdoms of Kingdom of England and Kingdom of Scotland into the Kingdom of Great Britain in 1707....
 term in use as early as the First World War The term has been adopted in other contexts. $foo is the name of a Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
 programming magazine, and Foo Camp
Foo Camp

Foo Camp is an annual Hacker event hosted by publisher O'Reilly Media. O'Reilly describes it as "the wiki of conferences", where the program is developed by the attendees at the event, using big whiteboard schedule templates that can be rewritten or overwritten by attendees to optimize the schedule....
 is an annual hacker convention (the name is also a backronym
Backronym

A backronym is a reverse Acronym and initialism, a phrase constructed after the fact to make an existing word or words into an acronym.Backronyms may be invented with serious or humorous intent, or may be a type of false or folk etymology....
 for Friends of O'Reilly
O'Reilly Media

O'Reilly Media is an American Mass media company established by Tim O'Reilly that publishes books and web sites and produces conferences on computer technology topics....
, the event's sponsor).

Examples


The term foobar or foo and bar separately are very often used in programming examples, much like the Hello World program is commonly used as an introduction.

foo is often used as a name for functions/methods and bar is commonly used for variable names.

Here is an example of how foo and bar might be used to illustrate a simple string concatenation:

//Java Code String foo = "Hello, "; String bar = "World"; System.out.println(foo + bar); //Hello, World is printed to the screen by printing foo and bar

An early example of foobar being used in a famous program is its use as a variable name in the fortran code of Colossal Cave Adventure
Colossal Cave Adventure

Colossal Cave Adventure was the first computer adventure game. It was originally designed by William Crowther, a programmer and spelunking enthusiast who based the layout on part of the Mammoth Cave National Park system in Kentucky....
 (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".

Microsoft anti-trust lawsuit

During the United States v. Microsoft
United States v. Microsoft

United States v. Microsoft was a set of consolidated civil actions filed against Microsoft Corporation on May 18, 1998 by the United States Department of Justice and 20 U.S....
 trial, some evidence was presented that Microsoft had tried to use the Web Services Interoperability
Web Services Interoperability

The Web Services Interoperability Organization is an industry consortium chartered to promote interoperability amongst the stack of web services List of Web service specifications....
 organization as a means to stifle competition included e-mails in which top executives including Bill Gates
Bill Gates

William Henry "Bill" Gates III is an United States business magnate, philanthropist, author, the List of the 100 wealthiest people , and chairman of the board of Microsoft, the software company he founded with Paul Allen....
 referred to the WS-I using the codename "foo".

See also

  • Placeholder name
    Placeholder name

    Placeholder names are words that can refer to objects or people whose names are either irrelevant or unknown in the context in which it is being discussed....
  • Lorem ipsum
    Lorem ipsum

    In publishing and graphic design, lorem ipsum is common placeholder text used to demonstrate the graphics elements of a document or visual presentation, such as font, typography, and layout....
  • Foo Camp
    Foo Camp

    Foo Camp is an annual Hacker event hosted by publisher O'Reilly Media. O'Reilly describes it as "the wiki of conferences", where the program is developed by the attendees at the event, using big whiteboard schedule templates that can be rewritten or overwritten by attendees to optimize the schedule....
  • BarCamp
    BarCamp

    BarCamp is an international network of user generated conferences ? open, participatory workshop-events, whose content is provided by participants....
  • John Doe
    John Doe

    The name "John Doe" is used as a placeholder name for a male party, in a legal action, case or discussion, whose true identity is either unknown or must be withheld for legal reasons....


External links

  • RFC 3092 - Origin and usage of foobar
  • RFC 1639 - FTP Operation Over Big Address Records (FOOBAR)