DEV Community

Cover image for What’s your placeholder name?
Bruno Noriller
Bruno Noriller

Posted on • Originally published at linkedin.com

What’s your placeholder name?

We all know foo, bar, and baz. But when I see people actually needing a placeholder name for a function or variable... I’ve often seen other placeholders.


Mine are: coxinha, coisa, test.

“test“ you probably understand.

“coisa” is ‘thing‘ in portuguese.

“coxinha” can be translated as “little thigh”, but it’s actually a fried snack. (the cover image!)


From what I saw, each one has one... so what’s yours?


buy me a coffee

Discussion (44)

Collapse
natescode profile image
Nathan Hedglin

Oogabooga, billy bob, Jane doe, John doe. Did I say oogabooga?

Collapse
diballesteros profile image
Diego (Relatable Code)

Alright +1 for the oogabooga

Collapse
sunflowertoadtheorbiter profile image
SunflowerToadTheOrbiter • Edited on

Fine choice sir, I tend to prefer ogabooga

Collapse
noriller profile image
Bruno Noriller Author

ok, but is it like jane_doe, jane-doe, janeDoe or you're working with a language that lets you "jane doe"?

Collapse
natescode profile image
Nathan Hedglin

No spaces, lowercase.

Collapse
joelbonetr profile image
JoelBonetR

It's a no brainer to me, I just use const a = whatever then comes b then c... 😅

Collapse
noriller profile image
Bruno Noriller Author

can't go wrong with the classics

Collapse
lupree profile image
Luca Ramseyer

actually very smart 🤔

Collapse
joelbonetr profile image
JoelBonetR

This way I can get 26 letters and then start using numbers like const a0, a1, a2... 😂
Usually I don't need more than a c but well

Collapse
fen1499 profile image
Fen • Edited on

"aux" as in auxiliary, or some random letter. In the past I didn't kept them as placeholders but as actual variable names. Eventually I came back to some few months old code and had to deal with something like:

int a(int x, int y, int* z) {
 ...
return aux;
}
Enter fullscreen mode Exit fullscreen mode
Collapse
auroratide profile image
Timothy Foster

I almost always use fruits and vegetables! Nearly universal, paints an image in the head, makes whiteboards colorful, etc. When testing things with arrays, you can create illustrative categories like const red = [apple, tomato].

Collapse
darkwiiplayer profile image
𒊩Wii 💖💛💚💙💜💝💟

tester(), shenanigans() and sometimes just bob()

Collapse
noriller profile image
Bruno Noriller Author

I've used my fair share of "shenanigans" also

Collapse
pandademic profile image
Pandademic

I've definitely had my fair share of bobs(Is that the plural form?)

Collapse
yaythomas profile image
yaythomas • Edited on

my code is littered with arb. . . as in arbitrary. :-D

not var names in any production code, mind you, but any arbitrary placeholder/token value for a str, especially in unit tests:
github.com/pypyr/pypyr/search?q=arb

Collapse
lionelrowe profile image
lionel-rowe

Oh I thought this was gonna be about placeholder names for when public Wi-Fi hotspots ask way too many personal questions to use their network. In which case, I'm namey.mcnameson@onlyfans.gov, pleased to make your acquaintance.

Collapse
joppedc profile image
JoppeDC

Even when debugging and testing, i use somewhat logical names.

‘function logUser(User $user)’

‘private string $tempLocale = “en”:’

Stuff like that. Sometimes these stay till the next day or after a weekend. and it helps me pick up where i left off without searching what they mean/do.

Collapse
abhinav1217 profile image
Abhinav Kulshreshtha

I don't use placeholders for programming. variables, functions, classes should all be related to module I am working on. But for user-testing, db seeding, etc, I have habit of using existing information of frictional characters created by old writers.

Characters from edgar allen poe, enid blyton, james hadley chase, A lot of Cartoon characters from hanna-barbera shows, Harry Potter, gods from greek mythology, characters from Indian comics. I have a personal DB of fictional addresses, from all the above mention tv-shows, books and novels which I use to feed DB and test forms.

Collapse
ben profile image
Ben Halpern

"hello", "goodbye", "magoo"

Collapse
jrop profile image
Jonathan Apodaca

bleh

Collapse
lupree profile image
Luca Ramseyer

this one is kinda funny tho xD

Collapse
dylanlacey profile image
Dylan Lacey

BEEEEEEES!

Collapse
arikaturika profile image
Arika O

Dinosaur or banana. No idea why.

Collapse
j471n profile image
Jatin Sharma

There are many a-z, dd,dddd (repeated letters), test, check, fuck(yeh i use that) etc.

Collapse
stcollier profile image
Samuel Collier

I use "test" for everything. let test, function test(), etc.

Collapse
chuniversiteit profile image
Chun Fei Lung

I use derp and sdg so often that some of them have even made it to production. 💀

Collapse
smppatel99999 profile image
Sahil Patel

Anything that's related to the function.

Collapse
alida profile image
Alida W

To test address fields: Testy Testerson, 123 Any Street, Townsville, Country. (123) 456 7890, test@test.com

To test inputs, I usually just write "help", hahaha.

Collapse
matthewbdaly profile image
Matthew Daly

I tend to use sitcom characters, particularly from The IT Crowd.

Collapse
eljayadobe profile image
Eljay-Adobe

For variables, they are called metasyntactic variables. Placeholder variables. There is a wikipedia entry with lots of them. And an entry in the catb.org hacker's dictionary.

Collapse
ironcladdev profile image
IroncladDev

Mine is usually "asdf", and for longer text stuff, I use "Lorem Ipsum dolor sit amet this text goes on forever and its end is never met"

Collapse
andrewbaisden profile image
Andrew Baisden

I keep it simple and stick with test.

Collapse
dumboprogrammer profile image
Tawhid

"disstring" "disint" "al" "bl" . I have the funniest ways to name a var and a function

Collapse
kenbellows profile image
Ken Bellows

Maaaan the minute I saw that cover image my mouth started watering lol, I haven't had coxinha in ages!

Collapse
skylersaville profile image
Skyler Saville

Bobby Socks

Collapse
twigman08 profile image
Chad Smith

I’ve honestly sat for way too long trying to think of a test variable or function name that I finally just typed out gibberish and used that.

Collapse
lupree profile image
Luca Ramseyer

I always use "lul" and if this is already used I use "lulul" and so on. (Not very smart, I do not recommend, it just kind of works for me)

Collapse
noriller profile image
Bruno Noriller Author

as long as you don't commit it...

Collapse
flrichar profile image
Fred Richards

I try to make up funny words like zerk, zalg, blerp, blurg, any 4-5 letter which may sound like it does not belong and for some unknown reason I choose a lot of the letters a, b, x, z.

Collapse
panditapan profile image
Pandita

I use "hello" and if it's a string then "stringy". I always use Pandita Pan as a placeholder user too xD

Collapse
stephd profile image
DepSteph

I use 'dada', because of finger position

Collapse
arnested profile image
Arne Jørgensen

hest -- Danish for horse

Collapse
clpsplug profile image
C. Plug

Some Japanese use "hoge" "fuga" "piyo" for placeholder names - though I hear they are dying out and learner sometimes misunderstand that these mean something.
I use them plus the foobar style placeholders; whichever to use is up to my feeling.