Yet Another JavaScript Rant
January 3, 2014So I have recently given into the hype and I’ve begun playing around with JavaScript a bit more lately. And yes I know there are already many many rants about it if you look hard enough. So I obviously thought to add my thoughts to the opinion soup.
There are two main problems I have with JavaScript. My first beef is that JavaScript as a language is loose - very loose. As a consequence JavaScript does not promote writing clean and easy to read code. This is a very bad thing as programmers are generally very lazy and they often have tight deadlines to deal with too. This has lead to the re-emerging of age old discussions about how to maintain large code bases and avoid the tar pit. Various tools and libraries like promises or strict mode have improved things but I just can’t see the language’s essential problems being overcome.
JavaScript is still however, very good for smaller projects as it’s looseness allows for a lot room for kludging to help get things working. But now with the rise of technologies such as jQuery and Node.js in particular, JavaScript is now on a supersonic hype trajectory.
This segways nicely onto the second major problem I have with JavaScript. Given this explosion of JavaScript libraries and Node.js projects means there is a tendency for “one size fits all”-itis. Where JavaScript/Node.js are ham-fisted into projects - where they probably shouldn’t be - in the never ending quest of using the shiniest and newest technology that all the cool kids are doing.
This clearly not a case of using the right jobs for the tool and unfortunately it can be almost impossible to get your voice heard over the hype. One can only hope that as the JavaScript/Node.js ecosystem matures further that the design flaws are overcome and not exacerbated, lest we end up with a large and unwieldy hammer that only builds houses with upside down roofs.