699
Node Modules (lemmy.ml)
you are viewing a single comment's thread
view the rest of the comments
[-] Shawdow194@fedia.io 95 points 2 days ago

The joke is always Javascript

[-] Blue_Morpho@lemmy.world 63 points 2 days ago

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

[-] TheGalacticVoid@lemm.ee 34 points 1 day ago

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

[-] jaybone@lemmy.zip 9 points 1 day ago

What is this crazy talk??

[-] mindbleach@sh.itjust.works 5 points 1 day ago

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

[-] vithigar@lemmy.ca 2 points 1 day ago

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

[-] mindbleach@sh.itjust.works 1 points 23 hours ago

Lodash provides modular methods for working with arrays, objects, strings, and more.

I dunno. If it makes everything Array-like act like a goddamn Array, I'm tempted to start using it.

'What do you mean you can't .map a Set? It's iterable! Figure it out!'

[-] vithigar@lemmy.ca 2 points 21 hours ago

You can though? mySet.values().map(mappingFunc) will create a new iterator transformed by the mapping function.

[-] i_stole_ur_taco@lemmy.ca 48 points 2 days ago

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

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

[-] Artyom@lemm.ee 4 points 1 day ago

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

[-] jjjalljs@ttrpg.network 23 points 1 day ago

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.

[-] JordanZ@lemmy.world 4 points 1 day ago* (last edited 1 day ago)

This lightning talk is great for the oddness of JavaScript. He starts with Ruby but pretty quickly spends the rest of the time on JavaScript.

[-] SaharaMaleikuhm@feddit.org 1 points 1 day ago

No need to convince me it's shit. Also how do you end up only knowing Javascript? Who the hell starts out using Javascript of all the languages?

[-] jjjalljs@ttrpg.network 12 points 1 day ago

Anyone entering through web development. If you're self taught or did a "coding boot camp", it might be the only language you've used. A lot of places use it for backend stuff now, too

[-] marlowe221@lemmy.world 1 points 14 hours ago

I write back end JS, when I’m not writing back end C#.

It’s totally fine. In fact, Node makes it a great back end language. I find that the infamous quirks of JS fall into two categories - “common enough that you internalize the rules for them” and “edge cases that almost never come up in practice.”

And when you write back ends in JS… you aren’t on the endless new framework treadmill!

[-] Lemminary@lemmy.world 2 points 1 day ago

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.

[-] nickwitha_k@lemmy.sdf.org 12 points 1 day ago

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

[-] phoenixz@lemmy.ca 9 points 1 day ago

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

[-] Hoimo@ani.social 4 points 1 day 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.

[-] Aqarius@lemmy.world 2 points 1 day ago

JavaScript is by far the worst.

PHP

[-] aev_software@programming.dev 5 points 1 day ago

6 Whole Days!

Try 25 years. And it still surprises me.

[-] mindbleach@sh.itjust.works 6 points 1 day ago

Or ship a browser to run a script.

[-] Shanmugha@lemmy.world 4 points 1 day ago
[-] marlowe221@lemmy.world 2 points 14 hours ago

It’s false. Different memory addresses, etc.

[-] Shanmugha@lemmy.world 1 points 10 hours ago

Like I didn't know 😂

this post was submitted on 16 May 2025
699 points (99.2% liked)

Programmer Humor

23310 readers
2271 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