related topics
{system, computer, user}
{math, number, function}
{language, word, form}
{style, bgcolor, rowspan}

The terms foobar, foo, bar, baz and qux are sometimes used as placeholder names (also referred to as metasyntactic variables) in computer programming or computer-related documentation.[1] They have been used to name entities such as variables, functions, and commands whose purpose is unimportant and serve only to demonstrate a concept. The words themselves have no meaning in this usage. Foobar is sometimes used alone; foo, bar, and baz are sometimes used in that order, when multiple entities are needed.

The usage in computer programming examples and pseudocode varies; in certain circles, it is used extensively, but many prefer descriptive names, while others prefer to use single letters. Eric S. Raymond has called it an "important hackerism" alongside kludge and cruft.[2]


History and etymology

The origins of the terms are not known with certainty, and several anecdotal theories have been advanced to identify them. Foobar may have derived from the military acronym FUBAR and gained popularity due to the fact that it is pronounced the same. In this meaning it also can derive from the German word furchtbar, which means awful and terrible and described the circumstances of the Second World War.

FOO is an abbreviation of Forward Observation Officer, a British Army term in use as early as the First World War.[3] The etymology of foo is explored in the Internet Engineering Task Force (IETF) Request for Comments 3092, which notes usage of foo in 1930s cartoons including The Daffy Doc (with Daffy Duck) and comic strips, especially Smokey Stover and Pogo. From there the term migrated into military slang, where it merged with FUBAR.[1]

"Bar" as the second term in the series may have developed in electronics, where a digital signal which is considered "on" with a negative or zero-voltage condition is identified with a horizontal bar over the signal label; the notation for an inverted signal foo would then be pronounced "foo bar". Bar may also be read as beyond all repair, which is how it is used in the acronym FUBAR.

Full article ▸

related documents
Numbering plan
A-law algorithm
Steelman language requirements
Java Development Kit
Common Intermediate Language
Typed link
Java Transaction API
Shotgun debugging
Object-oriented programming language
Dia (software)
Longitudinal redundancy check
Common Language Runtime
Carson bandwidth rule
SEX (computing)
Facade pattern
Grid network