Hacker News new | past | comments | ask | show | jobs | submit login
Eloquent Javascript - free Online Book with a console to try the language. (eloquentjavascript.net)
121 points by cfontes on Nov 28, 2011 | hide | past | favorite | 29 comments



I just read the first couple of chapters and I find it a bit painful to be honest. I am not a CS grad and I don't write software as my primary job though I do write code to solve problems in my discipline. I have programmed C, Ruby and Obj-C a bit over the years and I find the pace of this book too slow and overly wordy. Yet, I think a beginner would find it quite hard going. Thinking back to when I was first learning, the first exercise (2.1) has too many traps to trip up an absolute beginner and you wouldn't write a true/false expression like that in practice. So, I'm not sure who the target audience is for this book. But, I'll have a read of it anyway because it's the nicest 'Learn Javascript' web resource I've seen so far. Picaxe is still probably the best introduction to a language I have read, gets right in there quickly with minimum fuss.


I agree. I appreciate good writing from programmers because at the very least, it helps pushback against the stereotype that programmers can't (or worse, shouldn't try) to write.

But long blocks of text are good for story-telling (well, narrative story-telling). The subject of programming and its syntax is more like that of a machine or process, and so eloquence in longform prose is not a strong teaching aid.

While the teaching and demonstration of programming needs better writers and speakers, that does not mean that it needs more straightforward prose. The lack of good prose can be a good thing, in cases where the density of text obscures the main, simple point (insert obligatory link to the work of Edward Tufte)


The first few chapters are very dry. When I recommend this to people I normally tell them to skim the first chapters and skip forward if they're getting bored. If you hold out to at least chapter 6, I'm sure you'll find something worthwhile.


I've never had a problem with a book moving too slowly -- after all, I can always skim or skip ahead. (This is far better than the reverse, where a book moves too quickly and is, as a result, impossible to follow. I've never actually encountered an example of the latter, but I'm sure they exist.)


The source for the book is on GitHub: https://github.com/marijnh/Eloquent-JavaScript

There is also a CoffeeScript "port" of the book, since Eloquent JavaScript is open content: http://autotelicum.github.com/Smooth-CoffeeScript/


Thanks for the info, I found it really clever to have a working console really nicely integrated within the HTML book text. I am a Java developer and scala student myself but my mission to 2012 is to learn javascript and I am enjoying this book very much.


If you prefer print, like me, No Starch Press published it earlier this year too. Just checked on Amazon and even Brendan Eich gave it a review(!) :-) It's probably the best overall introduction I've seen so far, although other books do go further into the details, naturally.


Are you talking about this review: http://www.amazon.com/review/R31YJRU8MO6FD4 ?

I was hoping for something longer...


I heard the print edition has less materials (having said that I haven't actually checked line by line to confirm).


The print edition doesn't include Chapter 7 ("Searching") from the web edition. (There may be parts of the other chapters missing, but I'm not sure.)

That said, Chapter 7 of the web edition begins this way:

> This chapter does not introduce any new JavaScript-specific concepts. Instead, we will go through the solution to two problems, discussing some interesting algorithms and techniques along the way. If this does not sound interesting to you, it is safe to skip to the next chapter.

So maybe the author or the publisher (or both?) decided that chapter was a distraction or somehow wrong for the printed version.


I just printed out a few chapters last week. Thanks for the info. I'll order it too, to support the author.


I bought this as an e-book a while ago - I had never spent very much time coding Javascript and I bought the book to brush up. Recommended. BTW, I spent the weekend working on a Clojure + Javascript + Noir app for a customer and I actually enjoyed the Javascript part :-)


Have you considered using ClojureScript, instead? I wonder how mature it is at the moment.


I have only played a bit with ClojureScript, not enough to have a real opinion. I think I will wait a while until it is in an API stable state and there are tools for auto building assets, etc.


I wonder if this was posted pointing to /chapter1.html just to circumvent the limitation that you can't repost old posts.

This was previously posted 681 days ago: http://news.ycombinator.com/item?id=1056132


No it was not, I simply didn't know nor tryed the principal page URL and wanted to point directly to the page were the console was... If Y combinator guys feels like, please remove the post and my points.


Very well done.

I read this book the week before I began a JavaScript class in college, and the first hundred pages alone were enough to get me through the course.


Great to hear. I'll be chipping away at this shortly. Thanks, Cieplak.


No, thank you for writing such a wonderful piece. I just glanced over the first few chapters for the first time in over a year and was delighted. I remember stepping through that bit of assembly in chapter one with a pen and paper, then running the two js versions of the code in my browser. Some commenters have criticized the prose of the book; for me this really helped contextualize certain things that seasoned programmers take for granted. I would argue that this is more approachable for a beginner than Ritchie & Kernighan's book or SICP. But I suppose those aren't necessarily beginner books. For some reason, I like your book quite a lot more than a few introductory Python books I've read. Although Ruby is far more beautiful and useful to me than JS these days, I think it is a very bad idea to force object orientation onto beginners. It is better to let people ask for it when they need it, than to force it onto beginners (I can't help but think of Yegge's Execution in the Kingdom of Nouns). Accordingly, I think JS is a very suitable learning language because it provides a taste of object-oriented and functional programming, while maintaining a familiar C style syntax. Also, it's very powerful for event oriented programming, as demonstrated by node.js. I stopped programming in js because of frustration for lack of lisp-style macros, but perhaps clojurescript can fix this.


A really great book.

And now you can Javascript in the browser itself!


For people that prefer to read french instead of english, this book has recently been translated over the course of a weekend by Mozilla volunteers and Framalang people : http://books.lifeleaks.com/eloquentjavascript/, https://github.com/Pandark/Eloquent-Javascript-translation


Anyone know if this has been published as an epub? Thats my preferred way to consume e-Books these days since I can share bookmarks between my iPhone and iPad using iBooks.


No Starch Press sells a DRM-free ePub version for $24: http://nostarch.com/ejs


Download the single html page, open it in calibre, and convert it to an epub. It worked best when I deleted the CSS file first.


Looks really interesting, will start reading this tonight.


Carl! weird that I saw you here. awesome book though, it will certainly help


Haha, crazy coincidence!!


I feel like the repeated usage of "print()" in the beginning is more confusing than helpful.


is the JS console custom-build, or from a library used elsewhere?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: