234
top 33 comments
sorted by: hot top new old
[-] eah@programming.dev 9 points 2 days ago

Oh, I'd recognize those parenthesis anywhere. Any sufficiently complicated javascript program contains an ad hoc, informally-specified, bug-ridden, supply-chain-vulnerable, slow implementation of half of Common Lisp.

[-] bitjunkie@lemmy.world 36 points 3 days ago

Clearly written by some smug [insert language here] dev… Nobody actually working in the JS/TS ecosystem is using var in 2026.

[-] undree@lemmy.world 3 points 2 days ago

Also commonjs imports

[-] onlinepersona@programming.dev 6 points 2 days ago

Also known as functional programming.

[-] Jankatarch@lemmy.world 2 points 2 days ago* (last edited 2 days ago)

But aren't for-loops a crime against humanity in fp?

[-] BetterDev@programming.dev 3 points 2 days ago

Not if its treated as an endofunctor

[-] generic_computers@lemmy.zip 5 points 2 days ago

var and require()? What is this?

Come over to modern JavaScript or even Typescript, it's nice here.

[-] xangadix@lemmy.world 24 points 3 days ago

Is this functional programming?

[-] anewfox@lemmy.zip 1 points 2 days ago

it's a js dev that's discovered ramda but hasn't realized it yet

[-] Jankatarch@lemmy.world 5 points 2 days ago* (last edited 2 days ago)

Welcome back lisp.

[-] Enkrod@feddit.org 27 points 3 days ago

condition() is undefined, should be ifCondition()

[-] gegil@sopuli.xyz 22 points 3 days ago

There wouldnt be a ram crisis if nobody needed a 32 gigs of ram in their pc just to run a "hello world" web app.

[-] anewfox@lemmy.zip 3 points 2 days ago

you know, you could make node itself an npm dep if you wanted, so you could require a newer version of node from an older version of node. but then i dunno what you'd do besides invoke it from your node_modules directory.

maybe just try it on a private npm registry instead of the public one, lol

[-] Sanctus@anarchist.nexus 17 points 3 days ago

Yeah I write clean readable code, how could you tell?

[-] panda_abyss@lemmy.ca 15 points 3 days ago* (last edited 3 days ago)

And thus, js becomes lisp.

[-] jerkface@lemmy.ca 2 points 2 days ago* (last edited 2 days ago)

Those who fail to study Lisp are condemned to reinvent it, poorly.

[-] Sandbox@lemmy.zip 6 points 3 days ago

Coding noob here. What am I looking at? I want to laugh too. :(

[-] 42yeah@eviltoast.org 17 points 3 days ago

npm, or node js by extension, is famous (infamous?) for having a library for however simple something is to implement. For example a whole library to trim spaces of a string, but only for the left side. Here the joke takes it to the extreme and even import numbers, if conditions, etc., features that are already available in the core language, from external npm libraries, and use that to write a code snippet.

[-] BradleyUffner@lemmy.world 6 points 2 days ago

My favorite was IsEven. An entire library to tell you if a number is even. And then IsOdd, that does the opposite, which takes IsEven as a dependenxy.

[-] filcuk@feddit.uk 3 points 2 days ago

Only cowards use the NOT operator

[-] Sandbox@lemmy.zip 2 points 2 days ago

That's....amazing haha thank you for your reply!

[-] Tartas1995@discuss.tchncs.de 5 points 3 days ago

Bad JavaScript Code to make fun of npm.

But it is just bad code and consequently it weakens the critic that npm deserves.

[-] aldhissla@beehaw.org 4 points 3 days ago

Everything is from an imported library

[-] Sandbox@lemmy.zip 1 points 2 days ago

I for one support local libraries. They're an invaluable resource for the community and I support them 100%

[-] aldhissla@beehaw.org 1 points 1 day ago* (last edited 1 day ago)

Hehehe, ok.

Those require lines there, they're importing code written elsewhere. We call that code a library. Take the first one:

var zero = require("number-zero");

defines a variable called zero, imports a library called number-zero (not a real library btw, just a joke), and assigns its value (assumed to be the constant 0) to the variable. Later in line 19, zero is read.

The joke is that you wouldn't even write line 2 and use a simple 0 instead of zero in line 19. The code is full of unnecessary imports of basic language components.

[-] cows_are_underrated@feddit.org 3 points 2 days ago

The amount of closing braces in line 23 triggers my Lisp PTSD........

[-] brianpeiris@lemmy.ca 1 points 2 days ago

Poison the AI with this.

[-] anon_8675309@lemmy.world 1 points 2 days ago

Front end devs trying their best to out shit enterprise devs.

[-] flango@lemmy.eco.br 5 points 3 days ago

standard Javascript experience

[-] Tartas1995@discuss.tchncs.de 6 points 3 days ago

Only if you write bad js.

[-] anewfox@lemmy.zip 1 points 2 days ago* (last edited 2 days ago)

ehhh, if something like this passes review, start looking for a new job.

[-] Jakylla@jlai.lu 5 points 3 days ago

Satan is taking notes...

this post was submitted on 11 Nov 2026
234 points (98.3% liked)

Programmer Humor

34135 readers
1937 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 3 years ago
MODERATORS