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

Top comments (41)

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

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

"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
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

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

Collapse
 
pandademic profile image
Pandademic

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

Collapse
 
noriller profile image
Bruno Noriller

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

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
 
yaythomas profile image
yaythomas • Edited

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
 
ben profile image
Ben Halpern

"hello", "goodbye", "magoo"

Collapse
 
diballesteros profile image
Diego (Relatable Code)

Alright +1 for the oogabooga

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
 
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
 
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
 
j471n profile image
Jatin Sharma

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

Collapse
 
dylanlacey profile image
Dylan Lacey

BEEEEEEES!

Collapse
 
arikaturika profile image
Arika O

Dinosaur or banana. No idea why.

Collapse
 
jrop profile image
Jonathan Apodaca

bleh

Collapse
 
lupree profile image
Luca Ramseyer

this one is kinda funny tho xD

Collapse
 
stcollier profile image
Samuel Collier

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