The left-pad case
“Getting tired of people hating npm and JavaScript. Some of those people even make a living through JavaScript.”
— Atanas Korchev (@korchev) March 24, 2016
I felt this was addressed to me, following a number of tweets and retweets. I'm too critic. Point taken. Luckily I don't blog often, otherwise this site would be full of rage and “everything sucks” posts.
I must say I initially sympathised with Azer when I've read his post on “liberating” his modules. I'm a programmer, I love open-source, and I would definitely hate it if somebody asked me to unpublish uglify-js just because. Heck, I've created this trend — I don't remember any packages with the “ify” suffix before Uglify.
This comment, however, woke me up to reality. I remembered the sheer number of issues that were filed overnight when I once accidentally published a broken version of UglifyJS. How would have people felt if the breakage would have been intentional?
Azer acted out of impulse, and that was childish, stupid and dangerous. Can you imagine how much of our infrastructure is in the hands of self-proclaimed “ninjas” and “rock star” kids who can easily break tons of projects out of impulse? And that with a 10 lines package. That sucks. And I'm critic, because I can't be otherwise.
Maybe something like this had to happen. I believe that, given the circumstances, NPM handled the issue in the best possible way (read their well-written story on the case). It's clear now that unpublishing should be disallowed, and they will do it.
But all this reinforced my belief that the less dependencies you have, the better your project is. Do not pull in a dependency unless it's doing something substantial that you couldn't easily do yourself. Do you add a dependency for a 1 line function? Your project sucks, or will very soon, depending on the mood of the one liner maintainer. Code reuse is good, but not when taken to the extreme.
Also see frameworks don't make sense.