There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

programmer_humor

This magazine is from a federated server and may be incomplete. Browse more on the original instance.

Piatro , in gut pull

I’ve been programming for too long, my brain just autocorrected the typo so initially didn’t get the joke…

cook_pass_babtridge , in gut pull

I typed “git pish” and now my keyboard is soaked

ZILtoid1991 OP ,

Be glad it was your keyboard getting it and not you…

victorz ,

My custom keyboard is freaking expensive – I’d throw myself in front of my piss to save my keyboard any day!

exanime , in The easiest problem

How dare you… <Eye squint>

Meuzzin , in Any Volunteers

My first thought was, “Have you talked to the Fallout modding community?” They’re huge masochists and love being shit on, even though they create such amazing things and deserve nothing but praise and monetary rewards…

Strawberry , in The easiest problem

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 OP ,

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…

PoolloverNathan ,

fia? fir? fib (part of fia)?

KillingTimeItself ,

exercise left up to the developer!

Daft_ish , in The easiest problem

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 , in The easiest problem

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

explodIng_lIme , in The easiest problem

for whatever in stuff:

Buddahriffic ,

for myList in myElement:

CandleTiger ,

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

JATtho , in The easiest problem

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 , in The easiest problem

No, that’s math.

gandalf_der_12te , in The easiest problem

How to write spaghetti code:

ZILtoid1991 , in The easiest problem

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

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 ,

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

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.

RandomVideos , in The easiest problem

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 , in The easiest problem

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 , in The easiest problem

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
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines