Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

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

python
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 start