JavaScript is not so bad, as everyone said

Eugene Obrezkov
Eugene Obrezkov
Published in
3 min readJan 3, 2017

A lot of times, I heard how developers from different companies, which are writing in Python, C++, Java and other programming languages are saying that JavaScript is crap. This bothered me for a while, so, at some point, I decided to write this article to share my thoughts with you about JavaScript and its bad and, maybe, good parts.

Bad vs. Good

Though, first of all, I would like to introduce myself a little, so you can make a decision, if it’s worth it to listen me or if I’m just another blind JavaScript evangelist that doesn’t know any other language (feel free to choose).

Bo-o-oring part of the article

If you’re following me up on a Medium, you should have noticed a few articles I wrote about NodeJS and its internals. If not, here are some of them: How does NodeJS work, how V8 optimizes JavaScript code, optimization tricks in V8 and tracing deoptimizations in NodeJS. Also, I’m the author of high performance renderer API for terminal (terminal-canvas). Based on terminal-canvas, I’ve created a presentation engine which allows to you create presentations via shapes\geometry\animations and show them right in your terminal — Kittik. I have 5+ years of experience with JavaScript and got through each of stages, starting from horrible code and finishing with elegant solutions.

JavaScript is easy to learn

Is that good or bad? Hm… in my opinion — both.

On one hand, you can make a working proof of a concept in a language that is easy to learn in few days. Though, it will be unmaintainable bulk of code in one single file, without tests, that will make your eyes bleed.

On the other hand, JavaScript is not as easy to learn as everyone thinks. A good knowledge of JavaScript can be achieved only after years of developing monstrous applications in different sectors and reading a lot of documentation\articles\references and specifications about JavaScript itself.

This problem with learning curve of JavaScript leads to another problem.

Anyone can write in JavaScript

But most of that code is terrible. I’ve seen a lot of projects, modules, front-end and back-end applications during my career. Almost all of them are written awfully. While looking at it, I felt a strong urge to go and break the arms of whomever was related to writing that code.

Trainee developers, juniors, students, which are only in the beginning of their career are choosing JavaScript as a main language for educational purposes. Or the company they started to work in chose the language for them. As a result, JavaScript becomes a language that anyone can pick up, but it will usually be inexperienced people.

That leads to another problem.

Most people associate JavaScript with these inexperienced people

And that’s why, in my humble opinion, everyone says that JavaScript is piece of shit. They never get to see the well-written JavaScript code. Same can be said about Python, C++ and any damn programming language. If code is written awfully, it’s not important which language was used — the code is awful, not the language itself.

Let me draw an analogy with another situation. Imagine, that you never written in Python, you don’t have experience with it. Also, you’ve never seen well-written Python code. So, you don’t have experience and enough knowledge to write a good maintainable code. You wrote some code, released some project, everything is working, you’re happy.

Now, I’m as a JavaScript developer, decided to switch to Python. And as a main point of my decision I decided to look into your code. Turns out that it’s awful. What is my thoughts? Is Python awful programming language? Is Python a piece of shit? Will it be better if I stay with JavaScript?

No! Python is not an awful programming language. JavaScript is not awful programming language.

Summary

I don’t have much else to say. I just had to get this off my chest. I’ve had enough discussions about JavaScript being terrible lately.

People keep talking about languages being bad, when they should really focus on the developers using those languages.

Be smarter, don’t judge by what you saw or heard. Judge by what you and others do. Thanks for reading!

Eugene Obrezkov, Senior JavaScript developer at Dev-Pro, Kharkov, Ukraine.

--

--

Eugene Obrezkov
Eugene Obrezkov

Software Engineer · elastic.io · JavaScript · DevOps · Developer Tools · SDKs · Compilers · Operating Systems