Foo bar baz are placeholder names used in computer programming to fill in for unknown, flexible, or as-yet undecided variables, including events or processes. For example, when building code, one process might call up another, stated in computer jargon as “foo calls bar.”
While foo bar baz might sound alien, most people use placeholder names all the time. Thingamajig, whatshisface, Jane Doe, John Q. Public, doodad and gizmo are all placeholder names. Foo bar baz falls into a special category of placeholder names known as metasyntactic variables, specific to programming syntax and algorithms.
Foo is probably most recognized by the average computer user. Foo might appear alone, or together with bar, as in, “Create a top-level domain like foobar.com.” Baz, when it appears, typically follows foo and bar. With the popularity of computers, this expression has leaked into mainstream vocabulary as hip slang.
Foo bar baz flourished without explanation as to where, exactly, the terms came from. The quirky world of programming has its own style and brand of humor, sometimes popularizing arcane references from various sources that might be surprisingly mainstream, if not obvious. To wit, on April Fools Day 2001, Reference For Comments (RFC) 3092 was published, possibly revealing the etymology of foo.
Though foo cannot be traced to a single source, RFC 3092 points to several references to foo as a nonsensical word seen in comic strips and cartoons circa 1930-1952. In an episode of Warner Brothers’ precursor to Daffy Duck, RFC 3092 states Daffy Doc hoists a sign that reads, “SILENCE IS FOO!” In addition, Walt Kelly’s Pogo strips are mentioned, and Bill Holman’s Smokey Stover comics. Fireman Smokey Stover drove a Foomobile, uttering such lines as “Where there’s foo there’s fire!” Writer Holman purportedly saw the word stamped on the underside of a figurine from China, where “fu/foo” sometimes translates to happiness.
While “foo” predates the 1940s, the foobar portion is similar to World War IIs, fubar, an acronym for “F---ed Up Beyond All Recognition.” Most inquiries into foobar’s origins point to this reference as being at least partially responsible for foobar.
Foo bar baz is the technically correct order for these metasyntactic variables, however, one might see placeholders like “foobaz” or “barbaz.” Foobar is also used as slang for something that makes no sense or is ridiculous. For the most part, however, finding the expression written as such in your Internet wanderings is not nearly as common as finding foo or foobar.