NodeJS is a monstrosity
NodeJS is a monstrosity, a Mordor of architectural pitfalls, the plastic of programming languages — ubiquitous, toxic, and sadly here to stay.
Like plastic, it started off as useful and has now become ubiquitous & toxic.
- There is no arguing NodeJS lowers the barrier to entry for application development. However that’s where it should stay, an entry.
- The lower barrier gives the same set of people [from (1) ] a confidence that is misplaced at best and noxious at its worst.
- The ecosystem fosters a culture that everything is a “component”. Tell a NodeJS developer that what they are using is a “library” and they trot out their high horse, thumb their noses high in the air, and noisily claim that it is a component and not a library.
- The ecosystem is littered with bloat while claiming to reduce application bloat. For every line of app code, the bloat is 100s (if not 1000s ) of lines of bloated code. As a good friend tells me “You write more code to write less code”
- The ecosystem encourages ego-centric, lazy, and/or coddled programming. Point in case 2-line component/package called is-even which is a negation of and dependent on is-odd.
(5a) Ego-centric programming Both these packages are from the same author and he couldn’t even be bothered to combine it into a single packages. There are many more examples, but this is a case where one could claim “Hey, I have 2 packages with millions of downloads”.
(5b) Lazy programming: If one were to use is-even, there are 2 packages to be downloaded. It takes more energy to scoff at a 2 line package than to write an if !isOdd().
(5c) Coddled programming: Elizabeth Warrensque quote “Don’t write code, there’s a package for that”. The common rejoinder: If the parameter is not integer type, then is-odd/is-even package does the validation for you? So we have a need for the package. “Guess what, have a strongly typed language like Typescript” and then the community scoffs back: Typescript is for wimps
The irony is that ‘is-odd’ has around 500k downloads per week and ‘is-even’ has around 150k downloads per week. - When egos clash, the result is a broken internet; 17 lines of code broke the internet. pad-left https://kodfabrik.com/journal/i-ve-just-liberated-my-modules
- Anarchy in the ecosystem: https://snyk.io/blog/why-did-is-promise-happen-and-what-can-we-learn-from-it/
- Dependencies “Node dependencies are heavier than black holes” is a refrain that is not far off the mark. I have a server side API with about 15 endpoints. Total size of the code is 415k, but the dependencies downloaded are 400 MB in size. The app code is like Gru on the Grumobile. And then a React app which has a 1MB code size, and…… VOILA!!! The package download size is almost 1GB and about 900 packages. The ratio of code to package size 1:1024. The standard paradoxical rebuttal is “Write more code to write less”. HUH!! SpringFramework has been in existence longer than NodeJS, far superior in performance, and more sophisticated in terms of feature richness. The size is a measly 87MB (binary) and the source is 243 MB.
- Scale: If your application is CRUD heavy or CPU intensive, do not use NodeJS. Which means serious enterprise-grade software cannot be built with NodeJS