Why do I HATE NodeJS?
Published: 2020-03-27 23:51:55

If you know me and ever debated languages with me, you know I boil Python alive in anger, but whenever NodeJS is mentioned I back off a little. NodeJS my VERY LEAST favorite Language, I hate it with a passion, but why. Now before we begin I don't mean "JavaScript" I mean NodeJS. While I know NodeJS is the desktop implementation of JavaScript, because it does add to the language itself in enough ways for me to not call it JavaScript. I wanted to mention this because most people get angry when I mention NodeJS as a language. Now you might have heard all these points already and are about to call me a rude name instead of just saying, idiot.

## The things I like about NodeJS
Since I am going to set NodeJS on fire in just a minute, I thought it would be fair for me to at least say nice things about it.
Speed: Its speed is so phenomenal, some human beings on the planet made a Linux OS with a NodeJS built desktop environment. While I hate NodeJS so badly Imma shout this point because it is speedy. And to the eXternOS people, good job, I didn't think it would happen. I feel like that idea is about as stupid as I am, I tried it and although it feels a tad slower than XFCE it is super speedy and amazing so you're alright. ![](https://i.imgflip.com/3bqoa3.png)

Other than speed, NodeJS is easy. Now I won't say too much else as it is self-explanatory but also creates a reason I hate it. However, it is a pro and I will explain more later.

Probably my favorite thing is how easily it connects to the internet. I used to develop, or well try to develop something called Vcord, a discord lib for the V programming language. NodeJS just has many tools and things I need built-in. Better than other languages. 

Lastly, what I love about NodeJS is that it is flexible. In my eyes, NodeJS is more flexible than Python. I have seen NodeJS be used everywhere. Servers, websites, desktop applications, terminal emulators, code editors (by both UI and CLI), and like I mentioned earlier a desktop environment for Linux. It is so flexible I keep NodeJS knowledge for refined-prototypes that I feel Python can't handle.

This all is great and sells NodeJS to a lot of people. My issue stands in the face of the people, and how pretty much how every good thing about NodeJS bites it in the butt.

## Why NodeJS Fails
Now amazingly, I didn't mention the good things first to be kind. The good things accidentally turn NodeJS into a horrible thing. I can't take people who say they develop with Node seriously because of what I like to call the Unity Theorem and to continue with the article we need to make clear what the Unity Theorem is.

## The Unity Theorem
Oxford defines a theorem as ***"a general proposition not self-evident but proved by a chain of reasoning; a truth established by means of accepted truths."*** and this definition is why it is named the Unity Theorem. If you can't quite understand what this means, don't worry I can make it English. In short, a theorem is ***"an idea that doesn't support itself, but is supported by other truths"***.

Now the Unity Theorem takes Unity, a video game engine, and explains why a tool is so hated. For those who don't know Unity is regarded as the *"Game engine for bad games"* and is usually used to attack the engine itself, and good developers who use the application. Now, why do people attack what might be the most revolutionary, high quality, easy to use engine? Because of its ability to be flexible, easy for beginners, and the quality leaving people to stay with the project and what they know instead of improving on their work and moving to what might be better for them.

In short, the Unity Theorem states: "A powerful, easy to use tool that anyone can use to produce quality items of a subject will lead to an excess of subjects with none of the quality the tool can provide."

## How this applies to NodeJS
Well, remember what I mentioned about NodeJS when we were talking about what I like. I enjoy using it and is super easy for me to do things in NodeJS compared to C, Java, and Crystal. Three languages I have also brought a lot into my life. However, the Unity Theorem and the rules it holds states a tool like this will lead to... well in unfancy terms, lots and lots of crap. There are some things I hate because of the tools they are with their quality. Let's take my favorite NodeJS tools, explain why they are good, and compare them to NodeJS tools I despise while explaining why they are bad. I will keep this to two examples, one good, one bad because it overall revolves the same idea to these two applications being good and bad.

## The good, the bad, the ugly.
The good here is Discord.js, a popular, although imperfect framework for Discord bot development. The bad here is a terrible UI development tool for desktop applications, Electron. Here the ugly is how these two compare.

### The GOOD
Discord.js is a pretty good tool, and most vulnerabilities found inside of it usually either will be fixed by the developers ASAP or mentioned to the NodeJS team. Of course two open-source software providers with a lot on their plate. Now every application has vulnerabilities at some point, so we can ignore them. As an actual tool, it is good in both practice and theory. The bots you can create with it for Discord often have higher quality than those made with other tools, at least ones made with good intentions, because Discord.js has the same issue as NodeJS in turn. However, everything works fantastically. it runs well and does the job it is supposed to do. It does what it needs without too much extra syntax, everything works as best as it can, and it is easy to set up, launch, and host.

### The BAD
Electron is the biggest mistake in programming history. It solves a problem that no real human has. It is a technological idea that doesn't add anything new, nor does it work half the darn time with any luck. Many programs that use Electron are bad unless on the off-chance they use the bad technology to make something good. Two examples of good and bad here are VSCode and Discord. VSCode makes uses the fact it uses Electron and NodeJS to its advantage. Extensions for syntax highlighting, JSON configurations, and in general putting that JavaScript to use. Yes, I know it is built with TypeScript but that's just a JavaScript extension, like how C++ is to C. But VSCode takes that JavaScript and uses it towards its advantage, and needs Electron to keep everything sane. Many applications do not do that, most notably Discord. Skype isn't a web-app. It is an app with a purposely built UI. Another chat service that is popular (and arguably is better in every way, even if it doesn't support voice chats yet) is Telegram, which it is programmed mostly in C++. It doesn't need to use Electron, it doesn't make use of electron, it doesn't benefit from Electron. VSCode's major issue is that it can be a little sloggy, but with even an idiot like me able to build extensions and themes, two things Discord does NOT support. "Oh but you mentioned the good of Discord.js, which connects to Discord..." yes but Discord.js doesn't even touch the UI of Discord, and if anything is very limited in what it can do for the app, only one server or DM at a time basis can a bot like this work. Discord and all the bot libraries for it are two different entities, even Discord being closed-source while most libraries being open-source. Discord is a terrible service, and the stuff it SHOULD be focusing on is getting away from NodeJS, at least on the front-end, where it hinders the most.

Anyways Discord tangent aside, Electron proves the worst in NodeJS, as it pretends to be the "end-all-be-all of developer friendliness for UI", and which is not the case. It is a solution to a non-problem. "Oh but there is a problem", no. Think of it like this. Here is a screenshot of my desktop right now. ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/titp9wyme4qr75831uwe.png).

Here is my desktop, if dev.to was an electron app. ![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/rkgdsc3gmxts7pudcvcu.png)

What does it solve? Nothing. Literally nothing. Projects like these are not few and far between either. As I said, many bad things build with Discord.js, a GOOD NodeJS tool. 

## Conclusion
In short, I hate NodeJS, not because it is bad, but because what people make of it is bad. I hope, if nothing else, this shows the point of the Unity Theorem, as it shows why I hate NodeJS and why I can't take JavaScript seriously. A sad happenstance of how anything easy and powerful are bad by default because of how people use them. I hope you learned something new, have fun, be safe, and do dumb things in a smart way.