HomeAbout MeProjectsContactMeow

Thoughts on Javascript

28 Sep 2018

Personally, I don't believe that JS is a bad language. It does what it was originally designed to perfectly - allow non-coders to script basic tasks on a website. There was no reason for it to be efficient, and so it isn't. However, the ways it is being used today is an abomination, and has ultimately been detrimental to the computing world.

Web Applications Suck

Why are web applications a thing? I don't understand. You could write the exact same software in something other than Javascript, and it would be so much faster. Google Docs is one of the worst offenders, in my opinion. It's just such a bad use of the technology. If you want to process a large spreadsheet without lag, you need a much beefier computer than you would with actual decent spreadsheet software. In many cases, a 386 with a handful of MBs of RAM can handle a large document better than Google Sheets on a modern PC. Libreoffice Calc takes 60MB of memory to look at an empty spreadsheet. So why does Google Docs need many hundreds of MBs to do the same thing?

Even outside of web applications, I see JS abused constantly. No website should need a huge amount of JS. Some is understandable - scripting some tasks, like the ability to invert the page colours, is benificial. But browsing the web should not use significant system resources! Does nobody remember a time when web browsing was considered the most basic thing you could do on a PC? Nowadays, you need a fairly powerful machine to do it! It's insane to me - especially for text based websites.

The Optionality of Javascript

I firmly believe that JS should be optional. If I want to turn it off on my browser, it shouldn't impede on my web browsing. Maybe I won't be able to do some basic tasks, but the content should still be there. As more and more websites convert to loading pages dynamically, that privilege is lost. Javascript is necessary to use the Internet. Page refreshes don't even do what I want half the time. Usually, web pages should be stateless. I shouldn't be sent back to the home page just because I decided to reload the content. But I see too many websites breaking this by having a single page where all content is loaded onto, depending on what is clicked.


My least favourite aspect of JS is Electron. If you are unaware, Electron is a framework that allows people to write desktop applications in HTML, CSS, and JS, by packaging the Chromium browser into the program. This is the worst development in the computing world, in my opinion. It is such an inefficient use of resources. At least with web applications, I can have multiple open in a single browser, allowing some resources to be pooled between them. I don't get any of that with Electron programs. That's why Slack, a messaging program that has no need for more than a few dozen MBs of RAM, instead uses a gigabyte on average. Many other programs are based on Electron. The waste of resources is insane to me. We had IRC in the late 80s. Computers could do it without breaking a sweat. So why, over 30 years later, does it take a significant amount of system resources to do the exact same thing?

Electron also presents another problem. The ease of use of JS causes many people to learn it who have no idea how to properly design a backend. Companies hire web developers to write their desktop applications because they're cheaper. As a result, we get software that looks nice, but is riddled with bugs on top of the bloat.

I mean, why? Why do I need to run an entire instance of a web browser just to be able to chat(Slack, Discord, Skype), edit some documents(Atom, VS Code), run a command(Hyper), or anything else? How does anybody benefit? If we could do something decades ago, why does it take thousands of times more resources today, without any noticeable improvement?

I don't want JS to die. I just want it to be used where it should be, rather than where it can be.