[HN Gopher] What is the history of the use of "foo" and "bar" in...
       ___________________________________________________________________
        
       What is the history of the use of "foo" and "bar" in source code
       examples? (2012)
        
       Author : squircle
       Score  : 141 points
       Date   : 2024-10-05 19:52 UTC (1 days ago)
        
 (HTM) web link (softwareengineering.stackexchange.com)
 (TXT) w3m dump (softwareengineering.stackexchange.com)
        
       | helph67 wrote:
       | "In World War One "Foo was here" was scrawled across camps
       | occupied by the Australian Expeditionary Force. Generally assumed
       | to have come from the acronym for Forward Observation Officer,
       | veterans of that war may have brought the tradition with them
       | into the next global conflict over two decades later"
       | https://taskandpurpose.com/history/the-story-of-kilroy-and-w...
        
       | jph wrote:
       | In addition to the military-programming history of "foo", there's
       | also a military-programming history for the variable naming
       | convention of "alfa", "bravo", "charlie", "delta", etc.
       | 
       | The naming convention is known as the NATO phonetic alphabet:
       | https://en.wikipedia.org/wiki/NATO_phonetic_alphabet
        
         | Cheer2171 wrote:
         | NATO phonetic alphabet is used in all areas where you have to
         | say letters over voice.
         | 
         | One character variable names for temp or iterator values are
         | everywhere in programming. But I've never ever encountered one
         | spelled out as a full transcriptions of the NATO phonetic
         | alphabet like alfa, bravo, charlie. Exception is alpha for
         | probability/statistics.
        
           | g4zj wrote:
           | Some of them could potentially be a little confusing as well,
           | such as "delta" in game development, "echo" in some
           | networking contexts, or "uniform" in OpenGL shaders.
           | 
           | I don't tend to use single-letter variable names outside of
           | the standard `for(;;)` syntax, but if I did, I don't think
           | I'd replace them in this way.
        
           | mindcrime wrote:
           | > NATO phonetic alphabet is used in all areas where you have
           | to say letters over voice.
           | 
           | Not all. Military definitely favors NATO, but there are other
           | phonetic alphabets in use. In particular, at least in the US,
           | fire/ems personnel (and sometimes also law enforcement) use
           | alternatives. The one that goes Adam, Boy (or Baker),
           | Charlie, David, Edward, Frank, ... is still widely used.
           | 
           | I've also known agencies to use a mix, like Adam, Baker,
           | Charlie, Delta, ... (a law enforcement agency that I
           | dispatched for back in the 1990's used this version).
           | 
           | Source: was a firefighter and 911 dispatcher in a previous
           | life and still spend a lot of time monitoring fire/ems
           | channels locally just to stay connected to that world.
        
             | dfox wrote:
             | Law enforcement/EMS often have their own phonetic alphabets
             | and it is not that uncommon to use two at once: one for
             | call signs and second for the actual alphanumeric data (in
             | theory, in practice it gets mixed up, but everybody still
             | understands the meaning)
        
         | zabzonk wrote:
         | > "alfa", "bravo", "Charlie", "delta"
         | 
         | Bit offtopic: As well as general use, a lot of thesed are used
         | to classify Soviet/Russien submarines from a NATO point of use.
         | 
         | Even more off topic:This is quite interesting (to me at last)
         | in that NATO has used prefix schemes for bombers, fighters etc.
         | (for example Bear (bomber), Fishbed (fighter)) rather than
         | their makers names. As far as I know, in WW2 the Germans always
         | referred to RAF fighters by their RAF names.
        
         | wlindley wrote:
         | In the 1940s, the Army used a phonetic alphabet starting Able,
         | Baker, Charlie. My late father was on the first two postwar
         | atomic bomb tests (the first after Trinity, and at Hiroshima,
         | Nagasaki) which were Able and Baker.
         | 
         | Able was an air burst over Bikini (thus the name of the
         | swimsuit).
         | 
         | Baker, the water burst, was the world's first atomic disaster;
         | as a result of Baker, the third scheduled test Charlie was
         | cancelled. My father died years later of colon cancer, perhaps
         | not unrelated to contaminated air and water at the Eniwetok
         | base afterwards.
         | 
         | FUBAR indeed.
        
           | somat wrote:
           | The change from able... to alpha... was a NATO thing. some
           | European countries don't use the "a" in "able", so it was
           | changed to the "a" in "alpha"
        
             | dfox wrote:
             | Also there is a way to pronounce all of the NATO alphabet
             | words that is not exactly a normal english pronounciation
             | in order to make the first letter obvious and to reduce the
             | possibility of mistranscription (the most obvious example
             | is "nineR"). Sadly this does not really work in Czech, as
             | laypeople will very often interpret "ke'bek" as K. (So the
             | takeaway there is to not use NATO phonetic alphabet when
             | you are dictating the pickup code to the package pickup
             | point clerk)
        
       | fsckboy wrote:
       | I don't know the story of the entry of foo into the computer
       | science lexicon, but it is the case that the early days of
       | computers were populated with a fair number of military veterans
       | because early computers were mostly used in military applications
       | so that produced people with computer experience (not to mention
       | the compulsory draft which meant that a large number of people
       | would have military experience anyway).
       | 
       | FUBAR ("fucked up beyond all recognition") was supposedly a
       | military slang phrase.
       | 
       | And the popular comic strip Smoky Stover starting in the 1930's
       | used the word "Foo" wrt a firefighting character perhaps giving
       | that spelling more currency.
       | 
       | this is the Foomobile from that comic
       | https://duckduckgo.com/?t=ffab&q=Foomobile&iax=images&ia=ima...
        
         | ahazred8ta wrote:
         | The missing link is 'FURCHTBAR'.
         | 
         | Smokey Stover started the meme of substituting 'foo' into
         | words. 1930s german language classes turned furchtbar
         | (frightful) into 'foo-bar'. The US military acronymized it into
         | FUBAR. Apparently MIT adopted fu() and bar() as algebra
         | placeholders.
         | 
         | I'm partial to the 1938 song WHAT THIS COUNTRY NEEDS IS FOO -
         | https://m.youtube.com/watch?v=W2pljKyCgwc
        
           | diggan wrote:
           | Seems like that retelling comes from an IETF RFC:
           | https://www.ietf.org/rfc/rfc3092.txt (Etymology of "Foo")
        
             | d0mine wrote:
             | The date of the rfc is Apr 1st -- unclear how truthful it
             | is.
        
         | chiph wrote:
         | No "supposedly" about it. FUBAR is still in common use. As is
         | RHIP (Rank Hath Its Privileges) and BOHICA (Bend Over Here It
         | Comes Again)
        
       | baggy_trough wrote:
       | No love for quxx?
        
         | howard941 wrote:
         | Nope. Not even for xyxzzy
        
           | donkeyboy wrote:
           | Looks like xyzzy and plugh originated as a magic word in the
           | computer game Colossal Cave Adventure
        
         | mkl wrote:
         | Scroll down. It's more commonly qux or quux.
        
       | Max_Ehrlich wrote:
       | 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 give an example I use variable names that actually
       | make sense and are related to the example. I'm glad that I have
       | been fortunate to not see "foo" and "bar" anywhere in all of the
       | code I've seen in recent memory.
        
         | urbandw311er wrote:
         | > they are hard to pronounce
         | 
         | I'd find it hard to think of two words easier to pronounce--
         | what do you mean by this?
        
           | rmbyrro wrote:
           | Proof that for any little thing that existed, exists, or
           | could ever exist in this universe, there will be a non-zero
           | list of human beings unhappy with it. Until the end of
           | humanity, at least...
        
             | jiggawatts wrote:
             | I am unhappy with your characterisation of my natural human
             | trait of having a preponderance for unhappiness with all
             | possible outcomes.
        
               | rmbyrro wrote:
               | Proof that the statement is an axiom. And the fact that
               | it's an axiom also falls under the axiomatic principle of
               | guaranteed human unhappiness.
        
         | maccard wrote:
         | > 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.
         | 
         | I couldn't disagree more. The entire point is that the
         | variables are disconnected from the matter at hand. They're
         | widely recognised as placeholders, single syllable, distinctly
         | pronounced from each other, and have an implied ordering.
        
           | hedvig23 wrote:
           | I would agree with the comment you're responding to, too
           | often in tutorials or especially in off hand comments here, I
           | find their usage to assume some common but unindicated
           | convention or subtext and obscure the concept they're trying
           | to convey.
        
             | jiggawatts wrote:
             | They're the programmer equivalent of 'x' and 'y' in
             | mathematics -- which programmers don't use as generic
             | variables because they're used for "math" embedded in code
             | such as coordinates or measurements.
        
           | thaumasiotes wrote:
           | > distinctly pronounced from each other
           | 
           | This isn't so much of an advantage for "bar" and "baz". Those
           | sound pretty distinct to Americans, now, but "r" -> "z" is a
           | known type of sound change, which implies that for some
           | people they'll sound the same. "R" -> "s" is attested in
           | Latin, presumably because "z" wasn't an option. (Latin
           | fricatives don't have voicing distinctions.)
           | 
           | For an only slightly different current example, the second
           | consonants in "vi _ri_ le" and "vi _si_ on" are perceived as
           | distinct in American English, but identical in Mandarin
           | Chinese, which is why the sound is spelled as "r" in Hanyu
           | Pinyin and as "j" in Wade-Giles.
        
         | Brian_K_White wrote:
         | The very reason you say something like foo is to _avoid_ using
         | any specific example that might actually mean something and
         | confuse the listener into thinking it matters and focussing on
         | some irrelevant detail instead of the actual concept being
         | illustrated.
         | 
         | You detest that someone says "thing" instead of "house" or
         | something?
         | 
         | "...so you take a thing-"
         | 
         | "what thing?"
         | 
         | "It doesn't matter. It might be anything. So you-"
         | 
         | "A car?"
         | 
         | Come on man.
        
         | douglee650 wrote:
         | It's like business schools using "widget" for the product and
         | "Acme" for the company -- they are dealing in concepts, not
         | absolutes
        
         | thiht wrote:
         | 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.
        
           | Dylan16807 wrote:
           | If they used 'thing' and 'stuff' would you be happier? A B C?
           | What would you suggest as a generic variable name?
           | 
           | > Using foo bar baz qux is lazy when you can easily find
           | countless examples.
           | 
           | Countless examples of what?
        
       | symbolicAGI wrote:
       | 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 knew, you knew.
       | 
       | A few years later, perhaps with the welcome progress of more
       | female faculty and students, textbooks changed the spelling, but
       | not the pronunciation of the vulgar acronym 'fu' to 'foo'. Again,
       | if you knew, you knew.
       | 
       | And now you all know.
        
         | stackghost wrote:
         | Why would women in particular object to "fu" and not "foo"?
        
           | jckahn wrote:
           | Is it not clear what "f" and "u" is short for?
        
             | stackghost wrote:
             | Of course it is. What's not clear is what that has to do
             | with women.
        
               | jckahn wrote:
               | 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.
        
               | the_gorilla wrote:
               | > 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.
        
               | jckahn wrote:
               | Can you elaborate on that? My goal was to be as clear as
               | possible and leave minimal room for misinterpretation.
        
               | b59831 wrote:
               | This is a sexist statement
        
               | jckahn wrote:
               | How so?
        
               | danaris wrote:
               | Describing the factual sexist environment that existed in
               | a prior time (or, hell, the ones that exist today) is not
               | itself sexist.
        
               | cgriswald wrote:
               | It's a fact the environment was sexist.
               | 
               | Everything else is speculation unless their is some
               | evidence that women's complaints were the driving factor
               | of a change in policy rather than, say, the
               | infantilization of women or a sexist expectation that
               | women _would_ take exception to it.
        
               | kortilla wrote:
               | It's a discussion about a sexist environment. Catch up
        
               | RichardCA wrote:
               | Very sexist. Women were not only expected to never cuss,
               | but also to pretend as if they had never even heard such
               | awful words.
               | 
               | https://youtu.be/Cq-If5vVvcc
        
               | mmooss wrote:
               | > societal expectations historically placed on women,
               | they've typically had to be "the adult in the room."
               | 
               | I think it was the opposite; they were infantilzed and
               | sensitive, considered liable to faint or have a bout of
               | hysteria. They were to be protected. Swearing might upset
               | a woman.
               | 
               | Men had final authority over them in many cases. For
               | example, often women couldn't get jobs without their
               | husband's permission.
               | 
               | Women were sometimes the source of a sensitive,
               | compassionate, nurting viewpoint, a balance to the man's
               | roughness. She might appeal to him, but it was his
               | decision.
        
               | carlosjobim wrote:
               | People had different values than you do in the past. They
               | also have different values right now.
        
             | snypher wrote:
             | 'F--- you'
        
               | kevinventullo wrote:
               | In this case the u stands for "up": https://www.merriam-
               | webster.com/dictionary/fubar
        
               | the_gipsy wrote:
               | No
        
             | blahyawnblah wrote:
             | It's clear. Fucked Up
        
           | __MatrixMan__ wrote:
           | In the 60's the belief was that they could not tolerate
           | profanity. Or maybe it was that they'd tattle on the rest of
           | us.
        
             | johnyzee wrote:
             | There was a concept of treating women with respect.
        
               | smcin wrote:
               | That's a non-sequitur. There are plenty of other words
               | that start with 'fu-'. It's also a loanword from Chinese.
               | 
               | And even if not, I haven't heard anyone describe the
               | coinage 'fupa' as offensive.
        
               | smcin wrote:
               | To the downvoters: I said I don't find merit in the
               | suggestion that using 'fu' (or 'foo' as a function name)
               | would be considered to constitute profanity. When
               | learning programming, I simply learned 'foo, 'bar' and
               | 'baz' as silly-sounding example function names. I didn't
               | make any connection from 'foo' in the CS context to
               | 'fubar' in US military slang till over a decade later.
               | 
               | (Neglecting that there weren't many women in CS in the
               | 1960s. I don't even see that the word-fragment would have
               | been considered offensive in civilian context, esp. to
               | non-US speakers of English)
        
             | dragonwriter wrote:
             | In the 60s, women were generally infantilized, but I
             | suspect the "it was done for the women" explanation for the
             | drift of "fu" to the already-existing term "foo" once
             | separate from the other part of "fubar" is a just-so story,
             | rather than a historical fact.
        
           | symbolicAGI wrote:
           | Back in the 1960s United States, women were often perceived
           | as more sensitive to public profanity, compared to men of the
           | same age.
        
           | the_gipsy wrote:
           | Because they are subject both to sexual harassment and to
           | higher expectations, including "professionalism" (not using
           | profanity at the workplace in this specific case).
        
             | b59831 wrote:
             | This isn't an answer to the question.
             | 
             | Smug responses like this just means you don't actually have
             | a point.
        
               | the_gipsy wrote:
               | How does it not answer the question "why would women
               | avoid fu over foo"? I thought it was clear that "fu"
               | means "fuck up" or even "fuck you", a sexual swear word,
               | while "foo" means nothing at all.
        
           | bee_rider wrote:
           | I think it is actually a little funny, nowadays of course the
           | assumption that we particularly should be less profane around
           | women would be seen as old fashioned and kind of a bit
           | sexist. But I guess at the time swearing less was probably
           | seen as a way to make women less uncomfortable. And I'm sure
           | in some cases it did help.
           | 
           | An interesting example of the quirks we carry along with us,
           | and the fact that the combination of behavior, intention, and
           | interpretation can mix oddly.
        
             | patrick451 wrote:
             | I limit swearing in mixed company and I'm not even that
             | old.
        
               | bee_rider wrote:
               | I limit swearing among people I don't know very well of
               | either gender. Among my friends, I haven't noticed any
               | difference in who is bothered by it.
        
               | Loughla wrote:
               | I only limit swearing in professional environments;
               | meetings to be honest.
               | 
               | Everywhere else gets the shit and hell and damn that I
               | use in regular language. No slurs and no sexual words
               | like Fuck. But that's just good manners.
               | 
               | Curse words are like salt and pepper for the language.
               | They're not necessary, but often add just the right
               | amount of extra spice.
        
               | bee_rider wrote:
               | Oh, that's an interesting thought, good point. I agree on
               | the idea that slurs and sex-based stuff should be avoided
               | (crassness should be fun for everyone, not exclusionary).
               | I hadn't put fuck in that bucket really, but of course it
               | does have some sexual definitions.
        
             | Spivak wrote:
             | And it's not that hard to understand, it wasn't as if women
             | would faint at hearing the word fuck, but that casual
             | swearing made an environment feel like a boys club which
             | used to be _strongly_ exclusionary. Go talk to your
             | grandmothers about it, the 60s was the start of second wave
             | feminism-- we 're not talking about "they said guys to
             | refer to a mixed group" but "how dare a skirt talk back to
             | a man" level sexism.
        
           | greenthrow wrote:
           | That part of the comment is not true.
        
           | TacticalCoder wrote:
           | > Why would women in particular object to "fu" and not "foo"?
           | 
           | Honestly I don't know pussy.
        
           | riiii wrote:
           | Because fu.
        
         | reaperducer wrote:
         | _A few years later, perhaps with the welcome progress of more
         | female faculty and students, textbooks changed the spelling,
         | but not the pronunciation of the vulgar acronym 'fu' to 'foo'._
         | 
         | I was always told that fu became foo because it lined up nicely
         | on screens and on paper, making the code easier to scan.
         | foo = 1       bar = 2
         | 
         | looks better than                 fu = 1       bar = 2
        
         | WalterBright wrote:
         | On a related note, we all know the story from WW2 where
         | Bastogne was surrounded by the Wehrmacht, and the Wehrmacht
         | sent a note to General McAuliffe suggesting he surrender. He
         | returned with a note that simply said "nuts".
         | 
         | I simply did not believe than an American GI ever said "nuts".
         | So, I asked my dad (WW2 veteran). He said he briefly worked for
         | the General, and asked him what he actually wrote. The General
         | laughed, and replied "what do you think I wrote?"
         | 
         | F-U
         | 
         | The Stars&Stripes journalists changed it to "nuts" thinking the
         | Americans couldn't handle the profanity.
        
           | stackghost wrote:
           | I doubt this story very much. It's well documented that
           | McAuliffe rarely used profanity, and it's similarly well
           | documented, including by the US Army official historian, that
           | the official reply was indeed "nuts".
           | 
           | https://history.stackexchange.com/questions/40063/what-
           | did-g...
        
             | WalterBright wrote:
             | People who rarely use profanity means they do use it, and
             | when they do, they do it for effect. Certainly, a demand
             | that he surrender Bastogne would justify profanity in a
             | forceful response.
             | 
             | > including by the US Army official historian
             | 
             | An official US Army historian's job is to make the US Army
             | look good.
             | 
             | As we are all painfully aware these days, the accounts of
             | newspapers are rarely accurate, and often outright
             | fabrications. Why would WW2 accounts be any different?
             | 
             | I doubt McAuliffe would want to besmirch his record after
             | the war, had nothing to gain by contraindicating it, and
             | would be content to let it stand.
             | 
             | My father was a carefully honest man, and was never known
             | by me to lie. He held his tongue until after McAuliffe
             | passed away. He also told me some family secrets after all
             | involved had passed, and asked me to keep them to myself
             | until after he died, which I did.
             | 
             | It never occurred to me to ask him to write down that
             | story, and now it's too late.
             | 
             | I know my evidence is hearsay and inadmissible in court.
             | You're free to draw your own conclusions.
             | 
             | P.S. I was once personally involved in an incident that
             | made the local TV news. There was nothing political about
             | it, but each of the three local news channels got
             | essentially all the basic facts about it wrong. But that is
             | the "record" of the event. It pretty much soured me on the
             | veracity of news reports.
        
               | stackghost wrote:
               | Well Walter, ask yourself why Kinnard, who was in the
               | room at the time and Harper, who delivered the message,
               | and Premetz, the non-commissioned medic who translated it
               | for the Germans, all give repeated official accounts and
               | interviews that contradict the account of your father,
               | who by your own admission merely "worked for the general
               | briefly".
               | 
               | Is it all a grand conspiracy to protect the good name and
               | reputation of McAuliffe?
               | 
               | I'll say no more.
        
               | WalterBright wrote:
               | My father had a first hand account from McAuliffe, like
               | the other three, and had no reason whatsoever to
               | misrepresent it.
               | 
               | > Is it all a grand conspiracy to protect the good name
               | and reputation of McAuliffe?
               | 
               | A small conspiracy is not at all far-fetched. First off,
               | it's an inconsequential thing. Secondly, if one of the
               | three told the truth, then he'd be called a liar by the
               | other two. Who needs that? If you're in the military, you
               | don't get ahead by contradicting the narrative. (My dad
               | found that out the hard way - he was punished more than
               | once for not writing reports that fit the narrative.)
               | 
               | For a grand conspiracy, consider how long Biden's staff
               | held out insisting that Biden was sharp as a tack and
               | writing off contrary reports as disinformation.
               | 
               | The most compelling bit about my evidence is the frankly
               | laughable idea that a GI would use the word "nuts".
        
               | WalterBright wrote:
               | P.S. I understand you have no particular reason to
               | believe me, and if I were in your shoes I wouldn't,
               | either.
               | 
               | If there is any takeaway here, it would be that
               | historical accounts are always suspect. History is
               | written by the victors, as they say.
        
             | __MatrixMan__ wrote:
             | Whether or not it's true, I think it's a pretty good story
             | because it aligns BAR with "Beyond All Recognition", which
             | is exactly the point of a metasyntactic variable: to be so
             | separate that that context is unrecognizable.
             | 
             | Obfuscating the context is what F's it Up. Usually that's a
             | problematic thing, but in the case of foo and bar, the F'ed
             | Up version is maybe better.
        
           | hinkley wrote:
           | Next you're gonna tell me it wasn't "damn the torpedoes"
        
         | mncharity wrote:
         | > Often in the MIT technical reports, one would see 'x = fu(y)'
         | or 'y > bar(z)'
         | 
         | Hmm, "fu"? The decades confound my memory, but I don't
         | immediately recall seeing a "fu" there? Before the "foo" of
         | AIM-127a[1] in 1967 and MIT-LCS-TR-032[2] in 1966, there's
         | still a decade of AI Memos, and couple of years of TRs. DSpace
         | finds at least some "fu"s... lots of ocr fragments. The
         | AITR-220 '64 hit is ocr fragment. My search-fu tonight wasn't
         | up to being exhaustive (spot checks were all fragments). And
         | also, OCR could be missing older "fu"s. But I didn't quickly
         | find a real "fu".
         | 
         | A foo-bar-baz-quux in MIT-LCS-TR-365[3] in 1986.
         | 
         | One can start on the CSAIL collections page[4] and explore.
         | 
         | [1] "FOO" in abstract of AIM-127a _LISP Linkage Feature:
         | Incorporating MIDAS into PDP-6 LISP_
         | https://dspace.mit.edu/handle/1721.1/6136 [2] "Thus if FOO has
         | the definition (LAMBDA (X Y) [alpha]), and the user calls
         | SYSTEM1 with NAME= FOO, ADVICE= [beta], WHERE= BEFORE" on page
         | 43 of MIT-LCS-TR-032 _Pilot: A Step Towards Man-Computer
         | Symbiosis_ https://dspace.mit.edu/handle/1721.1/149354 [3] "if
         | the back trace is: FOO [1] <- BAR (2] <- BAZ [3] <- QUUX [4]"
         | on page 20 of _ID World: An Environment for the Development of
         | a Dataflow Programs Written in ID_ MIT-LCS-TR-365
         | https://dspace.mit.edu/handle/1721.1/149633 [4]
         | https://dspace.mit.edu/handle/1721.1/5458
        
         | yreg wrote:
         | For people, who (like me) don't know US military slang, FUBAR
         | apparently means 'Fucked/Fouled Up Beyond All/Any
         | Repair/Recognition/Reason' according to Wikipedia.
        
         | fuzzfactor wrote:
         | Also legendary is the traditional GIGO which in some
         | programming examples the FU is the garbage in and the BAR is
         | the garbage out.
        
         | Teknomancer wrote:
         | FOOcked-up Beyond All Recognition.
        
         | pton_xd wrote:
         | I've always heard fubar originated as a backronym for the
         | mispronounced German word "furchtbar," which means terrible but
         | could be sort of interpreted as meaning "f'ed up." Fubar
         | originated during WWII so it seems plausible atleast.
        
         | cancerhacker wrote:
         | My current chemo regime is FOLFIRI, one of the components of
         | Which is Fluorouracil, and frequently written as "5-FU" and
         | it's a bugger.
        
       | mikewarot wrote:
       | No zot? I don't remember where I picked them up. But it was
       | always fubar and zot.
        
         | temp0826 wrote:
         | Never heard of zot, but baz
        
           | DougMerritt wrote:
           | Zot is (at least in part) from the old comic Wizard of Id and
           | (by the same artist, Johnny Hart and Brant Parker) BC. It was
           | the sound of a lightning bolt (natural or wizard-created).
           | 
           | Reprint cover of "Ala Ka Zot!":
           | 
           | https://m.media-amazon.com/images/I/61hytBWmsqL._SL1000_.jpg
        
       | douglee650 wrote:
       | It blows me away that "The Jargon File" is not required canon.
       | Well, it can be anachronistic and old-school-nerd-bro coded, but
       | there's some primal stuff in there
       | 
       | http://catb.org/jargon/html/
        
         | fragmede wrote:
         | maybe it's time for an update
        
         | d0mine wrote:
         | http://catb.org/jargon/html/F/foobar.html
        
         | FooBarBizBazz wrote:
         | > old-school-nerd-bro
         | 
         | I'm trying to maintain that the nerds of yore and the bros* who
         | invaded in the 2010s are different groups -- in which case
         | "old-school nerd bro" would be a contradiction in terms -- but
         | alas "bro" has simply come to mean "male", and, to the English
         | majors writing the newspaper articles, "they all look the
         | same". So maybe I need to give up.
         | 
         | * etymology: "tech bro", in analogy with "finance bro", which
         | originated because fraternity brothers from top schools used to
         | go into finance, but then migrated into Tech around '08.
         | Associated stereotypically with developed pectorals and polo
         | shirts with popped collars. Close to the "Chad" archetype, but
         | with some light granola/yoga overtones.
        
           | IggleSniggle wrote:
           | I've been the same way but I think it's time to give up; the
           | language has moved on, and it's only a very specific age
           | bracket that recognizes the distinction. Graybeard means
           | something different now too. It's okay though. It's not
           | important and doesn't need to be maintained; it was just
           | another form of gate-keeping...
           | 
           | the early "nerd-bro" practically required the distinction as
           | a form of identity reclamation in a culture that disparaged
           | their puny interests in computing. We should celebrate that
           | that particular shield is no longer needed, and thus that
           | gatekeeping is no longer needed for ego-survival, either.
        
           | bee_rider wrote:
           | You are correct. Don't give up!
        
         | dfox wrote:
         | The real jargon file is probably here:
         | https://www.dourish.com/goodies/jargon.html
         | 
         | And it includes an explanation of what is wrong with ESR's
         | version. But well, lets reiterate that: ESR is this weird kind
         | of quasi-libertarian ego-maniac who occasionally produces
         | something marginally useful and then oversells how that thing
         | is part of the critical internet infrastructure or something
         | like that.
        
         | Uehreka wrote:
         | I think it feels dated because it's from a time when there were
         | far fewer hackers. It's way easier to make sweeping
         | generalizations ("hackers like X and don't like Y", "hackers
         | have a Z-ish sense of humor") about a small group and have it
         | actually be true.
         | 
         | These days it seems weird, even mildly culty, to make
         | definitive and specific statements about "what hackers are
         | like". There are millions of us all over the world. Many of us
         | barely have a spoken language in common, let alone share a
         | sense of humor or cultural values.
        
         | jollyllama wrote:
         | At some point the lines crossed between people whose first
         | exposure was the old "FUBAR" and those whose first exposure was
         | the tech "foo/bar/baz".
         | 
         | I wonder when it was.
        
           | marssaxman wrote:
           | I imagine that many of us who got into programming through
           | the 1980s home computer boom encountered the terms "foo" and
           | "bar" before we were old enough that adults would have felt
           | comfortable using "FUBAR" around us.
        
             | lupusreal wrote:
             | In my experience, adults were comfortable saying FUBAR
             | around kids but didn't explain it to be an acronym. I
             | learned it simply as a regular word, which though context I
             | understood to mean something was badly messed up.
        
         | xorcist wrote:
         | There was this thing called the Jargon File. Then it was taken
         | over by a rogue person who removed some things which didn't fit
         | his personal liking and put in some other things. There was a
         | lot of drama, but the end result was a skewed file that
         | emphasized certain parts of hacker culture over others.
         | 
         | It might be good to know that you linked to the version which
         | one person had outsized influence of, and should probably not
         | be used to write history from. Except history on early Internet
         | drama, perhaps.
        
           | justinpombrio wrote:
           | Can the original be found somewhere?
        
             | js2 wrote:
             | https://news.ycombinator.com/item?id=41753841
        
       | dang wrote:
       | 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)
        
         | rsyring wrote:
         | https://www.ietf.org/rfc/rfc3092.txt
        
         | ddtaylor wrote:
         | Heads up that link to bar.com goes to an advertisement to sell
         | the domain now.
        
       | lysace wrote:
       | For some reason, in Sweden, the word "gazonk" is common after
       | "foo" and "bar". I've never been been able to figure out why.
       | 
       | Here's a variant:
       | 
       | https://developer.arm.com/documentation/dui0493/i/CHDFAGEE
       | 
       | > foo\bar\baz\gazonk\quux\bop
       | 
       | Some Erlang reference:
       | 
       | https://erlang.org/pipermail/erlang-questions/2009-January/0...
       | 
       | > 43> lists:keysearch(foo, 1, [3.14, {foo,bar} | gazonk]). >
       | {value,{foo,bar}}
       | 
       | The GNU Emacs manual:
       | 
       | https://www.gnu.org/software/emacs/manual/html_node/emacs/Li...
       | 
       | > (setq foo '(bar zot > gazonk))
       | 
       | https://www.epicroadtrips.us/2003/summer/nola/nola_offsite/F...:
       | 
       | > Gazonk is often used as an alternative for baz or as a fourth
       | metasyntactic variable. Some early versions of the popular editor
       | Emacs used gazonk.foo as a default filename.
        
         | thaumasiotes wrote:
         | > For some reason, in Sweden, the word "gazonk" is common after
         | "foo" and "bar".
         | 
         | That doesn't look like it's a potentially Swedish word.
         | 
         | It does resemble an English one:
         | https://en.wiktionary.org/wiki/gazongas
         | 
         | (For whatever reason, wiktionary insists on defining "gazongas"
         | only as "the plural form of 'gazonga'", but the word "gazonga"
         | cannot be used at all; much as with "scissors" or "pants", only
         | the plural form exists.)
        
           | cool_dude85 wrote:
           | I don't agree with the thing about the singular "gazonga".
           | Just like if you were to say a boob or a tit, I think a
           | gazonga would be understood by anyone.
        
             | thaumasiotes wrote:
             | What can be understood is a separate question from what
             | it's possible to say. Here's a common type of utterance
             | from a foreign student of English:
             | 
             | * _Where you heard this?_
             | 
             | There's no risk of being misunderstood, but that doesn't
             | mean it's possible to phrase a question in English this
             | way.
             | 
             | What would you understand if someone asked you for "the
             | scissor"?
        
       | golol wrote:
       | foobar should die out. myvariable, mystring, myfunction etc. are
       | better in every way.
        
         | fragmede wrote:
         | they're longer, for one, so no
        
           | jonathrg wrote:
           | How about x, y, f?
        
             | fragmede wrote:
             | How about emoji?
             | 
             | https://www.globalnerdy.com/wp-
             | content/uploads/2014/06/poopy...
        
               | jonathrg wrote:
               | I have seen some tutorials where emojis are used as
               | metasyntactic variables. Not an improvement
        
         | creativenolo wrote:
         | Is it not foo() and bar()? MyVariable and... ?
        
         | smolder wrote:
         | Prefixing things with My is so Windows 95... In place of foo
         | and bar I prefer to go with stuff like one() two() three(), or
         | a() b() c(), timeless classics that need no explanation.
        
           | golol wrote:
           | The point is that tyoe is an EXTREMELY vaulable information
           | and if you are explaining code to someone it is very helpful
           | to clearly see what are keywords, what are arbitrary variable
           | names, and what are the types of the variables. For example
           | if you show me a programming language where there is a list
           | object and you write list.one(), I don't know if list is a
           | variable or a keyword, and I don't know if one is a variable
           | or a keyword. Much better to write mylist.one() if one is a
           | default function, or mylist.myfirstelement() otherwise etc.
           | 
           | I mean everyone knows using descriptive variable names is
           | good practice, but then in a coding tutorial it is somehow
           | fine to use foo, bar, a, b, c? That makes things clearer for
           | someone who understands all the types and the syntax, and
           | wants to see the structure algorithm more clearly. It hurts
           | someone trying to learn the language.
        
             | smolder wrote:
             | Your argument does make sense for teaching an intro to
             | programming type class, where it may not be obvious what is
             | a function name versus variable name. That just hasn't been
             | my audience for a very long time now when explaining
             | anything. I'd likely also go with var1 var2, fn1 fn2 type
             | names if needing non-descriptive placeholders in that case.
             | I mainly avoid foo and bar because to me it's a tired meme,
             | and people tend to understand "variable names and function
             | names can be anything" well before they ask "why does
             | everyone insist on using foo, bar and baz all the time?"
             | which is just extraneous lore. In my case, I was writing
             | QBasic games many years before I encountered my first foo
             | or bar.
        
               | golol wrote:
               | >Your argument does make sense for teaching an intro to
               | programming type class, where it may not be obvious what
               | is a function name versus variable name.
               | 
               | Yea but the truth is a huge of audience of people who are
               | not super familiar with the syntax of a languague will
               | read tutorials describing how to build stuff in that
               | language hoping they can piece things together. So for
               | them it would be helpful.
               | 
               | Also, isn't all of programming just playing with types in
               | a way? I feel like Intro to types never stops lol.
        
               | smolder wrote:
               | Oh, sorry that wasn't clear. I meant that type of class,
               | as in, a class similar to "intro to programming", not a
               | class about types in the programming sense. And by
               | "class", I mean classes in the school sense, haha. You're
               | right though.
        
       | gU9x3u8XmQNG wrote:
       | I have always felt that the foo/bar demo/example snippets have
       | held me back in comprehending code, because there was no
       | reasonable logic to it. It just means nothing to me, other than
       | the FUBAR reference others have mentioned.
       | 
       | I personally, and professionally, think it's a horrible
       | convention.
        
         | LouisSayers wrote:
         | I agree, to me it's always looked like baby speak.
         | 
         | Reading about "FUBAR" makes it even worse.
        
         | marssaxman wrote:
         | It's _supposed_ to mean nothing; that 's the point. You use
         | "foo" and "bar" (and "baz" and "qux", etc) when the names of
         | the things in your example do not matter. It's the same way
         | you'd see examples featuring "x", "y", and "z" when learning
         | algebra: maybe your textbook also has story problems, but most
         | of the examples will simply show an equation in terms of x, y,
         | and maybe z, without pretending that those abstractions refer
         | to anything concrete.
        
         | callc wrote:
         | I understand your perspective, and have felt similarly at
         | times. OTOH I appreciate having some culture and some fun
         | things in our field and teaching materials that would otherwise
         | be pushed out by being 100% reasonable and logical all the
         | time.
        
       | Yhippa wrote:
       | But where did "baz" come from?
        
         | 1vuio0pswjnm7 wrote:
         | And quux.
        
       | wodenokoto wrote:
       | So I guess it is lost to history, but how did a military cynicism
       | sneak into programming? And judging from the origin stories
       | posted it came from failed military campaigns and then was
       | somehow spread to the broader programming community through MIT.
       | 
       | There's a few steps there missing.
       | 
       | But on the other hand, a lot of posters in TFA writes "if you
       | knew you knew", and maybe most people who spread this didn't
       | know. I mean, I've used it without a second thought plenty of
       | times just because.
       | 
       | It might be as simple as an ex military professor writing it and
       | students picking it up as "this is how we talk" with basically no
       | one knowing what they are talking about.
        
       | wiihack wrote:
       | I remember when I started coding in java many years ago.
       | Everywhere I saw foo classes and I had absolutely no idea what
       | they mean :)
        
       | electricant wrote:
       | The reference to the Monty Python spam sketch is gold :D
        
       | asimpletune wrote:
       | Does anyone have any other successors to foo and bar? Mine have
       | always been bis buz baz, but I don't know if they're canonical or
       | if I just made up the next words in the sequence.
        
         | rchard2scout wrote:
         | According to the Jargon File,
         | (http://www.catb.org/~esr/jargon/html/F/foo.html) the
         | successors are baz, qux, quux, etc.
        
         | hinkley wrote:
         | I don't know how I started this but I've used the following
         | since before I had a beard:
         | 
         | foo/bar/baz/bing/bang/bong
         | 
         | Once in a while I'll throw "biz" in after baz. I suspect the
         | bar/baz pairing felt like alliteration to me and I extended it.
         | 
         | I've never used it in production code of course, but I have in
         | tests. For string interpolation or parsing tests you tend to
         | need a lot of variables or values and you don't care what the
         | variable means you just want the right ones placed in or
         | extracted from the correct spots.
         | 
         | In particular if the rest of the data looks legit and the bits
         | sunstituted looks like gibberish, I find it makes the red
         | tests' failure message quicker to read.
        
       | SeanLuke wrote:
       | The top response is wrong. So of course it was locked and made
       | impossible to downgrade or correct. If this isn't a canonical
       | Stack Overflow example I don't know what is.
        
       | DesiLurker wrote:
       | I though fubar was short for fu*ked up beyond all recognition.
       | that'd have turned into foo-bar.
        
       ___________________________________________________________________
       (page generated 2024-10-06 23:01 UTC)