Live data from Hacker News

What is the history of the use of "foo" and "bar" in source code examples? (2012)

softwareengineering.stackexchange.com

31–40 of 150 posts

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#32
Surprisingly little. Others?

Foo Bar came from model trains at MIT - https://news.ycombinator.com/item?id=41069963 - July 2024 (2 comments)

The Origin of Foo and Bar - https://news.ycombinator.com/item?id=14030938 - April 2017 (1 comment)

Kind of related but not really:

foo@bar.com - https://news.ycombinator.com/item?id=24605949 - Sept 2020 (281 comments)

The Foo at bar.com - https://news.ycombinator.com/item?id=10108287 - Aug 2015 (29 comments)

foo@bar.com is a real email address - https://news.ycombinator.com/item?id=3263021 - Nov 2011 (91 comments)

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#33

MIT AI Lab back in the 1960s published technical reports containing program code. The military slang 'FUBAR' f'ed up beyond all recognition, was in the student and professor engineering vocabulary. The tradition became to use 'fu' and 'bar' as nominal function names, in same manner as X and Y were nominal variables. Often in the MIT technical reports, one would see 'x = fu(y)' or 'y > bar(z)' and so forth. If you kne…

[dead]

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#34
post #32

Surprisingly little. Others? Foo Bar came from model trains at MIT - https://news.ycombinator.com/item?id=41069963 - July 2024 (2 comments) The Origin of Foo and Bar - https://news.ycombinator.com/item?id=14030938 - April 2017 (1 comment) Kind of related but not really: foo@bar.com - https://news.ycombinator.com/item?id=24605949 - Sept 2020 (281 comments) The Foo at bar.com - https://news.ycombinator.com/item?id=1010…

https://www.ietf.org/rfc/rfc3092.txt

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#35

I understand that these variables have a rich and long history, but if you have ever heard a professor or anybody else say "foo" in lecture you will understand why I detest them. They have absolutely no connection to the matter at hand. Since foo is often used before bar, you would think there is an ordering between the two but there doesn't have to be. They are hard to pronounce and easier to confuse. Whenever I giv…

When I started to learn programming (by myself), I had a really hard time understanding what foo and bar were and what they meant in various tutorials and blogs. I was already trying to learn the syntax and programming concepts, throwing some unknowns words in the mix did NOT help. For some time I thought foo had special meaning in PHP, or that it meant something in English (not my first language, and I was much less proficient in English at ~14 than I am today).

Using foo bar baz qux is lazy when you can easily find countless examples.

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#36
post #32

Surprisingly little. Others? Foo Bar came from model trains at MIT - https://news.ycombinator.com/item?id=41069963 - July 2024 (2 comments) The Origin of Foo and Bar - https://news.ycombinator.com/item?id=14030938 - April 2017 (1 comment) Kind of related but not really: foo@bar.com - https://news.ycombinator.com/item?id=24605949 - Sept 2020 (281 comments) The Foo at bar.com - https://news.ycombinator.com/item?id=1010…

Heads up that link to bar.com goes to an advertisement to sell the domain now.

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#37
post #29

Earlier quoted context omitted.

Of course it is. What's not clear is what that has to do with women.

I imagine that, due to the societal expectations historically placed on women, they’ve typically had to be “the adult in the room.” Contrast this with men historically being able to get away with acting childishly (or worse). So when terminology used in the workplace is particularly vulgar, it would follow that women would take more issue with it than men.

> due to the societal expectations historically placed on women

This reads like aliens trying (and failing) to figure out why women act more like women than men do.

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#38
post #29

Earlier quoted context omitted.

I imagine that, due to the societal expectations historically placed on women, they’ve typically had to be “the adult in the room.” Contrast this with men historically being able to get away with acting childishly (or worse). So when terminology used in the workplace is particularly vulgar, it would follow that women would take more issue with it than men.

> due to the societal expectations historically placed on women This reads like aliens trying (and failing) to figure out why women act more like women than men do.

Can you elaborate on that? My goal was to be as clear as possible and leave minimal room for misinterpretation.

Re: What is the history of the use of "foo" and "bar" in source code examples? (2012)

#40
post #22
post #20

Earlier quoted context omitted.

Is it not clear what “f” and “u” is short for?

'F--- you'

In this case the u stands for “up”: https://www.merriam-webster.com/dictionary/fubar
Post reply on HN