Origin of foobar

I see the words ‘foo’ and ‘bar’ used in every programming book ever written. For some reason, today I wanted to know what was the origin of these words. There were some interesting results. Some said it was taken from a military word, some say its derived from a German word, some say it was first used in a Smokey Stover comic strip. What is amazing is there is an RFC on the origin and usage of foobar.

After reading all that is there about foobar, I still don’t know what is the ‘real’ origin of this word and how it came to be used in the programming world.


5 thoughts on “Origin of foobar

  1. mike neeley says:

    I think I can answer this one for you. (Being a 51 year old programmer may be an advantage here)
    Back in the day the NOT function was indicated in printed boolean expressions as a line above the portions of the expression that was being negated.
    I think this probably was dropped because most of the printing devices available had no convenient method of putting a line above the text (as opposed to an underline).
    In any case, when the expression was read, you would say THIS EXPRESSION BAR as opposed to NOT THIS EXPRESSION.
    This would be where the BAR came in.
    FOO was an adaptation for FU. FU by itself does not lend itself to any particular pronunciation.
    Hook the two up you have FOOBAR as opposed to FUBAR which is indeed a common military acronym.

  2. mike neeley says:

    Just an addendum, the original expression was written as FOO with a line above it. The verbal expression would be FOO BAR. Only programmers would understand the joke.

  3. mike neeley says:

    Note that this is used in logic circuitry schematics as well.

  4. anaamica says:

    Thanks for the explanation, Mike. I didn’t know this is used in schematics too.

  5. Larry Slack says:

    I can echo the thoughts “For some reason, today I wanted to know what was the origin of these words.” So, thanks for attempting to explain them, Mike, especially the BAR portion. Maybe some time I’ll find more about: “FOO was an adaptation for FU.”, i.e what FU was/is.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: