Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Metasyntactic Variables (aka Placeholder Names)

Scroll down to the "Result" section below to grab a set of placeholder names in various formats

From Wikipedia

In computer science, programmers use metasyntactic variables to describe a placeholder name or an alias term commonly used to denote the subject matter under discussion or an arbitrary member of a class of things under discussion.

The use of a metasyntactic variable is helpful in freeing a programmer from creating a logically named variable, which is often useful when creating or teaching examples of an algorithm. The word "foo" is the principal example. It occurs in over 330 RFCs. The word "bar" occurs in over 290.

Some Examples

Code

import json

words = ["foo", "bar", "baz", "qux", 
"quux", "corge", "grault", "garply", "waldo", "fred", 
"plugh", "xyzzy", "thud", "wibble", "wobble", 
"wabble", "webble", "wubble"]

print("# Space Separated String")
print(f'"{" ".join(words)}"')
print()

print("# Comma Separated String")
print(f'"{", ".join(words)}"')
print()

print("# Pipe Separated String")
print(f'"{"|".join(words)}"')
print()

print("# Quoted List/Array")
print(json.dumps(words))
print()

obj_s = {}
obj_a = {}
obj_o = {}
for word in words:
    obj_s[word] = ""
    obj_a[word] = ""
    obj_o[word] = ""

print("# JSON Object Keys With String Values")
print(json.dumps(obj_s))
print()

print("# JSON Object Keys With Array Values")
print(json.dumps(obj_a))
print()

print("# JSON Object Keys With Object Values")
print(json.dumps(obj_o))
print()

Results

# Space Separated String
"foo bar baz qux quux corge grault garply waldo fred plugh xyzzy thud wibble wobble wabble webble wubble"

# Comma Separated String
"foo, bar, baz, qux, quux, corge, grault, garply, waldo, fred, plugh, xyzzy, thud, wibble, wobble, wabble, webble, wubble"

# Pipe Separated String
"foo|bar|baz|qux|quux|corge|grault|garply|waldo|fred|plugh|xyzzy|thud|wibble|wobble|wabble|webble|wubble"

# Quoted List/Array
["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply", "waldo", "fred", "plugh", "xyzzy", "thud", "wibble", "wobble", "wabble", "webble", "wubble"]

# JSON Object Keys With String Values
{"foo": "", "bar": "", "baz": "", "qux": "", "quux": "", "corge": "", "grault": "", "garply": "", "waldo": "", "fred": "", "plugh": "", "xyzzy": "", "thud": "", "wibble": "", "wobble": "", "wabble": "", "webble": "", "wubble": ""}

# JSON Object Keys With Array Values
{"foo": "", "bar": "", "baz": "", "qux": "", "quux": "", "corge": "", "grault": "", "garply": "", "waldo": "", "fred": "", "plugh": "", "xyzzy": "", "thud": "", "wibble": "", "wobble": "", "wabble": "", "webble": "", "wubble": ""}

# JSON Object Keys With Object Values
{"foo": "", "bar": "", "baz": "", "qux": "", "quux": "", "corge": "", "grault": "", "garply": "", "waldo": "", "fred": "", "plugh": "", "xyzzy": "", "thud": "", "wibble": "", "wobble": "", "wabble": "", "webble": "", "wubble": ""}