My little rant on Javascript

It seems that every developer has something bad to say about Javascript. Maybe it is because of its popularity now and how people love to show that popular things are dumb and we have all been fooled into liking them.

I think Javascript is great for many reasons, but I have to agree with some of the complaints. Expecially the maintainability issue. In my own personal experience one of the main aspects that adds to this issue is the lack of a compiler. Not that I want a compiler complaining about a bunch of stuff - ugh. But maybe that woud be good. Why? Well, because sometimes writing Javascript is tedious.

Writing Javascript is tedious.

↳ (Out of context quote used for click baits)

I think writing code in Javascript is fun, but testing your code once you have just finished writing it isn't. And with Javscript this process can be longer than it has to be. Take for example the difference between having a bug, something you didn't account for or misjudged, vs making a silly mistake - maybe a typo in a string. Bugs are annoying but fixing them feels good (maybe not good but you get the point), silly mistakes are just annoying. Fixing and catching them is boring.

Let's say you are a Javascript developer working either on a browser app or on a Nodejs program. You are tasked with adding a little feature that is relatively simple, simple enough that you can figure out everything that has to be written and changed pretty quickly. So you write the code and expect everything to work.

But then you do a quick test and you get an error. You fix it, it was just a typo uff. Then you test again and another typo humm this is getting annoying. And you test again and you are looping a string instead of an array arggghhhh another silly issue. And it goes on...

All of these errors seem pretty small and we expect developers to catch them before committing any work, but when you are writing code and you are tired (maybe it is close to 5pm on a long day), these issues become more frequent. Having to refresh the browser or restart Node and play with the application to test your new feature - only to learn you made a silly mistake and have to refresh/restart the app and go do the same process again - becomes exhaustive, a tedious routine of catching small issues that could have been caught by a compiler. Maybe I ought to try some of these Javascript transpilers and see if that mitigates this problem.