DEV Community

Worst thing I ever named anything

Joel Varty on September 24, 2019

I once called a set of UI controls The MegaBlocks. Still not sure if it was all that bad. It was in WebForms in dotnet 1.1 though. That part w...
Collapse
 
rickardengberg profile image
Rickard Engberg

A friend of a friend used the names of his ex-girlfriends as variable names...

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

A little bit of Monica in my life
A little bit of Erica by my side
A little bit of Rita is all I need
A little bit of Tina is what I see

Collapse
 
joelvarty profile image
Joel Varty

OMG that's epic

Collapse
 
ferricoxide profile image
Thomas H Jones II

"Why's this variable named 'Jessica'?"

"Because it's very unstably defined."

Collapse
 
vipulbhj profile image
Vipul

I am so gone win this one, I have so many I can't even remember those anymore, lol. Wait a second let me find some gems

1 -> pleaseDontBecomeFalse = true
2 -> flag1, flag2, flag3, flag4 till 99 (I won't say why, please don't ask me)
3 -> CONSTANTS = [88, 124, 99, 927];

Collapse
 
evanoman profile image
Evan Oman

dataObject

Collapse
 
joelvarty profile image
Joel Varty

Ha!

alt text

Collapse
 
pim profile image
Pim

I recently named a binding type in an Angular project and it royally fucked the compiler, which gave literally nothing in the way of what the actually error was. Took me house to figure it out...

Collapse
 
peledzohar profile image
Zohar Peled • Edited

ContentProcessor. MessageReceiver. MessageSender. DataProcessor. There are so many it's hard to choose from. In my defense, I'm forced to use such names.

In the .Net world there's a naming convention of adding suffixes to classes - like FileNotFoundException which is kinda dumb IMHO.

I mean, you only use exceptions in two places: throw and catch. You know if you have throw new SomeClass() in your code, SomeClass is derived from Exception, same as if you have try {...} catch(SomeClass x) {...} - so why not just call it FileNotFound?

I'm not alone in this, there are other developers that share the same sentiment. In fact, I once read about a software engineer that got so sick of it he had all his classes add with Thingy.

Also, I once named one of my variables Yevgeni, but that was in honor of a fellow developer that got fired :-)

Collapse
 
joelvarty profile image
Joel Varty

I suffer from this too (ManagementSecurityValidationException)

Collapse
 
pierreturnbull profile image
Pierre Turnbull • Edited

I like using a parent-child naming, especially in SASS. However when lots of elements are nested it can give some names that are actually not understandable at all at first glance, such as getGameDetailsRankingRowFieldNumberClasses.
It means : "A function that returns the classes of the div corresponding to the field 'number' in a 'row' of a list called 'ranking', which is located in the page 'gameDetails'."
Hence I try renaming things with short, easy names when possible. It's a little sacrifice but, when done properly, it is much useful!

Collapse
 
jonathanburnhill profile image
Jonathan Burnhill

iveHadEnoughJustF***ingWork()

Collapse
 
adam_cyclones profile image
Adam Crockett 🌀

and did it? I think you should have said please.

Collapse
 
jonathanburnhill profile image
Jonathan Burnhill

Nope, I pleaded with it, I cried I promised I would change....

Apparently it was sick of my lies and just wanted the truth 🙄😂😉

Thread Thread
 
adam_cyclones profile image
Adam Crockett 🌀 • Edited

Honey came in and she caught me red-handed
Creeping with the girl next door
Picture this we were both butt naked
Banging on the bathroom floor
How could I forget that I had
Given her an extra key
All this time she was standing there
She never took her eyes off me

Shaggy - a long time ago

Thread Thread
 
jonathanburnhill profile image
Jonathan Burnhill

😂😂😂

Collapse
 
ferricoxide profile image
Thomas H Jones II

People don't let me name things. I tend to like "easter eggs", including in things as simple as names. People don't like to have been using things for months only to have someone with a similar proclivity come on board and start sniggering. =)

Collapse
 
joelvarty profile image
Joel Varty

OK.. I'm intrigued... I feel like there's a story here!

Collapse
 
aestrro profile image
Kevin Carr

Once upon a time in Ruby on Rails land, I created a model called Case.

Collapse
 
joelvarty profile image
Joel Varty

Epic

Collapse
 
cjstehno profile image
Christopher J. Stehno

I've had methodWhichShallNotBeNamed() and doStuff().

Collapse
 
fultonbrowne profile image
Fulton Browne

I called a bunch of variables main, main1344, main9963, main1238... I am still renaming those.

Collapse
 
joelvarty profile image
Joel Varty

That's awesome - one of the first projects I ever worked on was in Visual Basic, and the variable names were things aa, bb, cc, which were variable types and re-used to store different things arbitrarily. My job was to "fix it" haha.