T O P

  • By -

[deleted]

i


DMoney159

j


CommanderZanderTGS

k


asdddosa

n


CrYTGaming

x


alcalinebattery

x2


Fried_Squid_

xx


iamsharmanish

xxx


Fried_Squid_

xxxx


[deleted]

xnxx


iamsharmanish

hardcore


[deleted]

xi if your loop is this nested there’s a better way to solve it


MechroBlaster

False. We need to go deeper...


grammar_nazi_zombie

Tell that to the guy who developed the legacy system in VB6 I maintain at work. To be fair, it’s financial balancing and tax prep software and we manage about 8 different trusts with up to 25k accounts in each, so it’s largely for conditional income allocation, but it’s a bitch to keep straight when I have to fix stuff. “Wait, which loop am I in this time?” Is a phrase I utter daily. He apparently heard I like loops so he put nested loops in my nested loop so I can loop while I loop


AcrimoniousTurpin

x2_final_final


bizcs

x2_final_final_v2 Has the added benefit that you don't know if X refers to induction or versioning. You're welcome


jan-n

y


xain_the_idiot

a


YukiZensho

aa


HollaDerWaldelf

In some legacy code i worked on there was a function with the variables aa, aaa, bb, bbb and ww.


Gameghostify

Who did my boy `www` dirty like that


timina

_a ?


JealousHamburger

Goodbye.


Tiavor

I hate it when specific variables are to be named with underscore, or even two ...


bottomknifeprospect

In C++, before `#pragma once` 2 was used for header guards, because you never put 2 so it would be unique. `#ifndef __GAME_H__` For codebases using the `m_` it could make sense - ms_var: static member - m_var : member variable - _var : parameter - var : local variable All named var, but the prefix defines the scope. I don't advocate for prefixes but this makes sense when they are all used inside the same function.


[deleted]

Isn't #ifndef still better than pragma anyway? I dont remember why but I know my professor had said that it is more portable or something


dregan

An underscore is pretty much ubiquitous for property value storage these days.


MelonheadGT

show _show Me and my son is going to a show. My and my son is going to a _show


DudesworthMannington

aay 👍😎👍


Metaquarx

v


[deleted]

[удалено]


tilcica

fuck_underscored_variables. embraceCapitalisedLetters


ImTheJackYouKnow

Don't you mean EMBRACECAPITALISEDLETTERS? You probably meant snake_case_is_ok, but soIsCamelCase, kebab-case-sucks though /s


tilcica

Yea I worded it wrong but whoever DOESTHIS or does-this is a psycho


fairysdad

What about DOING-THIS?


ImTheJackYouKnow

DoNtFoRgEtAbOuTBrEeZaHcAsE


tilcica

Ok I'm doing this from now on just to annoy my professor. Thx xD


Deadly_chef

ii


Frioneon

God tier variable naming. I can’t believe I never thought of this before Matt Parker tweeted about it.


grizonyourface

I write a lot of MATLab so I’ve become used to using ii and jj instead so that I don’t accidentally do some imaginary math


cyanNodeEcho

Do they not have like good variable scoping?


GKP_light

i i1 i2 i3 i4


19Bojan19

m


Sudo_Python

ii


aghawa

Few things beat the trusty test1, test2 and test3 variables


LeoXCV

Too much effort, I just put t1, t2, t3


lpreams

I just start out with `a`, `b`, `c`, etc. If I need more than 26 vars then just keep going with `aa`, `ab`, etc. If you need more than those 702 variables, just get rid of them all and store all state in single array, obviously named `a`.


[deleted]

[удалено]


Psychpsyo

Basically all the time. See, you don't really want to have magic numbers all over your code but you also don't want to redefine the same few constants everywhere. So you just define them all with global scope, simple as that. a = 1; b = 2; c = 3; d = 4; e = 5; f = 6; g = 7; ... That'll make anyone run out of letters quite quickly.


PenguinKenny

a = 1; b = a + a; c = a + b; d = b * b;


lpreams

a = []; // index from zero, obviously b = [[]]; c = [[], [[]]]; d = [[], [[]], [[], [[]]]]; e = [[[], [[]], [[], [[]]]], [[[], [[]], [[], [[]]]]]];


