I looked at it, and I was lucky enough to know the backstory, and get how amazingly brilliant at many levels that joke was! But then explaining the backstory took some time, and while we had a good laugh, I feel more people should know of it and join our joint laughing in appreciation of the author’s witty sense of humor! I also feel that for newcomers to tech culture (like Holberton School’s students), this joke gives an accurate understanding of some key pieces of that culture.
Have a look at it and read through the comments a bit. Still don’t get it? Ok, here’s some backstory you’re probably missing…
First things first: the unpopularity of npm
npm install name_of_the_software; it will be directly downloaded from npm. Even better: when you create an application or a library, you can create a
package.json file that lists all of the libraries it relies on; then when in that directory, you run
npm install, and all of those libraries will download from npm. Magic!
It sounds advanced, but every relevant programming language has a major “package and dependency manager” like that. Ruby has Bundler; Python has pip; for countries where it is relevant, PHP has Composer; etc…
Two major features you expect on those are speed and reliability; and the ire comes from how npm is disappointing in both those respects.
An execution of
npm install is so ridiculously slow that some people have gone ahead and developed plugin games that run when
npm install is running (like this awesome Space Invaders), and the npm service is known to be down every so often.
Getting kik’ed out
Two days ago, a developer by the name of Azer Koçulu published a Medium post titled “I’ve just liberated my modules” explaining that he was terminally mad at npm. He had over 250 libraries on npm, and one of them by name of “kik”. The Kik messaging app didn’t like that Azer was using their trademark, and asked him to give them the ownership of the library, but he wouldn’t. So they contacted npm, and npm transferred the ownership of kik, the library, to Kik, the company.
Azer was so mad at npm, that he decided to remove all of his 250+ libraries from npm in one instant.
Now that could have ended like that. But it didn’t.
The day the internet broke
And unfortunately, one of those libraries that got removed that day was “padLeft”, a very simple 11-line function to add some blank spaces in front of numbers in order to display them nicely, and it turns out that particular library was intensely being used. And not only by small projects, but also by very large projects like Babel. All of a sudden, the whole planet could not download libraries like Babel anymore, which broke a lot of installation and deploy scripts everywhere.
It definitely adds to the joke that such large and serious projects would depend on such unseriously small libraries, even though a more likely scenario is that they’re not depending on it directly, but rather using more useful libraries that, themselves, depend on this one. This stresses even more the issues with having unnecessary dependencies.
Now, the joke
It is at least double-funny:
- Not only does it emphasize that if the function fits in the 140 characters of a tweet, it probably should not have been a whole serious library in the first place, which pushes the button of the developers’ laziness for overusing it;
- But it also makes fun of npm, since Twitter is notoriously pretty fast and with a solid uptime. It hints that even though this is misusing the tool entirely, it’s worth taking those convoluted detours, because Twitter has more of the qualities one would expect from a package/dependency manager than npm does.
And obviously, a major feature of the joke is that this is hilariously over-engineered, considering that just copy-pasting that code into yours would simply have solved the issue in the first place.
There, now you get the joke!