Search code examples
variablesterminology

What does "Foobar " or "foo" or "bar" mean?


These words seem to be widely used to naming variables. What do these words stand for and why are they so frequently used? By the way, what's the origins of them?


Solution

  • These two words are just placeholders in computer programs. Wikipedia https://en.wikipedia.org/wiki/Foobar seems have a good answer. There are several origin of foo:

    1. A nonsense word in the 1930s comic Smokey Stover by Bill Holman due to having seen it on bottom of a jade Chinese figurine in Chinatown, San Francisco, meaning "good luck".
    2. US Army WWII acronym FUBAR, "F-ed Up Beyond All Recognition", which also explains the origin of bar.
    3. The use of foo in a programming context is generally credited to the Tech Model Railroad Club (TMRC) of MIT from circa 1960.