Share on Facebook Share on Twitter Email
Answers.com

Foobar

 

A popular name for a temporary file, function or variable, or an example of same in documentation. Often used with "bar" to create "foobar," which is a variation of FUBAR. FUBAR came out of World War II and means "F***ed Up Beyond All Recognition."

Download Computer Desktop Encyclopedia to your iPhone/iTouch

Search unanswered questions...
Enter a question here...
Search: All sources Community Q&A Reference topics
Hacker Slang: foobar
Top

[very common] Another widely used metasyntactic variable; see foo for etymology. Probably originally propagated through DECsystem manuals by Digital Equipment Corporation (DEC) in 1960s and early 1970s; confirmed sightings there go back to 1972. Hackers do not generally use this to mean FUBAR in either the slang or jargon sense. See also Fred Foobar. In RFC1639, “FOOBAR” was made an abbreviation for “FTP Operation Over Big Address Records”, but this was an obvious backronym. It has been plausibly suggested that “foobar” spread among early computer engineers partly because of FUBAR and partly because “foo bar” parses in electronics techspeak as an inverted foo signal; if a digital signal is active low (so a negative or zero-voltage condition represents a "1") then a horizontal bar is commonly placed over the signal label.


Wikipedia: Foobar
Top

The terms foobar, foo, bar, and baz are common placeholder names (also referred to as metasyntactic variables) used in computer programming or computer-related documentation. [1] They are commonly used to represent unknown values, typically when describing a scenario where the purpose of the unknown values is understood, but their precise values are arbitrary and unimportant. The terms can be used to represent any part of a complicated system or idea, including the data, variables, functions, and commands. The words themselves have no meaning in this usage, and are merely logical representations, much like the letters x and y are used in algebra. Foobar is often used alone; foo, bar, and baz are usually used in that order, when multiple entities are needed.

It is used extensively in computer programming examples (sometimes expressed as "for once only") and pseudocode. Eric S. Raymond has called it an "important hackerism" alongside kludge and cruft.[2]

Contents

History

The terms' origins are not known with certainty, and several anecdotal theories have been advanced to identify them. Foobar may derive from the military acronym FUBAR, or it may have gained popularity due to the fact that it is pronounced the same. In this meaning it also can derive from the german word furchtbar, which means awful and terrible and described the circumstances of the Second World War. American Soldiers in Germany had problems with the pronunciation of the german word and used it in a simplified form.

FOO is an abbreviation of Forward Observation Officer, a British Army term in use as early as the First World War.[3] The etymology of foo is explored in the Internet Engineering Task Force (IETF) Request for Comments 3092, which notes usage of foo in 1930s cartoons including The Daffy Duck and comic strips, especially Smokey Stover and Pogo. From there the term migrated into military slang, where it merged with FUBAR.[1]


Other orgins

The terms may have developed in electronics, where a digital signal which is considered "on" with a negative or zero-voltage condition, is identified with a horizontal bar over the signal label; the notation for an inverted signal foo would then be pronounced "foo bar".[citation needed]

The use of foo in hacker and eventually in programming context may have begun in MIT's Tech Model Railroad Club (TMRC). In the complex model system there were scram switches located at numerous places around the room that could be thrown if something undesirable was about to occur, such as a train going full-bore at an obstruction. Another feature of the system was a digital clock on the dispatch board. When someone hit a scram switch the clock stopped and the display was replaced with the word "FOO"; at TMRC the scram switches are therefore called "Foo switches". Because of this an entry in the 1959 Dictionary of the TMRC Language went something like this: "FOO: The first syllable of the misquoted sacred chant phrase 'foo mane padme hum.' Our first obligation is to keep the foo counters turning."[4]

The term foobar was propagated through computer science circles in the 1960s and early 1970s by system manuals from Digital Equipment Corporation.[citation needed]

Foobar was used as a variable name in the Fortran code of Colossal Cave Adventure (1977 Crowther and Woods version). The variable FOOBAR was used to contain the player's progress in saying the magic phrase "Fee Fie Foe Foo".

Usage in code

The terms are very often used in programming examples, much like the Hello World program is commonly used as an introduction. For example, foo and bar might be used to illustrate a simple string concatenation:

// C/C++ code
#include <stdio.h>
 
int main()
{
   char Foo[] = "Hello, ";
   char Bar[] = "World!";
   printf("%s%s\n", Foo, Bar);
 
   return 0;
}
//Java Code
String foo = "Hello, ";
String bar = "World";
System.out.println(foo + bar);
//Hello, World is printed to the screen by printing the values of foo and bar
//C# Code
string foo = "Hello, ";
string bar = "World";
Console.WriteLine(foo + bar);
//Hello, World is printed to the screen by printing the values of foo and bar
# Perl 
my $foo = "Hello, ";
my $bar = "World";
print $foo.$bar;
# This will print Hello, World to the screen
//LSL Code
default
{
    state_entry()
    {
        string foo = "Hello, ";
        string bar = "World!";
        llSay(0, foo+bar);
    }
}
//That will say Hello World! in-world on channel 0.
#python code
 
foo = "Hello "
bar = "world!"
print foo, bar
 
# This will print "Hello world!" to the screen in python.
#phpcode

$foo = "Hello ";
$bar = "world!";
echo $foo . $bar;
 
# This will print "Hello world!" to the screen in php.
#Actionscript code
 
foo = "Hello ";
bar = "world!";
textfield1.text = foo + bar;
 
# This wil put "Hello world!" in Dynamic textfield 1
!Fortran 95 code
character(7)::foo="Hello, "
character(6)::bar="World!"
print '(2A)',foo,bar
'QBASIC code
 
foo$ = "Hello"
bar$ = "World"
 
PRINT foo$; bar$
'VB
foo = "Hello "
bar = "World!"
msgbox foo & bar
'This will open a message box displaying "Hello world!"

Usage in culture

$foo is the name of a Perl programming magazine,[5] and Foo Camp is an annual hacker convention (the name is also a backronym for Friends of O'Reilly, the event's sponsor).

During the United States v. Microsoft trial, some evidence was presented that Microsoft had tried to use the Web Services Interoperability organization as a means to stifle competition, including e-mails in which top executives including Bill Gates referred to the WS-I using the codename "foo".[6]

The name of the band Foo Fighters comes from the phrase Foo Fighter, referring to this word.

See also

  • BarCamp, an international network of user generated conferences
  • John Doe, a placeholder name for a male party, in a legal action, case or discussion, whose true identity is either unknown or must be withheld for legal reasons
  • Foo Camp, an annual hacker event hosted by publisher O'Reilly Media
  • FUBAR, a homophonous acronym
  • Lorem ipsum, the name given to commonly used placeholder text
  • Placeholder name

References

External links


 
 
Learn More
Fred Foobar (computer jargon)
FUBAR (computer jargon)
bar (computer jargon)

Help us answer these
How acquire song name when ripping in foobar through the internet?
How do you block foobar?
What is the story behind foo and foobar?

Post a question - any question - to the WikiAnswers community:

 

Copyrights:

Computer Desktop Encyclopedia. THIS COPYRIGHTED DEFINITION IS FOR PERSONAL USE ONLY.
All other reproduction is strictly prohibited without permission from the publisher.
© 1981-2009 Computer Language Company Inc.  All rights reserved.  Read more
Hacker Slang. The Jargon File. Copyright © 2007.  Read more
Wikipedia. This article is licensed under the Creative Commons Attribution/Share-Alike License. It uses material from the Wikipedia article "Foobar" Read more

 

Mentioned in