Everything is from an imported library
- 0 Posts
- 4 Comments
Joined 1 month ago
Cake day: October 16th, 2026
You are not logged in. If you use a Fediverse account that is able to follow users, you can follow this user.
aldhissla@beehaw.orgto
Programmer Humor@programming.dev•Anon died on the "clang format bad" hill
2·22 days agoTS dev here. Yep.
There’s worse, but not by much. Looking at you, PHP
Hehehe, ok.
Those
requirelines 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 callednumber-zero(not a real library btw, just a joke), and assigns its value (assumed to be the constant0) to the variable. Later in line 19,zerois read.The joke is that you wouldn’t even write line 2 and use a simple
0instead ofzeroin line 19. The code is full of unnecessary imports of basic language components.