Show & Tell My History Research: Foo Bar?

The History of Foo Bar

The ADD is strong in this one, and Wikipedia is an evil black hole of links. Ever wonder why every programming example/tutorial uses the names 'foo' and 'bar'? Ya, me neither, I just accepted it because I would get a giggle every time a teacher said 'fubar', but no 'foo' and 'bar' aren't from the military term (it's a fun coincident though).... and yes, fart jokes still make me laugh, I can't help it if my DNA has a built-in knee-jerk reaction. However, thanks to the magic of Wikipedia 'related' links, I stumbled upon the creators of 'foo' and 'bar' and since I use both extensively in all my code samples, I figured there's gotta be at least one non coder here who's wondered 'wtf is with these nerds', and so I share where this started (or ended up, depending on if your me or not :upside_down_face:):

The Wikipedia Page

Don't worry, there's a story version written by Wired:

It's Not What It Sounds Like

The Tech Model Railroad Club was a MIT club that built really detailed/realistic model trains, but internally there was a sub-group (Signals and Power Subcommittee) who focused solely on what was underneath their model train layout; a bunch of wires and circuitry... power, signal and communication lines for the trains and controls (hence the subcommittee name). This group coined a bunch of terms, one of which everybody knows which is 'hack' or 'hacker'. They even had their own dictionary, which was kept updated for a bit. Any who, as the story goes

the MIT train room describes two buttons by the door labeled "foo" and "bar". These were general-purpose buttons and were often repurposed for whatever fun idea the MIT hackers had at the time, hence the adoption of foo and bar as general-purpose variable names.

.... and now we all know a little bit of pointless history, but you'll no longer wonder where 'foo' and 'bar' came from :joy:

lemmie know if you enjoyed the read (or at least the Wired part), there are plenty of fun nerd and programmer stories out there to share... I always liked how Bulletin Board Systems (BBS), which were the precursor to the internet and websites, were invented by programmers that got bored while snowed in during the Great Blizzard of 1978 in Chicago :laughing:, but AI has some neat stories too (invented before the computer, weird huh)

2 Likes