5 ms·
I fully agree, those books are awesome if you want to truly understand JS. I would, however, not say that understanding JS will help you become a better program
by davnn 10y ago
I fully agree, those books are awesome if you want to truly understand JS. I would, however, not say that understanding JS will help you become a better programmer and the time invested in fully understanding JS might be better invested somewhere else.
Some parts of "understanding JS" is just understanding a (insert your swearword) designed language, unfortunately. You might just not fully understand those parts and call them the bad parts. I can't stand not understanding, though.
- frik 10y agoThat's why I would recommend to read also "JavaScript: The Good Parts" (book, 2008) by Douglas Crockford. It covers (what is nowadays known as Javascript 1.5) and highlights the good parts of the language.
- kabes 10y agoActually, Simpson in his "you don't know JS" series of books makes a statement against "Javascript: the good parts". The main argument is that it's actually "Javascript: the easy parts". So crockford basically says "Just don't use the things most people find confusing when starting with JS". Instead, Simpson argues it's better to understand the language thoroughly so you can use all of its features to your advantage.
- davnn 10y agoI believe the truth lies somewhere in between. You will have a really rough time programming JS with the good parts only, but you will also have a rough time annoying your colleagues when you are the only one using "this" in a place where it's considered a bug by most people.
- LrnByTeach 10y ago@davnn you said it well. Most of the Javascript "Bad Reputation all these years" comes from the Language designed 20 years ago and did not change much mainly due to the fact that it is linked to ALL Browser vendor support at the SAME TIME ( to make any webpage JS to work). Assume a senario like where Ruby/Python could not change for last 20 years from their version 0.5 Now with ES6 and Babel Translator everybody can write ES6 code ( with out OLD JS BAD parts ) and enjoy JS as a true high level language like Ruby/Python . http://es6-features.org/#ClassInheritance http://es6-features.org/#ClassInheritance http://es6-features.org/#ClassInheritance http://es6-features.org/#ClassInheritance
- lacker 10y agoI think "JavaScript: The Good Parts" is outdated now, in particular the way it advocates handling object-oriented programming and inheritance with a "roll your own" method. It was great for its time, but especially with the advent of ES2015, modern JavaScript is going in a different direction.
- frik 10y agoMy point was, it's not outdated. Javascript 2016 just got new featured that oviously aren't covered. The class syntax is just a syntactic sugar and it's important to understand how it's working under the hood. JS has prototype based inheritance, which is more powerful and flexible than class based inheritance. JS is therefor different to grasp than Java and C#. There are still many coding JS and don't get it.
- cwarrior 10y agoI don't recommend using the class syntax and I would even advise to favour composition over inheritance.
- d13 10y agoSadly, I think JS is at its best with most of ES3, a little of ES5, and drop of ES6. There's still a tiny, good (Ok... adequate) language underneath all the cruft. But unfortunately there's a lot of extra unnecessary complexity in JS that makes it easy for us to write unneccesarily complex and unreliable code. And unfortunately, I think that because that complexity is there, programmers may feel they have to understand and use that complexity. Instead they should be actively preventing it from entering their brains and their codebase.
- amelius 10y agoEven if you do understand how things like prototypes work, you will also need to understand how efficiently a compiler can implement changes to them. And how consistent/predictable the resulting code will be in terms of speed.