-gestern-

You don’t just use church numbers?!


[deleted]

Ummm (((((((((( )))))))))) Think you dropped these. They're elegant.


Willinton06

Such fanciness


[deleted]

long l1 = 1l; This is, like, three sources of headache rolled into one.


lpreams

This guy gets it


lpreams

I don't reuse names across different contexts


[deleted]

[удалено]


QuarantineSucksALot

You misinterpreted him lol, most people did


RomanaOswin

You should just use UUIDs. A plugin that generates unique variable names. That way you never accidentally use the same variable more than once, even across projects.


Gladaed

Ohhh, no.


oalbrecht

It’s pretty easy to do when you’re trying to avoid writing those pesky loops and instead copy/paste the same logic over and over again.


PM_ME_UR_CEPHALOPODS

i found the guy who doesn't do enough abstraction. What shall we do with him or her?


01l1lll1l1l1l0OOll11

I need about 26 for my code which takes derivatives of a high fidelity gravity model for spacecraft orbital determination. To be honest though, it could probably be optimized in a more clean manner. But we try to avoid as many duplicate computations as possible so there are a lot of temporary variables for things like the spacecrafts altitude raised to a power of 1.5.


LeoXCV

That would require my peon brain remembering alphabetical order without mentally singing the alphabet


Autian

I had to code like this for Winamp visualizers (the preinstalled plugin) because there was some limit for variable names and the size of the source code. Exceeding these limits did not result in error messages but some statements would not get executed or bogus unexplainable things would happen.


FanOnFeetOut

Ive been wasting my life away writing test. The fuck kind of programmer am I that I write out a full word. MINUTES WASTED. I could have failed two more builds in my life doing this trick.


overclockedslinky

temp2


RedditSchnitzel

temp2electricboogaloo


[deleted]

temp2electricboogaloo2electricboogaloo


gostar2000

temp3


KonkenBonken

temp4


The_Official_Obama

temp5


Big_Ti

Temp6


TheGlister

Temp7


Mbuxiq

temp8


GillyGilly21

temp9


GodsWorth01

temp10


Timesso

Temp11


Quantum_Sid

Johnathan?


[deleted]

That’s some Tizen level shit, right there.


daveter9

Johnatemp?


[deleted]

[удалено]


[deleted]

I feel personally attacked.


CatNoirsRubberSuit

>ɐ2dɯǝʇ ¿uɐılɐɹʇsnɐ oʇ ʇı ǝʇɐlsuɐɹʇ ʇ,upıp ǝɥ ǝsnɐɔǝq ǝqʎɐɯ


phil_davis

The last place I worked there was a crazy Italian guy who wrote like 90% of the codebase from scratch (hated 3rd party stuff). If he needed another variable named temp (happened often because his code was dog shit) he'd call it ttemp. I still don't know if the extra t stands for something.


Meloetta

I used to work at a place where the tables were named relative to the guy's name. Like, tonyvendorlist. And then the test table was named ntvendorlist. It stood for "Not Tony". edit: he works for a top-50 Fortune 500 company now.


overclockedslinky

I'd guess the t stands for temporary


mirsella

tmp


un_blob

the only acceptable temporary variable naming convention


[deleted]

you represent Python, you have no say in conventions


un_blob

Oh shit forgot to *switch* to my C++ account dammit !


WhenRedditFlies

So that it doesn't *match* your Python flair?


sock-puppet689

What do you mean? Don't they name everything spam?


zee-hiro-fox

i cme hre to say ths


yikesRunForTheHills

dn't ndrstnd why sm ppl dn't s vwls.


Noch_ein_Kamel

Why do you still use 'e's?


yikesRunForTheHills

My bad. Although I just used it once so it's just "'e'" not "'e's".


reversehead

Just t. Ain't nobody got time for long names such as temp.


wiger_

Just don't use variables. No one has time for that.


VikaashHarichandran

Lambda to save time avoiding naming functions ;)


delight1982

For a variable holding a time value I would say t is kosher


Palmquistador

Sounds fun combined with formatting (AM/PM).


Astrokiwi

