Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does "Foobar " or "foo" or "bar" mean? [closed]

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?

like image 600
walter Avatar asked Sep 07 '25 05:09

walter


1 Answers

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.
like image 193
Yaoyu Yang Avatar answered Sep 11 '25 00:09

Yaoyu Yang