this post was submitted on 16 May 2025
716 points (99.3% liked)

Programmer Humor

24287 readers
670 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 99 points 1 month ago (1 children)

The joke is always Javascript

[–] [email protected] 65 points 1 month ago (7 children)

JavaScript itself is fine. The problem is developers who import a library to add two numbers.

[–] [email protected] 50 points 1 month ago (2 children)

Excuse me, but it’s industry practice to always use PlusJs.

Its just annoying that it has its own dependency on MinusJs.

[–] [email protected] 4 points 1 month ago

And MinusJs depends on AngularJs and VueJs for some reason, but that's just the cost of doing business!

[–] [email protected] 34 points 1 month ago (2 children)

Maybe we wouldn't need external libraries to do basic things if JavaScript had a standard library

[–] [email protected] 9 points 1 month ago

What is this crazy talk??

[–] [email protected] 6 points 1 month ago (1 children)

The thing you want from jQuery was added to all browsers in 2018.

[–] [email protected] 3 points 1 month ago (2 children)

I'm currently on a crusade against lodash where I work.

load more comments (2 replies)
[–] [email protected] 24 points 1 month ago (5 children)

I don't know about "fine". It has a lot of weird stuff baked in. Hoisting. Unexpected type coercion. Too many ways to loop over something and I always forget which one is which. "There's more than one way to do it" is kind of a recurring problem, come to think of it. Several function declaration syntaxes. Dot notation AND bracket notation for objects.

Also it will forever bother me that object keys aren't quoted.

const foo = "hello"; const bar = { foo: "world" }

That should be, in my mind, { "hello": "world" } . It's not. It's { "foo": "world" }

But if you want to do that, you need to do const bar = { [foo]: world }. Which looks like your key is an array with one entry, a string with a value of "foo"

You also end up learning a whole framework, with its syntax and idioms, every couple years. Angular. React. Redux. Whatever.

There's also a lot of people who have never used anything else, and want to use javascript for everything.

Javascript is basically D&D. Wildly popular. Full of legacy jank. People try to use it for anything even though there are better or more specialized tools.

[–] [email protected] 3 points 1 month ago (2 children)

After reading the JS Bible and listening to a lot of Kyle Simpson, I don't find any of those unusual or unexpected, but rather neat in the context of the language. And with enough practice, even the implicit return of an arrow functions jumps out at you.

load more comments (2 replies)
load more comments (3 replies)
[–] [email protected] 12 points 1 month ago (1 children)

Use the modulo operator? Nah. Need to import the isEven library and a ton of other unnecessary sub-50 LOC libraries "maintained" by a single dev to make their CV look more impressive. /s

[–] [email protected] 9 points 1 month ago (3 children)

Oh Hells no.

JavaScript is NOT fine, it's .... I'm really trying to think of a word that will convey the shit that it is without triggering half the people on Lemmy into an aneurysm, but I can't find it.

JavaScript is by far the worst. I've been working with JavaScript for the past 6 days and I want to hang myself, it'd be a better fate than continuing

[–] [email protected] 6 points 1 month ago

6 Whole Days!

Try 25 years. And it still surprises me.

[–] [email protected] 4 points 1 month ago

Yeah, I had some webpages archived and tried to use javascript to clean them up, but I ended up parsing it as xml through Powershell instead. I've done something with Python and BeautifulSoup too, a long time ago. Both much easier than JS, but somehow JS is designed to work with web pages? Make it make sense.

[–] [email protected] 3 points 1 month ago (1 children)

JavaScript is by far the worst.

PHP

[–] [email protected] 2 points 3 weeks ago

PHP was shit 25 years ago (like everything else back then) and I never bothered to look at it ever again but to this day I keep shitting on it because reasons

You

[–] [email protected] 6 points 1 month ago

Or ship a browser to run a script.

[–] [email protected] 4 points 1 month ago (2 children)
[–] [email protected] 2 points 1 month ago (1 children)

It’s false. Different memory addresses, etc.

[–] [email protected] 1 points 1 month ago

Like I didn't know 😂

[–] [email protected] 1 points 3 weeks ago (1 children)

JavaScript sucks but I'll give it this one

Arrays are complex structures with multiple values. Just because one looks like the other doesn't make them the same object. It's like taking two new objects form the same class, they look the same but work independently from eachother. I can add a value to one and the other would be unaffected, they'd both still be the same class

