Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
6 user(s) are online (5 user(s) are browsing encyclopedia)

Members: 0
Guests: 6

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Metasyntactic variable

A metasyntactic variable can either be a placeholder name, a kind of alias term, commonly used to denote the subject matter under discussion, or a random member of a class of things under discussion. The term originates from computer programming and other technical contexts, and is commonly used in examples by Hackers and programmers. The use of a metasyntactic variable is helpful in freeing a programmer from creating a logically named Variable, although the invented term may also become sufficiently popular and enter the language as a neologism. The word foo is the canonical#Computer science example.

The phenomenon is similar to the use in Algebra of x , y and z for unknown Variables, and a , b and c for unknown constants. Widgets are also used in business to indicate an as-yet-unspecified product and are frequently sold by the Acme company.

Metasyntactic variables are so called because: # They are variables in the metalanguage used to talk about computer programs, etc. (see also Pseudocode); # They are variables whose values are often variables (as in usages like the value of f (foo, bar) is the sum of foo and bar ).

= Examples =

== Nonsense words ==

=== Foo, Bar and Baz ===

Foo is the first metasyntactic variable, commonly used to represent an as-yet-unspecified term, value, process, function, destination or event but seldom a person (see Ned Baker , below). It is sometimes combined with bar to make foobar . This suggests that foo may have originated with the for more foo etymology, as well as RFC 3092. Another usage of foo is as an abreviation of the phrase forward observation officer (or observer). Apparently FOOs used to go places well forward of normal troops in battle and leave a stylised chalk graffiti of a person looking over a wall with the words foo was here .

The term Kung foo has come to mean skill in computer programming. This is actually used (though misspelled) in the movie The Core. This usage itself has spawned variants, such as the GIMP s Script-Fu plugin.

Bar , the canonical second metasyntactic variable, typically follows foo .

Baz , the canonical third metasyntactic variable, is commonly used after foo and bar .

Foo , bar , and baz are often compounded together to make such words as foobar , barbaz , and foobaz .

=== Gazonk ===

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.

=== Quux ===

Quux , introduced by Guy L. Steele, Jr., is the canonical fourth metasyntactic variable, commonly used after baz . However, more recently Qux has become more common as the fourth variable, displacing Quux as the fifth. A probable reason for this is that Quux is often followed by the series Quuux , Quuuux , Quuuuux etc. and Qux fits this pattern perfectly.

=== Bat ===

Bat is used by some programmers as an alternative to quuux .

=== Xyzzy ===

The word xyzzy is the magic word from the Colossal Cave Adventure, and therefore is often used as a metasyntactic variable, especially by old school Hackers.

=== shme ===

Infrequently used in various environments such as Berkeley, GeoWorks, Ingres, Quovadx. Pronounced /shmeh/ with a short /e/.

=== hukarz ===

hukarz (pronounced who cares ) is sometimes used by certain functional programmers, e.g., to initialise variables in untyped languages when the value assigned to the variable is immaterial but it is necessary to declare the variable.

== English words ==

=== Spam and Eggs ===

Spam and eggs are the canonical metasyntactic variables used in the Python programming language. This is a reference to a Spam (Monty Python) by Monty Python, after which the language is named.

=== Needle and Haystack ===

