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.

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.

gandalf_der_12te , in The easiest problem

How to write spaghetti code:

MonkderDritte , in The easiest problem

No, that’s math.

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…

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.

some_guy , in The easiest problem

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

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.

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!

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…

exanime , in The easiest problem

How dare you… <Eye squint>

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!

Piatro , in gut pull

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

lowleveldata , in gut pull

I accidentally typed “git gud” one time and Steam notified that I have completed all achievements of Dark Souls 1-3 at the same time (I don’t even own the games)

JackGreenEarth ,

That’s a joke, right?

RecluseRamble ,

Yes.

embed_me ,
@embed_me@programming.dev avatar

Thank you. Now I shall commence laughter.

penquin , in gut pull
@penquin@lemmy.kde.social avatar

I always type get and then very mad when the terminal/powershell tell me how high I am.

lemmyseizethemeans , (edited ) in gut pull

[Dvorak has ontered thu chat]

neidu2 ,

My unitiol thaeght as woll.

lemmyseizethemeans ,

Love it sa much but hha keyboard has e tendegy to not autacorrchh

neidu2 ,

Some

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines