234
you are viewing a single comment's thread
view the rest of the comments
[-] 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.

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