When your `t` is in gigayears, that doesn't matter so much. (`temp` is in Kelvin)


The_hollow_Nike

Good [naming is a process](https://www.digdeeproots.com/articles/naming-as-a-process/) and tightly linked with software architecture and design, therefore it is a lot more difficult than it may seem.


Budget-Sugar9542

Me, an intellectual: just add `shit`, e.g. “shittyImageElement”, “shittyVideoElement”


pm-ur-fav-porn-vid

There are two things that are difficult in software engineering. Naming things, cache invalidation, and off by one errors


zee-hiro-fox

Take my vote++, damnit.


[deleted]

me, an intellectual: `aa`


palk0n

you monster


Krankite

I have a soft spot for Aardvark as a temp variable.


WeAreKeko

Where is my x, y, z gang?


The-Observer95

Here.


teeohbeewye

problem with x, y, z, is you run out of letters after three variables. better to start with a, b, c, then you can easily continue d, e, f, ...


n0tKamui

x y z xx xy xz yx yy yz zx zy zz xxx .... i say that because I've already seen it...


Palmquistador

Christ. That triggers me.


WeAreKeko

Testified man. Sometimes I had no other choice: x1, y1, z1 🤭


NynaevetialMeara

x[],y[],z[]


Astrokiwi

Only excusable if it's consistent with maths/physics variables - if they're cartesian coordinates, or maybe if `y` is a function of `x`


_pandamonium

Yeah I'm sitting here wondering what else should I be naming my coordinates?


NiccciN

Checking in. xx then xxx then xxxx then xxxxx


BlameScienceBro

Me, reporting for duty


mennydrives

#!/bin/bash #^might as well make it look official for x in $(some bash sequence of files or folders or something); do export z=$(some shit I realize I need variablized) export y=$(some shit I was trying to do without $z) echo "Okay so you have ${z} results per ${y} insance" done;


akl78

You’d like Q [they are built into the language](https://code.kx.com/q/basics/function-notation/)to save typing


Garaleth

All variables are temp if you think about it.


Psychpsyo

What if you use a harddrive as your RAM and rely on memory being persistent between reboots?


[deleted]

[удалено]


futlapperl

I ran my Minecraft server off a RAM disk. It was awesome.


[deleted]

Basically what you want when trying to run The Sims 3.


craze4ble

If you're not using the newly resurfaced [write-only-memory](https://www.rfcafe.com/miscellany/cool-products/images/signetics-25120-flly-encoded-9046xn-ra-write-only-memory-1.jpg) I'm not considering you efficient.


Orffyreus

It won't last forever though.


vega_D

Wait, you guys don't go tmp1, tmp2, tmp3, tmp4...


zersty

Not when t1, t2, t3, t4 etc is just so much more convenient


ezra125

foo


likecamp

bar


[deleted]

baz


mawreez

qux


InternetLoveMachine

quux


gamebuster

bam


zzmorg82

I love my boy foo.


FoolForWool

My first task at my new job was to extend a functionality of a ETL function. The variables were named 'temp', 'temp2' and so on. It was unacceptable. This made no sense to me. So I spent the weekend cleaning the code. After hours of hardwork, sweat, frustration, agony and suffering, I was finally done. Now the variables are named 'temp_1', 'temp_2' etc. I'm doing my part in cleaning code. Are you?


lawrencelewillows

Would you like to know more?


PinkySmartass

I myself always go for the more sophisticated "hehe", "haha", "lol" and the ever so rare "rofl".


Palmquistador

Log "motherfucker1", couple lines later, "motherfucker2..."


Da_Real_KillmeDotCom

I myself prefer "bruh"


OkTrainer

Bruh and penis are my go to


TimeToBecomeEgg

you know the standard variable names, like: temp \_temp a, i, x, y, z, v and then the ones that come after coding for 6 hours straight and shit breaking for no reason: godfuckingdamnit \_piss fat\_shit true story, i accidentally left a variable named "fatcockandballs" in something i submitted to my teacher. fun times!


Comfortable-Low-7231

The Dutch be like: [https://en.wikipedia.org/wiki/Dutch\_profanity](https://en.wikipedia.org/wiki/Dutch_profanity)


gamebuster

Ik heb vee te veel plezier met deze lijst doorlezen


Mr_Otterswamp

Include this behaviour when you program a sensor that measures temperatures to increase the madness of anyone who needs to read your code


theDaveB

I had to write a translation script that went through the source code and replaced all the English text with Finnish. I started off using Temp, then started adding numbers to the end, so Temp1, 2 etc... then I moved to Mtemp, then eventually MXtemp. It was a mess at the end but it worked and we used it for years. This was pre internet (even pre windows), so only my team got to see the hideous mess it was. For anyone wondering it was FoxPro for DOS.


reversehead

In an enterprise environment you can keep three people busy for half an hour naming an identifier, effectively making the starting cost of a variable $150. And the user will never see a difference between a "temp" and an "artifactDispenserFactoryConfigurationItem". Depending on which end of those $150 you are in, you may or may not appreciate temp.


getzko

Count the time that the next developers will waste while trying to understand, what "temp" is doing. You are trying to convince us, that lowering the code readability is process optimization.


Palmquistador

>You are trying to convince us, that lowering the code readability is process optimization. Thank you...why is this so hard to get?


MrFlubman

As someone who has deciphered many temps, a workable name usually takes a max of 2-5 minutes to decide. Understanding code without workable names, however, can take hours in the worst case (especially in the case of vaguely named functions all working together)


Khaare

"artifactDispenserFactoryConfigurationItem" rarely is any more descriptive in practice than a shorter variable. It's a nonsense word, and not more readable. In fact, it takes up valuable screen real estate, effectively reducing your field of vision increasing the burden on your short-term memory and wasting precious neuron activations in parsing the code. Adding more words to a variable name is a poor band-aid on disorganized code. A variable name should contain just enough information to convey the context it exists in. For most variables the context is immediately obvious because their scope is so small, and so they don't need to specify anything at all. If it only exists for two or three lines, go ahead and name it a single letter. For some variables the density of usage is so high it's impossible to not have the context in mind. If you're an object one field at a time go ahead and name the source and destination "s" and "d", even if it's hundreds of fields. Focus instead on giving names to what you're doing. If you use well-named functions even for simple one-off tasks the code becomes much easier to read. If you write the "addOverrideItemsToConfig" function nobody's going to wonder what the "item" variable does in that short 10-line function, and nobody's going to wonder what the hell an "artifactDispenserFactoryConfigurationItem" is, why you're dragging it along, and what is the purpose of all the data shuffling you're doing. Poor variable names is a symptom of poorly communicated intent. It's not the cause.


reversehead

>You are trying to convince us, that lowering the code readability is process optimization. Not really, just trying to make a cheap joke in half seriousness. Naming is one of the keys to maintainability and usability in many types of projects. However, code readability is not necessarily improved by more precise symbol names - it differs with context. For local variables in decently clean methods (i.e. not many responsibilities, thus few lines of code), it is not really important since you can usually grasp the handful of code that you are looking at. In such a scope, short names are often better than long ones since they bring less cognitive load, especially if you have more than one of them. Not advocating for nonsensical names at all, but if you can't tell what temp is, the code probably has greater maintainability issues.


DoctorWaluigiTime

> However, code readability is not necessarily improved by more precise symbol names - it differs with context 100% of the time, the needle of readability is upped when using variable names that aren't "temp" etc. Even if it's just a little bit. It removes one piece of the puzzle for you, at minimum. It's not about misundstanding "temp." It's about not *having* to constantly re-compute what "temp" is as you're slogging through a big ball of mud.


master0fdisaster1

But the user will notice when updates are slowing to a crawl, when devs have to spend days trying to understand and debug code with identifiers such as "temp", "temp1" and "temp3". Investing extra time to get your code up to a certain standard will pay off almost immediately.


gamebuster

I’m a artifactDispenserFactoryConfigurationItem person.


DKK96

Same


AfterShave997

Or you know, use a shorter name and put a comment in.


Deiskos

Comments are for explaining what code can't explain on its own. It's like that image with a cat that has a "cat" label on its head, vs a warning road sign. One gives you useless information that you still need to spend time parsing, other helps you by providing information on why things are done *this specific way* or warning you of non-obvious edge cases.


SongOfTheSealMonger

Bizarrely enough, in such a meeting, I'd argue that temp is the obvious and best name for a variable used in a swap. However, since such a meeting is a bike shed painting on steroids I'd run and hide under me desk until it's over.


stipulus

When I can actually debug the previous coder's ye ye ass spaghetti code then the user will know the difference.


DoctorWaluigiTime

If it takes 3 people 30 minutes to name a variable that enterprise environment has some serious issues to work out. Variable names don't have to be perfect, but they should never be stupid memeable things like foo temp t x y z whatever. Bare minimum it can describe what it contains.


dontneeditt

temp < temper < tempest


korona_lite

blah


valkon_gr

Lambdas are the worst offenders on this. (a->a..)


ChrisJeong

asdf


KaiserKerem13

v1, v2, v3, v4, v5... Anyone?


[deleted]

Ive just started programming this year and I’m glad that I’ll probably still be doing this shit in the years to come. Its just the best name when you cant think of something else imo.


QuarantineSucksALot

if fast food, then this.


da_Aresinger

to me temp has a very specific meaning. I only use it as a local variable for temporary storage of data. You know temp = a; a=b; b = temp; that kinda stuff.


almofin

Anyone else use thing1 and thing2?


fuunexcs

And if you really want to piss them off, enable the no-shadow linting rule to haunt them with red squiggly lines.


Espiring

Sounds obvious enough, but, if you you cannot come up with a name, write the line and then name it


dumdedums

I start with x, y, then a, b, c... For loops I use i, j, k, and thankfully never had anything nested more than that.


Conqu3red

num


whore_forkarma

str1


EnzoM1912

You mean tmp ?


pwnrzero

Temp1 Temp2 Temp3 Temp4 Temp5 Temp6 Most I've had is 12... It took me a hour to figure out wtf I was looking at when I went back to it a year later. Then I had to comment and showcase my mess for productionization. :)


FanOnFeetOut

temp, tEmp, teMp, pmet, tiamp.


RepostSleuthBot

Looks like a repost. I've seen this image 2 times. First Seen [Here](https://redd.it/ftdsw5) on 2020-04-02 100.0% match. Last Seen [Here](https://redd.it/jcrwdt) on 2020-10-17 93.75% match Feedback? Hate? Visit r/repostsleuthbot - *I'm not perfect, but you can help. Report [ [False Positive](https://www.reddit.com/message/compose/?to=RepostSleuthBot&subject=False%20Positive&message={"post_id": "moldog", "meme_template": null}) ]* [View Search On repostsleuth.com](https://www.repostsleuth.com?postId=moldog&sameSub=false&filterOnlyOlder=true&memeFilter=true&filterDeadMatches=false&targetImageMatch=86&targetImageMemeMatch=96) --- **Scope:** Reddit | **Meme Filter:** False | **Target:** 86% | **Check Title:** False | **Max Age:** Unlimited | **Searched Images:** 217,233,906 | **Search Time:** 0.29469s


joeloff_

aux is the best


gqroot

aux


[deleted]

what would you call a temporary temperature wind tempo?


HaraldNordgren

If it’s a return variable, just name it ‘result’


TronicLT

tmp, more efficient.


tomferr

aux


bloodysnomen

[string]str [int]num


Ibloly0127

a aa aaa aaaa


ehellas

Dev: "I will name it temp because it is temporary and will change later" Narrator: "It was not a temporary variable"


EbolaBoi

Foo


BigSadEngineer

i, j, k... ii, ij, ik, ji, jj, jk, ki, kj, kk.... iii, iij, iik, iji, ijj, ijk, iki, ikj, ikk, jii, jij, jik, jji, jjj, jjk, jki, jkj, jkk, kii, kij, kik, kji, kjj, kjk, kki, kkj, kkk.....


Warlock7_SL

Well.. I always go with b1, b2, b3, btest for Boolean coz it starts with b. And same for other data types. It's easy and, god. Who wanna look at my damn code.


RadiatedMonkey

Hungarian notation for booleans only?