[–] [email protected] 1 points 3 weeks ago* (last edited 3 weeks ago) (1 children)

And I can't take this one. I did not ask if an object referenced by a is the same object referenced by b, I asked if two empty collections of values are equal. And an empty bag can easily be substituted by another empty bag, there is no class/instance tricky business here. And the fact that in JS arrays are objects is again JS-specific insanity. Still I thank you for sharing your thoughts

[–] [email protected] 2 points 3 weeks ago (1 children)

Well it's what you'd want but not what it does, for one, but for another: comparing scalars is very easy, comparing complex structures is not. To compare one array with another you'd need to iterate over each element, recursively.

That JavaScript handles arrays as objects is also not bad, that's just a language feature that you may like or not, not much can go wrong there. The reassignment of "this" or how JS handlesnumber comparison, yeah, that is infuriatingly bad

[–] [email protected] 1 points 3 weeks ago* (last edited 3 weeks ago)

Yeah. JS is okay with lots of funny (and not fun) type coercions (toString on everything? really?), has no notion of reference as data type, but somehow automatic iteration on array by "==" operator is too much

You are right, that's not want I would want from it, it is bad, I will never like that. And you are also right there are things even worse than this, no question there

Edit: "implementing iteration on == would have been too much" is an invalid argument, if anyone had doubts

[–] [email protected] 77 points 1 month ago* (last edited 1 month ago) (2 children)

> want to compile 50kb C++ console app on windows

> 6 GB MSVC installation

[–] [email protected] 30 points 1 month ago* (last edited 1 month ago) (1 children)

"It's so easy to compile C/C++ apps on Linux"

"Just run make install"

"If it doesn't work, fuck you, it worked on my machine"

Anti Commercial-AI license

[–] [email protected] 38 points 1 month ago (1 children)

Hm. I've always found it harder to compile stuff on Windows.

[–] [email protected] 18 points 1 month ago (3 children)

Oh, my comment was more that compiling C/C++ apps on any platform is shit. Windows may be the worst to compile on, but Linux is only marginally better.

Rust is amazing though.

Anti Commercial-AI license

[–] [email protected] 17 points 1 month ago

compiling C/C++ apps on any platform is shit

I'm starting to think the platforms aren't the problem.

[–] [email protected] 6 points 1 month ago

Okay that's fair. I fricked around with some C++ numerics BLAS header library (I think it was Eigen) on Linux before that was complicated and annoying too. The ARM Fast Models simulator was also a pain. Maybe I just don't like C++ development now that I think about it.

C mostly worked okay for me though.

[–] [email protected] 2 points 1 month ago (2 children)

Gentoo is the best platform for this.

load more comments (2 replies)
[–] [email protected] 12 points 1 month ago

I keep seeing complaints from non JavaScript developers about their IDE not handling millions of files in a folder properly

[–] [email protected] 33 points 1 month ago (1 children)

Depending on the design of its memory, a device with a full drive will literally weigh slightly more or slightly less than one with an empty drive. Charging the battery in all cases causes it to weigh more.

[–] [email protected] 15 points 1 month ago (1 children)
[–] [email protected] 31 points 1 month ago (2 children)
[–] [email protected] 7 points 1 month ago

Is it even plugged in? I don't see a wire.

[–] [email protected] 6 points 1 month ago

How did you get permission from the elders to take a picture of it?

[–] [email protected] 31 points 1 month ago (1 children)

Then marketing comes around, asks to add google tag manager, and proceeds to make the client download 10TB of tracking librairies.

At least node_modules don't directly impact the browser.

[–] [email protected] 12 points 1 month ago (1 children)

The tag manager ones always have console errors too lol

[–] [email protected] 7 points 1 month ago

Even if you rawdog the internet with no ad blocker. Actually, especially if you do that.

[–] [email protected] 15 points 1 month ago

lol at 3/4 of a megabyte of Vue components being ok and thinking node_modules is the issue at hand.

[–] [email protected] 4 points 1 month ago (1 children)

A package manager that does hard-linking helps.

[–] [email protected] 3 points 1 month ago

I feel like every time I've suggested pnpm I got eyerolls :(

load more comments
view more: next ›