234
u/misterrandom1 Dec 04 '20
Now I need to use leg hands.
44
u/NicNoletree Dec 04 '20
I do. I just put socks on mine.
7
u/SaintNewts Dec 04 '20
Nice try Cornelius, go tell Dr. Zira your planetary takeover plot will fail on this timeline.
3
→ More replies (2)4
3
1
u/looks_like_a_potato Dec 04 '20
Literal translation of feet in my native language is actually 'leg hands'
170
u/glorious_reptile Dec 04 '20
list.head -> list.noggin
response.body -> response.torso
analyse() -> rectumyse()
80
u/TheTerrasque Dec 04 '20
Assert -> Buttert
59
u/submain Dec 04 '20
I once worked with healthcare software dev. We were implementing a feature called "Diagnostic Assistant", and it needed a button.
I aptly named it `DxAssButt`. One of my greatest accomplishments to date.
35
u/thedomham Dec 04 '20
No abbreviation, but I once had a small project where a throwable was used when the whole application was canceled. The code was riddled with
throw new Abortion();9
2
360
u/tim_dude Dec 04 '20
Fun fact: There is no word for toes in Russian language. They are called foot fingers.
281
u/geeshta Dec 04 '20
At this point it's more like: fun fact: the english language has a dedicated word for the fingers on feet: toes.
→ More replies (1)36
80
68
Dec 04 '20
In Germany, we call gloves hand shoes
22
u/IrritableGourmet Dec 04 '20
This pissed off a friend of mine who was learning German. I let him get about 10 minutes into the rant (he was known for his tirades), then interjected with "Yes, but they call shoes 'fussglove', so it balances out." Oh, that set him off in a whole new direction.
→ More replies (2)21
Dec 04 '20
Shoe = foot glove
Glove = hand shoe
oh god oh fuck
Glove = hand foot glove
Glove = hand foot hand foot glove
[...]
Glove = hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot hand foot
→ More replies (1)15
29
u/Lewistrick Dec 04 '20
Same in Dutch.
In Indonesian, socks are called "kaus kaki", which means "foot shirt".
14
u/Etlas Dec 04 '20
The glove thing is in Swedish too. Handskor.
4
u/The4Channer Dec 04 '20
🤯 Never realised that in Danish because we spell it handsker and not håndsko nowadays
20
18
9
6
12
4
4
4
3
3
u/jbwmac Dec 04 '20
Is fingers really the best translation for that though or is it more like “digits”?
→ More replies (2)3
u/tim_dude Dec 04 '20
I'm not even sure there is a word for digits in Russian. It's all fingers.
2
u/jbwmac Dec 04 '20
If it’s all fingers and the word is used for toes as well then isn’t that the definition of digits?
3
1
1
1
1
1
0
45
Dec 04 '20
At my first programming job their was a function called at the end of each webpage to set cookies called dingleberries. The code quality at that company was terrible so instead it being in some shared footer just every single .asp file ended with
dingleberries()
159
u/Auravendill Dec 04 '20 edited Dec 04 '20
I heard the story at my previous work place that there was a piece of code that used the variable "rot" as short for rotation, but since rot is German for red, someone copied the code and renamed the variable to blau which means blue to make it less obvious.
Edit: To make it clear: It was code used internally to work with pictures in some way. So variables for rotation and colour are both to be expected. That one guy just copied someone elses code or at least part of it without really understanding it and apparently wanted to hide that by renaming a few things to make it look like his own code or something.
→ More replies (7)60
u/robot65536 Dec 04 '20
to make it less obvious.
He made something less obvious, so mission accomplished I guess.
7
u/steaknsteak Dec 04 '20
Just a good reason to use full words in your variable names. Or at least enough of a word that it’s obvious/unambiguous what it means, and is easily readable.
I hate reading code where a variable is named “req” instead of “request”, or something like that. Just type the 4 extra letters and stop making my brain do this additional work to translate your variable names.
The worse version is variable names that are acronyms for some multi-word class name. Just pick the noun from the class name and use that as the variable name. Again, don’t make me learn what a sqor or a flif is, just use real words
0
32
u/Oo__II__oO Dec 04 '20
all fine and dandy until you see the truncation for "legend_handles_analysis".
17
17
u/teedyay Dec 04 '20
From our production code:
//http://www.youtube.com/watch?v=89zOtd6VAiU&t=0m58s
Legend dave = new Legend();
chart.Legends.Add(dave);
5
1
1
16
16
u/MurdoMaclachlan Dec 04 '20
Image Transcription: Twitter Post
Alex Naka, @gottapatchemail
Looking at some old code and was initially puzzled by a variable named 'feet'
I have now worked out that this was at one point called 'legend_handles', which then became 'leg_hands', which then became 'feet'
sometimes I truly hate my past self
[This post has 48 retweets, 15 quote tweets, and 657 likes.]
I'm a human volunteer content transcriber for Reddit and you could be too! If you'd like more information on what we do and why we do it, click here!
6
1
14
u/Background_Drawing Dec 04 '20
It took me a week to decipher a variable just called "A"
2
u/abcd_z Dec 04 '20
To this day I can't figure out why I thought I was so clever renaming my secondhand external hard drive "Pogo".
→ More replies (2)3
u/Trilyn-error Dec 04 '20
Cuz you ‘stick’ it in. Pogo stick
3
u/abcd_z Dec 05 '20
Nah. It was something about the name before I wiped it, or possibly something about the files that were on it. *shrug*
28
13
u/gravitas-deficiency Dec 04 '20
The single hardest thing in CS is naming things and counting things.
5
u/UloPe Dec 04 '20
The two hardest problems in CS are naming and cache invalidation and off by one errors.
11
u/dvof Dec 04 '20
"Haha I'm gonna troll my future self so hard lol"
~ past self writing code
4
u/FPiN9XU3K1IT Dec 04 '20
It took me years, but today I finally understood why Karkat Vantas sucked at coding.
8
Dec 04 '20
And this is why Java variable names are so hideously long - because abbreviations lead to madness.
7
u/CraigTheIrishman Dec 04 '20
The was a TIFU a while back where a guy called a variable "cum" to refer to cumulative, and he was fired that day.
5
Dec 04 '20
My boss was going through my github looking for a repo and saw one called "tylenoliv" and asked why I called it that
It's cuz it's got codeine in it
9
4
u/Lardalish Dec 04 '20
So Ive never done any coding, but I have run into this phenomenon.
I used to work at a country club where we would revamp the menu 3 to 4 times a year. This leads to a lot of old and defunct recipes left in the system.
During one of our spring cleanings I came upon something titled only "Pony Steak" with a price attached. No ingredients, so it was likely a dinner special.
I racked my brain for a solid month before I remembered. We had done a beef filet with a horseradish demi glace sauce, and it was great. However, "horseradish demiglace filet" is too long. So it became Demi Horse Filet. And what is a demi horse if not a Pony.
4
Dec 05 '20
I have a StringBuilder named Bob. Because I build strings with him everywhere I need them in my project and i don't want to type out StaticVariables.s_Builder every time, i named it Bob the StringBuilder.
3
Dec 04 '20
Sometimes I miss the old days where you were required to keep a data dictionary so you knew exactly what each variable did.....
4
3
3
3
u/mrloube Dec 04 '20
spending time looking at the version history to understand what a variable is for
I feel like that’s the worst possible outcome of naming a variable besides accidentally overwriting another variable
3
u/wasabichicken Dec 04 '20
Don't mix anatomy and programming
Ugh, I remember one of those times...
As I recall, we were writing a client-side implementation of the OpenVPN protocol. Since it was a proprietary app and the reference implementation is licensed under GPL, my team was not allowed to use, or even look, at the existing code. Documentation and random blog posts was fair game, but alas, the protocol was... shall we say, sparingly documented. We had to discover various protocol features and come up with internal names for them ourselves.
One such discovered feature detects underlying network problems by sending out short messages at regular intervals: if the messages stop, the other end can surmise that the VPN endpoint has died. We named these messages "heartbeats" because... they keep us alive, y'know?
From there, the module that generated these messages was naturally named "heart". For architectural reasons, each VPN tunnel had its own entry or queue of outgoing heartbeats within that module, so... "arteries". Pity the poor bastard to come across getHeart().findArtery(id).inject(heartbeat); and try to figure out what it does. :(
3
2
2
2
2
2
u/TheTophatDemon Dec 04 '20
I used to have a habit on personal projects to call my variables names like Henry, Oliver, Muffet, etc. when I couldn't think of a good short name. Now I can barely understand that old code!
2
u/ZippZappZippty Dec 04 '20
There are two types of programming languages:
The ones that people don’t use.
2
Dec 04 '20
My variables are ALWAYS very explicit, oftentimes to the point of my co-workers giving me a difficult time about them. However, I never fail to understand or remember what a variable is used for.
2
u/linkedtortoise Dec 04 '20
In my personal code, I either name variables sort of well, single letters (a, b, c) of profanity. I'm much less funny apparently.
2
2
2
2
2
u/Castle_for_ducks Dec 04 '20
That reminds of the time in college when I was tasked with sorting a linked list. To do so, I had a variable called curr_min. Over time I started to call it Kermit the frog because I was slowly losing my mind. That prompted me to start naming all my variables after Muppet characters
2
u/Eolu Dec 04 '20
In all seriousness, I've come to think that one of the most important skills in programming is coming up with good names for functions and variables (especially anything exposed as an API). It's not just about the logic you write, it's about being a liaison between humans and computers (whether that person is someone else or yourself in the future). If you can pick a name that conveys intent so well that people can understand it without even reading any documentation, your API can be reused and extended so much more easily. It's not about having a really long descriptive name or having a really short name, it's about having the name that conveys intent in the most simple and elegant way possible.
2
u/LBXZero Dec 04 '20
Anatomy is chaotic programming that had over a billion years to get it to work.
1
u/avataRJ Dec 04 '20
4
u/LBXZero Dec 04 '20
The only problem is that DNA isn't exactly optimized. It had more aggressive testing to get creatures to work.
2
u/avataRJ Dec 04 '20
That is a requirements engineering problem, not a problem for programmers. Having done a few "nothing works and things are on fire" type jobs myself, occasionally it does help to read exactly what is requested to happen and keep a good poker face.
2
u/XKCD-pro-bot Dec 05 '20
Comic Title Text: Researchers just found the gene responsible for mistakenly thinking we've found the gene for specific things. It's the region between the start and the end of every chromosome, plus a few segments in our mitochondria.
Made for mobile users, to easily see xkcd comic's title text
2
2
2
1
1
1
u/GodHug Dec 04 '20
Was doing exactly that yesterday. I was disgusted with my own code and wanted to rebuild the project anew with my new knowledge...
1
u/k82216me Dec 04 '20
This reminds me of a time where I had cleverly abbreviated a variable name `assignment` to be `ass` and then we were looping over `asses` everywhere in the code. Faceplam
1
1
u/protomor Dec 04 '20
I worked on mammogram software many moons ago. I stopped giggling after the second week of naming variables with "breast"
1
u/drea2 Dec 04 '20
I’ll never understand why people unnecessarily abbreviate variables. If I have to take time to figure out what your abbreviation is supposed to stand for then it’s bad code
1
u/albinoloverats Dec 04 '20
I would totally have done this as a student. I’d love to be able to get away with it now, but you know, code reviews 😂
1
1
1
1
u/WoodsWalker43 Dec 04 '20
The only programmers that don't harbor some level hatred for their past selves are new programmers. This hatred also tends to grow as a function of time and change in skill, and can be decreased to some extent by dropping a program that they formerly maintained.
Suddenly I understand the real reason for IT turnover...
2
1
u/kharmatika Dec 04 '20
When I was writing an algorithm to solve a maze, I called it Right Hand Rule, cuz it basically involved using the right hand rule, I renamed the function “riharu” for short, which later became “riru”, which then became “weewoo” because that’s what my friend was saying, and at some point it just became “patrick” for the meme of it.
1
1
1
1
1
1
u/lordzsolt Dec 04 '20
I really hate when people abbreviation variable names. Like I'd it too hard to type 5 more letters, especially with all IDEs having autocompletion?
1
1
1
1
u/kumar29nov1992 Dec 05 '20
What's more concerning is the underscore in the variable name and not in camelCase
1
Dec 05 '20
I saw a database before that was for a porn site. The tables names were amazing. The inserts and joins in the code was something else.
1
1
u/TARN4T1ON Dec 05 '20
I don't actually understand the ultra-wide screen argument (except for absurdly long variable names, like 50+ characters, where even this method won't help).
Basically every language allows you to just put things on a new line, which is especially helpful for function parameters. I've actually made it a habit to put every function parameter on a new line, both in function definitions and function calls.
While this probably more than quadruples the amount of lines in code and undeniably takes a little longer to write, it makes it very readable, and basically never requires you to scroll to the right or to enable text wrapping.
The only problem with this is that quite a few code formatters don't agree with this way of writing things and revert it, and basically none have this built in and can do it for you, sadly.
1
u/Bosombuddies Dec 08 '20
What actually happened: He shortened legend handles to be a variable named leg_hands, which is just a weird way to say feet. He realized what he did and thought he could make a funny tweet about it.
1.3k
u/SausageEggCheese Dec 04 '20
I know this is humor, but this can actually be used as a decent lesson in practices to avoid when shortening variable names.
Don't abbreviate unnecessarily. In this case, the original variable is not that long. With modern IDEs, widescreen monitors, and memory sizes, there's usually little reason to abbreviate at all.
If you do abbreviate, never abbreviate to another real word with a different meaning. People will assume it is just the other word, and not an abbreviation.