kromem,

Ok, but what variable is 🐈?

driving_crooner,
@driving_crooner@lemmy.eco.br avatar

Is the function to con🐈eate and print.

sirico,
@sirico@feddit.uk avatar

It took me too long to figure out the I in an if statement was just integer

PotatoesFall,

In a for statement, it often refers to index

ILikeBoobies,

Am I being gaslit?

rickyrigatoni,

Gasboss gatelit girlkeep

exanime,

How dare you… <Eye squint>

Strawberry,

mathematician here, where is the joke?

humbletightband,

This joke is funny only if placed in Arnold-Atyah manifold if Kolmogorov-Ramachandran-Yu metric is defined

CanadaPlus, (edited )

So don’t use it in non-KRY-definite AA situations, or you could get erroneous results. QQX is fine though, as long as you have non-vanishing ABCD. /s

I wonder if Lean proofs become the new peer review like I’ve heard suggested, if mathematics might break from this, and look more compsci-ish in the future. That way non-specialists could get up to speed quickly.

BleatingZombie,

Variable names should be “self defining” meaning you should be able to understand what its doing from the name. The name also shouldn’t be too long. Combining those together makes it difficult to come up with an “elegant” name

PotatoesFall,

I think they got the joke, they were just joking about how this is common in math :P

Strawberry,

The most atrocious variable names I ever encountered in code were as a research assistant for a math professor doing game theory simulations. Literally unreadable unless you had a copy of his paper on the subject to refer to

menas,

tmp3 = tmp1 + tmp2 ; T.T

KillingTimeItself,

in the linux community it’s really common to have applications like MPD, music player daemon, or MPC, music player client, and ncmpc, ncurses music player client, and ncmpcpp the aforementioned one with ++ tacked onto the end.

Cmus, which from what i can recall is literally “c music player”

etc…

Daft_ish,

Now I want to become a programmer so I can give variables people names.

trolololol,

Ha

You should hear of the method of pretending you’re at breakfast or some other anthropomorphized situation, where you name things as butter and cheese, knife and bread, tea and teapot

Then there’s Hungarian notation which is actually used seriously. But I can’t give an entertaining example only s boring and probably inaccurate one.

some_guy,

Why is no one giving credit to my friend n?!

explodIng_lIme,

for whatever in stuff:

Buddahriffic,

for myList in myElement:

CandleTiger,

You need to use trigger warnings for this kind of shit.

JATtho,

name your function as malloc() and see to world burn and generate bugs at factorial rate.

trolololol,

If you name it malloc it will be easy to notice. On the other hand if you call it free…

MonkderDritte, (edited )

No, that’s math.

gandalf_der_12te,

How to write spaghetti code:

ZILtoid1991,

Then you realize your code is undebuggable because half the functions and variables have single-letter names or called foo, bar, baz, etc.

Hazzia,

Especially when you reuse each of those names for all the scopes you have

AnarchistArtificer,

I was learning python as a wee scientist in training, and my variables were beyond dreadful. I tried naming a list “list” and the interpreter told me I couldn’t, so I opted for “listy”. When I needed to name a new list but listy was taken, I’d often resort to “listyy”.

Scientists who work with computers without having much (if any) targeted training on how to code can write the most horrendous programs.

ObsidianNebula,

I have a somewhat related real world story. I had a client that was convinced that tons of people were going to decompile their application and sell their own version of the program, so they insisted that they needed their code obfuscated to protect company secrets and make it harder to reverse engineer. I tried explaining to them that obfuscation wasn’t that big of a deterrent to someone attempting to steal code through reverse engineering and that it would likely cause some issues with debugging, but they were certain they needed it. Sure enough, they then had a real user run into an issue and were surprised to find that their custom logging system was close to useless because the application was outputting random obfuscated letters instead of function and variable names. We did have mapping files, but it took a lot of time to map each log message to make it readable enough to try to understand the user’s issue.

Johanno,

This is why you obfuscate after you code. Just obfuscate the release build. And logging may at that point be thrown out of the window anyway

ObsidianNebula, (edited )

It was obfuscated only in the release build. The issue is that they have a system to send certain logs to an API so they can refer to them if a user has an issue that needs further investigation. Unfortunately, their target audience is not very tech literate and have a hard time explaining how they got into a situation where they experienced a bug, so the remote logging was a way to allow us to try to retrace the user’s steps. Some of the logs that get sent to the API have JSON values converted from class data, will refer directly to class names, etc, and those logs had the obfuscated names.

Johanno,

Well then you are fucked.

The question is if nobody else has access to the logs, then obfuscation is stupid

RandomVideos,

Since a lot of the english words i know i learned from minecraft, in a farming simulator i named tilled soil"hoed"

I had multiple variables like int isHoed

velvetThunder,

There’s some hoed in this house If you see 'em, point 'em out

lars,

An important professor constantly and frustratingly said

we can call this variable whatever we want, so we’ll call it Fred

Made me panic and irate and focus on the wrong part of the problem. Every. Single. Time.

DarkSurferZA,

Gotten even easier after X became a registered trademark. Now the only choice we have left is i. Or ii if you need more variables

Cethin,

“j” is what you’re supposed to use if you need another index variable after using “i”.

Bougie_Birdie,
@Bougie_Birdie@lemmy.blahaj.zone avatar

Okay, say you’ve got four inner loops (a crime on its own, I know), do you use i, j, k, l or i, j, k, ii?

cbazero,

lIIl, IIIl, lIlI and IllI

DarkSurferZA,

This is the way

xlash123,
@xlash123@sh.itjust.works avatar

To the person who decided I and l should look the same in fonts, I wish you a pleasant eternity in hell.

lars,

Imagine if your username were iars. Awful.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • programmer_humor@programming.dev
  • DreamBathrooms
  • osvaldo12
  • everett
  • khanakhh
  • Youngstown
  • rosin
  • slotface
  • thenastyranch
  • mdbf
  • Durango
  • kavyap
  • tacticalgear
  • InstantRegret
  • magazineikmin
  • megavids
  • cubers
  • GTA5RPClips
  • cisconetworking
  • ngwrru68w68
  • ethstaker
  • normalnudes
  • vwfavf
  • modclub
  • tester
  • anitta
  • Leos
  • provamag3
  • JUstTest
  • All magazines