DEV Community

Douglas R Andreani
Douglas R Andreani

Posted on

5 4

Lazy names are lazy

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?

Top comments (23)

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
 
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.

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more