0% found this document useful (0 votes)
90 views5 pages

What Is Foo in Software Programming - Definition From SearchAppArchitecture

OoP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views5 pages

What Is Foo in Software Programming - Definition From SearchAppArchitecture

OoP
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Home

>  App dev and management


>  Programming
>  foo (in software programming)

DEFINITION

foo (in software programming)


By Fred Churchville,
Site Editor

What is foo in software programming?


Foo (pronounced FOO) is a term used by programmers as a placeholder for a value that can change, depending on conditions or on information passed to
the program. Foo and other words like it are formally known as metasyntactic variables.

How foo works in programming


It can be helpful to use metasyntactic variables when creating sample code because programmers don't have to create unique names for each variable
value. Nonsense placeholders make it easier to focus on the code's core concept and functional goal.

When defining a template for creating a new user command, for example, the syntax for the command could be written as:

Command foo (arg1, arg2)

The "foo" would mean "the name you give to this command." The "arg1" and "arg2" are arguments or information that will be defined and passed along with
the command.

Origins of the term foo


The term foo is not itself unique to the world of programming. The actual origin of the word, however, seems somewhat unclear.

Eric Raymond, author of New Hacker Dictionary, observes that in Bill Holman's comic strip of the 1930-50 era, "Smokey Stover," the letters "F-O-O"
commonly appeared, unexplained and as a kind of running gag on license plates, in picture frames and on the backs of sandwich board signs.

9 S hA A hit t
g
9 SearchAppArchitecture
There is also evidence that using the term foo derives from the World War II-era phrase FUBAR, as it is not unusual to see "foo" and "bar" both used as g
metasyntactic variables alongside each other, as shown below:

int max(int foo, int bar)

   int result;

 if (foo > bar)

   result = foo;

 else
   result = bar;

 return result;

Although foo is considered a canonical metasyntactic variable, Raymond notes that these variable names can vary based on geography. He
lists qux, waldo, fred, xyzzy, and thud among others that are occasionally used. 

Fred, barney, and wombat seem common in the U.K., while toto, tata, titi and tutu are reportedly used by the French. Blarg and wibble are often used in
New Zealand.

This was last updated in October 2021

∙∙
m Continue Reading About foo (in software programming)
Understanding Windows PowerShell function parameters


These PowerShell script examples help tidy up code

The Etymology of Foo(bar)


Related Terms

React Native
React Native is an open source JavaScript framework for mobile application development. The framework is based on Facebook’s user... See complete definitionq

reactive programming
Reactive programming describes a design paradigm that relies on asynchronous programming logic to handle real-time updates to ... See complete definitionq

software
Software is a set of instructions, data or programs used to operate computers and execute specific tasks. See complete definitionq

m Dig Deeper on Application development and management


Examples of how to use Java's javap tool to Functional vs. object-oriented programming: The
decompile bytecode (and more) basics

By: Cameron McKenzie By: Matt Heusser

How to script a Bash Shell argument Java's main function explained with examples

By: Jack Wallen By: Cameron McKenzie


-ADS BY GOOGLE

Latest TechTarget SearchSoftwareQuality


resources

SOFTWARE QUALITY
A 2 Why chaos engineering isn't as chaotic as it sounds
Don't let the name fool you. SSQ editors chatted with author Mikolaj Pawlikowski about why
chaos engineering can be easily ...

CLOUD COMPUTING

JAVA
2 Don't fall victim to these 5 Scrum anti-patterns
Scrum is meant to adapt and change to different scenarios. Here are five common anti-
patterns that can arise in Scrum when teams ...

About Us Contributors Guides

Editorial Ethics Policy Reprints Opinions


Meet The Editors Answers Photo Stories

Contact Us Definitions Quizzes

Advertisers E-Products Tips

Business Partners Events Tutorials

Media Kit Features Videos

Corporate Site

All Rights Reserved, Copyright 2019 - 2021, TechTarget

Privacy Policy

Do Not Sell My Personal Info

You might also like