Live data from Hacker News

Ask HN: Best current book to learn JavaScript?

news.ycombinator.com

81–90 of 99 posts

Re: Ask HN: Best current book to learn JavaScript?

#81
post #53

And anti-answer: consider learning JavaScript from something other than a book. The publication cycle for conventional box is relatively long, relative to the pace of technology evolution. By the time the author writes it, it's published, and you read it, the information can be dated, sometimes extremely so. There are gobs of online resources, and the best resource is rarely mentioned: reading other peoples code. Onc…

Which ones would you propose as "good-to-be-read" js projects?

Re: Ask HN: Best current book to learn JavaScript?

#82
post #53

And anti-answer: consider learning JavaScript from something other than a book. The publication cycle for conventional box is relatively long, relative to the pace of technology evolution. By the time the author writes it, it's published, and you read it, the information can be dated, sometimes extremely so. There are gobs of online resources, and the best resource is rarely mentioned: reading other peoples code. Onc…

[deleted]

Re: Ask HN: Best current book to learn JavaScript?

#83
My advice is, first make sure you are going to learn the latest version of javascript, which is "Ecmascript2016" alias ES7 alias ES2016. ES2015 (alias ES6) is also fine.

Previous versions of Javascript make JS a mediocre language, while ES2016 makes it a pretty good and powerful one. So try to look for a tutorial that is very recent and focused on the latest javascript idioms.

I think that if you already know how to program in at least one of the following languages: C++/C#/Java/Python, you will learn Javascript in no time, no need for a book, to be honest.

Javascript is a very simple language, my recommendation would be to start as follows: 1. First learn how to create a JSON (javascript object notation) object 2. Then understand how to define a function (better if you do it the ES6 way, that is, using the "=>" operator), and how to call it. 3. Learn how to use lists and hashtables(dictionaries). 4. After this, learn how to use JSON objects, that is, how to access each member of a JSON object. This will be trivial after step (3). 5. Then, learn the simple logic constructs: if, for, etc. They are easy, really.

Now comes the slightly more difficult part. I'm assuming you want to try Node.js development.

6. Learn what is the Node.js "event loop". IN other words, the philosophy behind Node and why most operations are "asynchronous" in Node.js. Learn about callbacks. 7. Now learn about "Promises" and learn how to use "async" and "await" to consume Promises easily. In other words, to program using asynchronous functions with no sweat. 8. Learn "express.js" web framework. It is really easy.

And don't forget to take a look to the ES6 and ES7 features and make sure you take advantage of them:

ES6 http://es6-features.org

ES7 https://h3manth.com/new/blog/2015/es7-features/

Re: Ask HN: Best current book to learn JavaScript?

#84
post #53

And anti-answer: consider learning JavaScript from something other than a book. The publication cycle for conventional box is relatively long, relative to the pace of technology evolution. By the time the author writes it, it's published, and you read it, the information can be dated, sometimes extremely so. There are gobs of online resources, and the best resource is rarely mentioned: reading other peoples code. Onc…

Agree with most of your answer but your last point is pretty optimistic. Nowadays most Javascript is a bundled package of 100 minified npm modules. Also there are many books online which don't need to go through the hoops you describe.

That's a problem specific to the Node.js NPM ecosystem.

However Javascript (in its current ES7 version) is a pretty good language.

Re: Ask HN: Best current book to learn JavaScript?

#85

Earlier quoted context omitted.

I'm learning Javascript. I can safely say im comfortable with most fundemental programming concepts...then the book starts talking about recursive functions. Suffice to say once I hit that section I went back to codeacademy finished the course (which never brought them up and I'm not sure if that's good or bad) now I'm back in Eloquent Javascript...it get's really hard really fast.

Not having any real experience with JS programming, is this talking about privately named functions (e.g. var MyFunction = function MyHiddenName (blah){}) or was this not being familiar with recursion? Or is there something else funky in JS that I just don't know about?

He's talking about recursion - a function calling itself. I find it's funny that factorials are understood easily in high school, but then recursion is mind blowing in front of a computer. Just like factorials, it can be understood best by walking through it with paper and pencil.

The examples in Eloquent Javascript need to be studied by the reader to get the most out of that book. I think people just glance at them with out typing them up and running them.

Re: Ask HN: Best current book to learn JavaScript?

#86
post #2

You don't know JS is a good book to start with and explains ES6 too. It is available for free on github so you can evaluate before buying. https://github.com/getify/You-Dont-Know-JS

I love books in markdown. I can read it with emacs, and automatically ferry the code snippets to a javascript buffer.

I wish more authors would publish the markdown or asciidoc. I'd pay for it.

Re: Ask HN: Best current book to learn JavaScript?

#87
post #6

https://github.com/MostlyAdequate/mostly-adequate-guide

This book is FANTASTIC to understand functors & monads. Not sure it is a good resource to learn the Javascript language. (but if you are beyond the beginner level, I highly recommend it, it really rocks!)

Re: Ask HN: Best current book to learn JavaScript?

#88
Yet another option, if you are experienced with other languages and want to learn JS: Javascript Enlightenment [1].

It only focuses on the concepts that make Javascript different from (let's say) Java.

Note: this is a pre-ES6 book.

[1]: http://www.javascriptenlightenment.com/JavaScript_Enlightenm...

Re: Ask HN: Best current book to learn JavaScript?

#90
post #53

And anti-answer: consider learning JavaScript from something other than a book. The publication cycle for conventional box is relatively long, relative to the pace of technology evolution. By the time the author writes it, it's published, and you read it, the information can be dated, sometimes extremely so. There are gobs of online resources, and the best resource is rarely mentioned: reading other peoples code. Onc…

I generally agree with this. When it comes to languages and implementations it's often better to just learn by doing/hopping around little blogs and documentation here and there. As you said, technology evolves too quickly for authors to keep up. That being said, there are some pretty fundamental abstract concepts behind all forms of programming that have stuck around for a long time: those old comp sci course materi…

Not to be snarky, but JS has more bad examples of these concepts than one can count....

Having said that it is a good idea to learn about these early and keep them in mind. Sadly there isn't a good definitive list of JS' idiosyncrasy that I know of.

Post reply on HN