Needle and haystack are commonly used in computer programming to describe the syntax of functions that involve a search parameter and a search target, such as searching a substring within a string; with these two words, derived from the idiom to find a needle in a haystack , it is clearer where the substring for which to search goes, and where the string in which to search goes. This can be seen, for instance, in the documentation for some functions in the computer language PHP, see [http://www.php.net/substr-count] for an example.

=== Other examples ===

Other words used as metasyntactic variables include: beekeeper , blah , blarg , bleh , corge , doip , dothestuff , garply , glarb , grault , hoge , kalaa , mum , plugh , puppu , stuff , sub , temp , test , thud , var , waldo , momo .

Plugh , like xyzzy , is a magic word from the Colossal Cave Adventure.

== Numbers ==

=== 23 ===

The number 23 (number) is also commonly used as an integer example—particularly when the connotations associated with 42 are undesirable.

=== 42 ===

The number 42 (number) is often a common initializer for integer variables, and acts in the same vein as a metasyntactic value . It is taken from Douglas Adams The Hitchhiker s Guide to the Galaxy , where minor characters from The Hitchhiker s Guide to the Galaxy#Deep Thought concluded that it was The Answer to Life, the Universe, and Everything.

=== 47 ===

The number 47 (number) is sometimes used instead of 42 above, and is used mainly by members of the 47 society, or Star Trek fans.

=== 69 ===

69 (number) is often used as an example number. Popular among hackers as an addition to metasyntactic variables (foo69, bar69), also used in all sorts of hacks. 69 is popular because of its reference to a 69 sex position. It is also because it is the largest number whose factorial can be calculated by a pocket calculator limited to standard scientific notation with a 2 digit exponent.

=== 666 ===

666 (number) is the Number of the Beast (numerology), and is often refering to something considered bad or evil.

=== 0815 ===

0815 (named after the repetitive and boring MG 08-training) is used in Germany as either a random number or to reflect something mainstream , normal or boring .

=== 1337 ===

Stands for Leet , in Leetspeak, being, thus, commonly used.

=== 4711 ===

4711 is most commonly used in German computer speak as a random member of a set. It is a brand of Eau de Cologne, originally named after the number of the manufacturer s house in Cologne.

== Names of people ==

=== J. Random and Ned Baker ===

J. Random and Ned Baker are the names of archetype users; compare to Keeping up with the Joneses . J. Random Hacker and J. Random User are also common.

=== Alice and Bob ===

Alice and Bob are names of the archetypal characters in cryptography used as examples in discussions of cryptographic protocol (computing)s. Others include:

  • Carol - a participant in three- and four-party protocols
  • Dave - a participant in four-party protocols
  • Ellen - a participant in five- and six-party protocols
  • Frank - a participant in six-party protocols, and so on
  • Eve or Oscar - an (evil) eavesdropper
  • Mallory or Mallet - a malicious active attacker
  • Trent - a trusted arbitration
  • Walter - a warden
  • Peggy - a prover
  • Victor - a verifier
  • Sam - a trusted server (Uncle Sam)
  • Charlie - a challenger or opponent
  • Trudy - an intruder or malicious entity
  • Bob , Alice and Carol may have come from the 1969 film Bob & Carol & Ted & Alice , or from the fact that they are common English names starting with A , B and C , the first letters of the alphabet. Dave , Ellen , and Frank are the next three letters. Some people continue this pattern, using Gloria or another similar term for the seventh participant, and so on (maintaining the pattern female, male, female, male... ).

    === Fred and Barney ===

    After the characters in the cartoon series The Flintstones . The most famous use of these is the example code in Learning Perl . Fred is also known to have been used simply because the keys are close together on the QWERTY keyboard.

    === Military names ===

    Some names are most commonly used in military context.

  • Private Snuffy
  • Susie Rottencrotch or Jane Rottencrotch from the movie Full Metal Jacket
  • GI Joe or GI Jane
  • Beetle Bailey from the comic strip of the same name
  • Gomer Pyle or Private Pyle from the television show of the same name, also popularized by the movie Full Metal Jacket
  • Tommy Atkins , origin of the name Tommy for a British soldier
  • Private Bloggins , used primarily within the Canadian Forces as an arbitrary person, much like John Smith.
  • === Other names ===

    Sometimes placeholders from other contexts will be used: John Doe, Jane Roe, Richard Roe, A. N. Other, John Q. Public, Bloggs or Joe Bloggs, Joe Soap and Tom, Dick and Harry . In some law school, the generic case name Push v. Pull is used as a variable. Law or Accounting firms are sometimes referred to with names like Dewey, Cheatem & Howe (Do we cheat em, and how!) Other nonsense names come from swapping initials, e.g. Peter Jennings.

    ==Place names==

    ===Smallville and Metropolis===

    Smallville and Metropolis (comics) are fictional places from the Superman series of comic books. These are used to contrast urban and rural characteristics.

    ===Anywhere, Anytown and Nowhere===

    Anywhere, USA or Anytown, USA connotes genericness. Nowhere sometimes suggests that the entry is invalid.

    ===Middle of Nowhere / In the Sticks / East Buttf-ck / East Boofu ===

    Unlike Nowhere, these metasyntactic variables indicate extreme remoteness and suggest contempt.

    ===Podunk University===

    This term is sometimes a placeholder for a generic university.

    ===Y.U. Bum University===

    This term is sometimes a placeholder for a less generic university. Pronounced like Why you bum, you.

    == Images ==

    Test cards have been used as standard images and so has Lenna.

    = Other languages =

    Other Languages sometimes have their own metasyntactic variables. For example:

  • Jia , Yi , Bing , Ding - from Chinese language
  • flaf , giraf , boing - from Danish language
  • aap , noot , mies , Piet , Jan , Kees - from Dutch language
  • pippo , pluto , paperino , topolino (Italian names of the The Walt Disney Company characters Goofy, Pluto (dog), Donald Duck and Mickey Mouse) - from Italian language
  • Maria Bernasconi - from Italian language
  • toto , tata , titi , prout , banane - from French language
  • koko , lala , malakia - from Greek language
  • hoge , hogehoge , moge , huga , piyo , chomechome , nyoronyoro , naninani - from Japanese language
  • peh , meh , shmeh - from Yiddish language
  • bla , nha , la , patati , patata , Fulano , Sicrano and Beltrano (the last three as placeholders for persons names) - from Portuguese language
  • huu , haa - from Finnish language
  • hahaa , hihii , hohoo - also from Finnish
  • kala (fish), kalatehas (fish factory), oxe (misspelled vomit) - from Estonian language
  • muh , bla , blubb , schlurps , schnurz , Lieschen Mueller , Hinz & Kunz , Otto Normalverbraucher - from German language
  • bubu , mumu , zeze - from Romanian language
  • brol , prout - from French language
  • filan , hede , hödö , zıvır , ıvır , bok , püsür , ali , veli , deli - from Turkish language
  • fulano , mengano , zutano (the three used to denote a supposed or fictional person), sultano (variant of the previously mentioned zutano ), pepe (Joe), pp (phonetic equivalent to pepe ), vaina, (vulgar) cosa (in Spanish, cosa can be anything, but usually refers to some physical object), pirola (has no meaning) pirolita (literally, small pirola ; has no meaning) - from Spanish language
  • Ploni (פלוני) as a person s name; Reuven (ראובן) and Shim on (שמעון) as two persons (after Jacob s Sons)- from Hebrew language
  • Kuppuswamy , Ramaswamy - from Tamil language
  • Gipsz Jakab ; alma , körte , barack - from Hungarian language
  • Phalaan Phalaan - from Hindi language
  • Vasya Pupkin , Private Pupkin (Вася Пупкин, рядовой Пупкин), meaning abstract person, but generally a soldier or a programmer - from Russian language
  • bla , blahuj , ugg , ugga , blargh , gunk , tjo , bork ; Kalle , Olle , Pelle , Nisse (the diminutives of Karl, Olof, Per and Nils respectively) - Swedish language
  • It may also be interesting to note that lazy programmers who run out of nonsense words simply append numbers when they need more variables.

    =See also=

    *Placeholder name (Kadigan) *Free variables and bound variables *Gadget *widget *Hello World

    = External links =

  • [http://www.catb.org/~esr/jargon/html/F/foo.html The Jargon File entry on Foo], and also the entry on [http://www.catb.org/~esr/jargon/html/C/Commonwealth-Hackish.html Commonwealth Hackish] for non-US English words such as wombat .
  • RFC 3092 - The IETF memo on Foo (note that this is an April 1st RFC memo)
  • [http://search.cpan.org/dist/Acme-MetaSyntactic/ Acme::MetaSyntactic] A Perl module providing metasyntactic variable names. Updated weekly.