DEV Community

Lazy names are lazy

Douglas R Andreani on March 20, 2018

If you are starting a project, but you have no idea how to call it, maybe just a placeholder, how do you name it?

My goto is Douglas1 or test1, how about yours?

Collapse
 
ben profile image
Ben Halpern

I use the word yolo all over my dev environment in various contexts.

Collapse
 
andy profile image
Andy Zhao (he/him)

When running each loops, I always assign the each variable as x, y, or z.

products.each do |x|
  x.orders.each do |y|
    y.destroy!
  end
end

Also, a lot of things are called asdf or some variation of that.

Collapse
 
andreanidouglas profile image
Douglas R Andreani

I’m running on the “i”, “j” religion. But I can totally understand that

Collapse
 
slaffik profile image
Slava Abakumov

i, j, k FTW!

Collapse
 
monknomo profile image
Gunnar Gissel

Gotta respect that unit vector

Collapse
 
maestromac profile image
Mac Siri • Edited

I name things based on what I'm thinking right at that moment.

hmm = User.first.name
huh = "lskdfjlksjdf"
what = /\(^[a-zA-Z0-9]+\)\.\([a-z]+\)/
damit = huh.gsub(what, hmm)
Collapse
 
dpliakos profile image
Dimitris Pliakos • Edited

lala is my favorite!

it's:

  • easy to remember (la two times)
  • extensible (lalalalala as long you want. I swear)
  • Hack-able (lala -> customization engine -> lolo | lili etc)

For times that laziness pass the upper limit, a, b, c are fine too :p

Collapse
 
scott_yeatts profile image
Scott Yeatts • Edited

Had a dev on a production app that I had to code review more times than I would have expected because he would use single letter variable names.

a = someValue

Made my heart sad every time I saw it.

Collapse
 
scottishross profile image
Ross Henderson

If I don't have a descriptive name for something, I won't do it. My manager and I have sat down for over a day before trying to figure out what to call certain things. For us, since we're creating a department, it's important that anyone could walk into the job and know exactly what we mean.

Collapse
 
mortoray profile image
edA‑qa mort‑ora‑y

I usually start with a name that I think captures what I'm working on. Maybe a branch name, or a directory name. Then about 2hours, or 2days later, I make a PR with a subject and branch name that absolutely don't line up.

Sometimes I'm right though, and it feels satisfying. But often wrong, for example, from today:

  • Branch: fix/trigger-action
  • PR Subject: "Fixes redundant InvalidateLayout in LayoutRole change"

:)

Collapse
 
bencehornyak profile image
Bence Hornyak

temp or tmp most of the time.

Collapse
 
niorad profile image
Antonio Radovcic

my first choice while learning a lang or lib is "hello x", like "hellodart".
Then, when I want to do something more involved, its usually dartymcdartface.

The commit-messages for my playaround-projects are mostly some song-lyrics that happen to play either in my head or headphones while i do the commit, like "bluebirds are so natural".

(Same with savegames back when one could name savegames in PC-games)

Collapse
 
rendall profile image
rendall

I don't do it. I will literally sit, flow-stopped, doing nothing, until I think of a good descriptive name.

Collapse
 
chromadream profile image
Jonathan Nicholas

I used i, j, k for loops, and every other letter for other variables.

Collapse
 
slaffik profile image
Slava Abakumov

I use the names of Greek Gods or animals. Like Zeus or narwhal.

Collapse
 
idanarye profile image
Idan Arye
head -c8 /dev/urandom
Collapse
 
itsjzt profile image
Saurabh Sharma
Collapse
 
cheshireswift profile image
☕ツ

Waffles and pickles abound in my projects, be they classnames, logging or project names.

Collapse
 
monknomo profile image
Gunnar Gissel

biff scuzz junk whatevs are a couple I keep returning to

Collapse
 
monknomo profile image
Gunnar Gissel

For projects, I pick island names from archipelagos I like.

Collapse
 
atyborska93 profile image
Angelika Tyborska

My go-to word for any placeholder or bogus strings for tests is "banana". If I need more, I go with "apple" and "orange".

Collapse
 
rbanffy profile image
Ricardo Bánffy
Collapse
 
val_baca profile image
Valentin Baca

For truly throwaway things, like tutorials or learning, here's my go-to placeholders:

foo
bar
baz

asdf
zxcv
lkj