by thesuperbigfrog · 5y ago · 0 comments
'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.
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.
Unfortunately it seems like JS developers will likely never know this joy.
This post isn't about JS; making another one using examples from SQL won't increase understanding.
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.