what is foo bar??
written on: May 19, 2006
If you are a geek .. the kind of person watching computer monitors more than the time you watch anything else in a day.. then you would have come across technical books on computers very often using the naming foo and bar in their examples.
Except the first few times, you wouldn't have had time to bother why always everyone had examples named that way... the other common practise is to output 'Hello world' in programs, but that is ok.
Foo and bar are the disgusting words which never meant anything that you already knew, probably.
I recently jumped on a question in a technical forum where a 'newbie' as they call a new programmer, had this question as to what is foo and bar... and whether they were names of technologies, or commands sent to the computer to allow running the program or something ?? :o)
Some programmers themself have had done some research to find out where it all started, and why the early programming authors took to using names like foo and bar in their examples.
The end result of such research is as below. you could also find this at wikipedia.
Many people believe its an evolution of the US military slang 'FUBAR'...
[ click above wikipedia link to know more about the military slang...you will find some interesting definition that explains little frustration.. which I am not comfortable adding to my blog as it is :o) ]
May be somebody started the practise by using that military slang.. or, may be someone liked a candy called 'foo bar',
or whatever,
but at the bottom of it, the examples use foobar in the names to drive a fact that the author of the book or program wants to convey, and the fact is that foobar is just a name and you could use anything in its place without any particular meaning or impact.
Hey .. did u notice, while typing this post, i think i made an exciting name for a candy.. "foo bar candy" sounds good :o) .. we should stop foobar in our programs, and start thinking choclate bars for the name i think.
Content Copyrights Harish Palaniappan.
Blog owned and maintained by Floresense.com