Monday, August 12, 2013


The first programming language I learned was Pascal. Then, C came along. I don't remember whether Java or C++ was next, but it was in my C++ class that I first encountered examples of functions called foo. My lecturer never explained the name, nor did anyone inquired - I suppose, an identifier, by any other name (as long as it isn't a reserved word), works just as identifiers should. I admit, although slightly intrigued, I never cared enough to ask questions about it. I simply assumed the "oo" there most likely stood for "object-oriented", or something sensible like that.

Since completing my undergraduate studies, I have, at times when googling for stuff, came across examples with foo in them, and... I know, it shouldn't have taken me so many years to actually google it up. Turns out, its origin has nothing to do with programming.

foo usually appears alongside bar, though why I'd no recollection of the latter, I have no idea. "Foobar" came from FUBAR, which is acronym for F***ed Up Beyond All Recognition, a term used by the US Army during World War II.

I'm not a programmer but I'd once spent about a week coding continuously, with hardly any sleep, because the deadline was fast approaching and my application wouldn't run properly. So yea, I think I get it...

Further reading I
Further reading II

No comments: