English Reference

Word

foo

/ˈfu/

Definition

n. a name used by programmers for something when the real name does not matter. It is a placeholder you use while writing or testing code.

n. a metasyntactic variable used as a placeholder name for any part of a program, such as a variable, function, or file. Often paired with 'bar' in technical documentation to demonstrate logic without specific context.

Examples

“The programmer named the test file foo.txt.”

“When explaining the new function, the instructor used foo as a temporary variable name to keep the focus on the logic.”

“In many early programming tutorials, foo serves as the primary placeholder, followed by bar and baz, establishing a naming convention that persists in modern documentation.”

Examples

simple

“The programmer named the test file foo.txt.”

contextual

“When explaining the new function, the instructor used foo as a temporary variable name to keep the focus on the logic.”

complex

“In many early programming tutorials, foo serves as the primary placeholder, followed by bar and baz, establishing a naming convention that persists in modern documentation.”

Usage

Commonly used in technical documentation and code snippets; informal and humorous in register.

Etymology

From Mandarin 府 (fǔ).

From Chinese 福 (fú, “fortunate; prosperity, good luck”), via its use as 福星 (Fúxīng, “Jupiter”) in Chinese statues of the Three Lucky Stars, picked up from c. 1935 as a nonsense word in Bill Holman's Smokey Stover comic strip, whence it was picked up by Pogo, Looney Tunes, and others. Used by Jack Speer as the name of a mock god of mimeography in the 1930s. Popularized in computing contexts by the Tech Model Railroad Club's 1959 Dictionary of the TMRC Language, which incorporated it into a parody of the Buddhist chant om mani padme hum, possibly under the influence of WWII military slang FUBAR, which had been repopularized by Joseph Heller's Catch-22.

A minced form of fuck.

Etymology adapted from Wiktionary, available under CC BY-SA 4.0.

Domain

Programming

This entry

Level
C2 · Proficiency
Frequency
Frequent
Updated

Scan code

englishreference.com/q/foo

English Reference