Hacker News new | ask | show | jobs
by thesuperbigfrog 1992 days ago
Since the focus of this article is Javascript they should have written:

'When explaining Javascript, we have to decide how to approach its shortcomings. There are mistakes in its design, and it has usability problems, and it is unreliable. How do we approach these and how much emphasis do we place on them?

One approach is: "Javascript has a lot of problems, but we'll show you how to avoid them." That can demotivate the learner: "Why am I learning Javascript if it has so many problems?"'

The answer is: "You need to know Javascript because it is the heart of web programming and one of the most widely-used programming languages in existence."

Javascript was designed and implemented in 10 days and became ubiquitous through the world wide web, despite its laughably bad flaws and shortcomings.

Gary Bernhardt's WAT talk shows just how non-sensical Javascript can be:

https://www.destroyallsoftware.com/talks/wat

I love you, Javascript, but it's Stockholm syndrome.

4 comments

They're the same Gary (I wrote this article).
There’s a Typescript joke in here about treating the author as an “any” and not realizing that it was actually a Gary Berndhart.
This is amusing. I see your affiliation through the faq page, but as far as I can tell there is no obvious affiliation displayed on each blog article.
`The Birth & Death of JavaScript` remains one of the all-time best tech talks out there. Just a few rungs below the Mother of All Demos. Thank you!
As a seasoned developer who was in early in JavaScript (writing a SPA framework before there were SPAs, creating complex CAD software in WebGL pre 1.0), I can say there are a lot of good, and some really really bad things about it.

As a former boot camp instructor, I can say there are many, many people who call it a first language, and a significant subset of these people that worship intricate knowledge of it's faults as if they were features.

I tried very hard while instructing JavaScript to understand why the faults were there and how to avoid them and why detailed knowledge was no longer relevant thanks to many smart people spending lots of energy to make them not matter any more, e.g.: q: "when should I use var?" a: "never, use let or const to avoid hoisting"

Unfortunately, I think one just has to learn a few more languages before they can take an objective view of their 1st.

I'm starting to think it's a blessing if your first language "dies." Anyone who truly tied their personal/professional identity to K&R C, Pascal, Smalltalk, CLisp, even today ObjC or Perl - will have long since retired in frustration. Distance brings clarity, and as much as I liked (and still like!) some of those languages it's very easy to see the unfortunate parts of them once you are working three, four, ten toolchains after out of necessity - and that brings more understanding how unfortunate your current tools also are.

Unfortunately it seems like JS developers will likely never know this joy.

A version of this article could be written for virtually every language and tool.
Yep. Originally I had a SQL example in there too, but it took a lot more setup to explain and would limit the post's audience.
Any prospects of it being unveiled in the future?
What would be the educational role of a list of even four unfortunate parts of SQL?

This post isn't about JS; making another one using examples from SQL won't increase understanding.

By making it generic, it can apply to any language. For example, someone writing a C++ book, or a Perl book could find this blog post useful. If the blog post was purely about Javascript it wouldn't be as clear that others could find it useful.

But yes, a good addition to the blog post might be to include some more stuff to motivate the learner why the topic is useful.