What is your variable name of shame?

I must use this in a commit!

3 Likes

As for variable names I think I haven’t done any worse than what was already mentioned. As for Git commits however, I remember having a frustrating day once, where I just couldn’t get around a problem and had commits like this:

  • Fix to the problem where the screen didn’t get updated
  • Another attempt to fix the problem where the screen didn’t get updated
  • For sure this will fix the problem where the screen didn’t get updated
  • This better work this time, NOW the screen will get updated
  • For f*cks sake, just kill me!
3 Likes

final commit being: And this time, I mean it?

Something like that indeed. :wink:

My go to name if I can’t think of soemthing to name it is:
(___ is a something vague)
___Thing

IE
ShooterThing()

I usually write this first, think for a sec and change them but sometimes I have to move on with the code and have to remember to come back after i get what i need to call it.

Maybe my go to name should be w/e i google for it hahaha.

1 Like

My worst variable names occurred when I first started learning coding in high school.
I don’t remember the assignment but I remember the variable names:

  • which1
  • which2
  • which3
  • whichoneiswhich

I definitely learned my lesson after writing the program.

1 Like

A few years ago, I was contributing part of a Unity runtime thing for an animation tool, and I named one of the classes Smart____. And it made it into the official package. It was a wrapper for one of Unity’s built-in classes, adding extra functionality to it.

Every now and then, I still look back and regret the name. I think Smart____ is a bit of a copout and too vague/insufficiently descriptive and just slightly presumptuous.

But at the same time, I still don’t know what would’ve been a better name. ___Wrapper is just as bad?

Maybe I should’ve added an adjective, describing what it did or contributed to the thing it wrapped. Tracked____. Accounted____.

I’m not sure what the specific wrapper was for, but judging from your descriptions… perhaps _____Tracker?

The worst commit messages I have come across while using git is 6 consecutive commits, all called “Stuff”

I have a project with “numerous bugfixes” commits one after the other, and I know better.

These are my goto’s in a pinch

var xxx = ....
var zzz = ...

Some examples of bad habit git commits I often write:

“Try again”, “Fix”, “Will this work?”, “kjdaskdhksdsa” (keyboard smash)

I almost always squash my branch changes before committing to the main branch (with a better commit message!) though so I feel like the bad messages can be excused :grin:

My script names are much worse than my variable or git commits…
I try to make a whole description on what it does in the titles…
I mean, what even is; RustyEnemySpawnerLocationUpdater.cs

The wors commit “I do something, don’t remember what… wanna sleep((((”

1 Like

In my earlier work I would make a PlayerMovement class only to realize later that I was also going to use that same class for enemy’s movement.

My early commits were pretty bad too. Was lucky if I put a full sentence.

Here’s my worst commit message

worst_commit

1 Like

Not a variable name, but several years ago I was fiddling with stereoscopic images and such and I had a function that would generate an anaglyph from two stereo images. The function was called AnaglyphSkywalker

commits in my current project:
image

It’s variable and function names like these that lead one to the Dark Side of the Code…

1 Like

@Brian_Trotter

You mean dark theme?

I hear light theme is for therapists and data entry clerks. :laughing:

2 Likes

I remember the days when it was ALL dark theme. Black background and white, green, or yellow foreground!

Then the Mac came along and put black text on white. An abomination!!! But it caught on.

1 Like

I never new what this really meant back when I was in junior high school, then I lived on an aircraft carrier and ended up getting it. I think I remember wanting to die. It was so disgusting. :laughing: :cry: :skull_and_crossbones:

1 Like

Privacy & Terms