I hate books with contents like: Variables and Assignment Values, Booleans, Numbers, Operators, Strings,Statements, Functios, Exception Handling, Strict Mode, Variable Scoping and losures, Objects and Constructors, Arrays etc... there are milions books like that. I require from book to introduce me into new language in a manner where i don't have to suffer due to going throught dry facts and definitions. Give me pure examples. I want to create something useful during lecture of book about programming.
The book is laid out by logical topics (on how to purposely write bad/underhanded code, followed by explanation on why/how they work) instead of keywords (such as IIFEs, automatic semicolon insertion, function calls etc)
disclaimer: I wrote it
EDIT: I skimmed through Speaking JavaScript. It's a bloody good book, much better than mine. You probably should read that
One more EDIT:
Since there was another thread which I gave a coupon for HNers, here's the link:
Agreed. Books that focus on teaching syntax and common use cases really fall flat for me. The best programming books teach you how to think in the syntax of the language. Eloquent Javascript [1] does a good job of that and is also free.
The best programming book at teaching a practical contemporary language in depth while teaching you to think with it is Metaprogramming Ruby. That's a great read for anyone considering writing a book to teach a programming language. And the best book I've ever read on thinking about programming comprehensively is SICP. Which again, I would recommend reading at least half of if you are going to write a book teaching a language.
Even though it is about Scheme, the insights in SICP are invaluable for JavaScript programmers (the way I explain and visualize closures and environments are inspired by it). It’s one of the best programming books I’ve ever read.
Give my book a chance, it is complementary to both SICP and Eloquent JavaScript.
Sorry I don't mean to be overly dismissive. I'm taking a look right now. I do like that you include history & background. Also I like the addition of a style guide and a separate section on tools like modules & package managers.
Hey, I stumbled across a post of the author of eloquentjavascript that he's crowdfunding second edition of the book. My question is - how current is the first edition? Is it suitable to teach me JS, considering it's quite old? I'm not a good programmer. I know a bit of python, mainly for statistical tasks and some automation/scraping.
It's a great intro to Javascript. It's not going to teach you the most current webdev libraries but if you start with a strong foundation in Javascript (which you will get from Eloquent Javascript) you should be fine applying your knowledge to using popular libraries.
Personally, I love learning from books like this one and consider tutorial-style books a complete waste of my time. It's a matter of learning style, and the differences are fairly well understood. Look up deductive vs inductive teaching.
Teachers try to use both methods, but book authors don't have to. Readers are free to learn from any book that suits them.
If you’d take the time to read the free online copy (which OP links to) you’d see that there are plenty of “pure examples” in the book. In fact, there’s a code example for every two paragraphs of text, or so.
I agree. I enjoy weird quirky books that actually have a narrative and you build projects and learn the syntax while you are doing more interesting stuff.
However, I've read many books with tables of contents that look like that, yet they were actually pleasant to read and much more interesting than their contents implied.
I hate books with contents like that too - I've read about those things many times already and unless the language I'm currently learning really does something interesting in one of those areas reading whole paragraphs of text on them is just a waste of time. I'm recently learning Forth, and I really do appreciate more detailed explanations, because holy cow, that's some really crazy shit going on :) However, for languages and technologies closer to mainstream - or just similar to what I already know - I use these web sites for an intro:
And then go straight to the most advanced books I can find. It saves me a lot of time and it's more fun than following yet another book structured in exactly the same way, with pages and pages of text about minor syntactical differences and rare interesting things buried deep inside the book.
I humbly disagree. Especially in the case of JavaScript it's a good idea to review JavaScript's specific perspective on functions and object but also variable scope. I personally found "JavaScript Enlightment" quite interesting in this respect.
Don’t judge a book by its TOC! I’d love to get your opinion once you have read or at least skimmed, say, chapter 1: http://speakingjs.com/es5/ch01.html
I second Eloquent Javascript. It's the book I recommend to JS beginners. Secrets of the Javascript Ninja by John Resig & Bear Bibealt is another good one once you get past the terrible title.
I will checkout Learning Javascript Design Patterns on your recommendation. I bookmarked that book a while ago but forgot to return and give it a read.
SICP in Javascript.While the coding style is a little bit old school this should be linked in every javascript book / blog about learning Javascript. This stuff is just awesome.
I would gladly pay 30 bucks for a revised paper back version.
Also see Higher-Order Javascript by Sean M. Burke which is a "JavaScriptish companion" to Mark-Jason Dominus's Higher-Order Perl book - http://interglacial.com/hoj/
I wonder if it's a good idea to read SICP for the first time in a... let's say a language that people have mixed feelings about rather than the original version of the book. I guess nothing wrong with learning Scheme but as a JavaScripter this looks too good.
This book deliberately omits talking about Javascript in the browser, but the only reason I want to study Javascript is for its use in a browser context!
It’s a matter of deliberate focus! If you are interested in browser stuff, you can either combine Speaking JS with the content on MDN [1] or buy a different book. I like the books by Nicholas Zakas and “JavaScript: The Definitive Guide”.
There's no shortage of books about JavaScript in a browser context. There's fewer books on JavaScript that don't fairly exclusively focus on that context.
EDIT: Another reason why this is the case is because IEEE mandates it to be. All numbers in JS are 64 bit floating point numbers. This allows for a crazy amount of NaNs (and oh the fun stuff you can do with that). To be sane, NaNs are not the same when comparing them (there is a lot more subtlety in that - comparing quiet and signalling NaNs, and so on and so forth)
It's actually part of some cryptic and ancient standard and is common for nearly all languages nowadays. I never cared about it very much, but here's the post on NaN semantics from someone who apparently designed the standard:
I strongly considered the approach of releasing the contents of my recent book online with Mining the Social Web 2E [1] but instead decided to pursue what I felt was a standard OSS model: release a really high quality version of the source code that's optimized for easy learning in IPython Notebook format (optionally packaged as a turn-key VM) on GitHub [2] with the book being a form of "premium support" for the codebase if people want to learn more or dig deeper. I touch on all of this somewhat in the book's blog's "book as a startup posts" [3], and it seems to be working well so far.
I'm increasingly becoming interested in the prospect of releasing the entire contents of the book (both prose and source code) in IPython Notebook format so that you could read and work in the book seamlessly as "executable paper" like this full-text sampler of Chapter 1 [4] if it were hosted on Wakarii or a similar platform that offers a free tier. It really seems to me that this is the future of tech books: learning platforms with prose and example code integrated seamlessly.
It’s an experiment of mine (but I am aware of at least one more O’Reilly book that has been published this way). I’m hoping that it’s win-win: The public version lets people share and link to what they have read (click on a title to create a link to it). And it allows them to figure out whether the book is for them. But I believe that it will also help sell books.
I previewed the table of contents of Speaking Javascript and it looks cool and comprehensive, but Eloquent Javscript discusses functional programming and only spends a little time on the bare basics.
I'm not saying that either book is better. In my opinion Eloquent is for more advanced folks, while Speaking might be geared towards beginning programmers.
I have to agree with this. I've worked with JavaScript in previous jobs but never took the time to really dig into the language and learn it in and out. I just applied my knowledge of other languages and looked things up when I needed to.
I'm working through Eloquent JavaScript (v1) right now and I'm on the chapter dealing with functional programming. Even with the programming classes I've taken in college, I'm finding this chapter to be much more difficult than any of the ones before it. Maybe it's uncommon, but I was never shown this type of programming ever before. Even though I'm progressing through it at a painstakingly slow pace, it's starting to make sense. But for someone who looked at EJS as their first programming book? I can understand why they may quit altogether.
Note that the basics only seem simple. Speaking JS covers them, but also (as optional reading) exposes many of the mechanisms behind them. For example: [1].
The book explains the complete language. I consider functional programming more of a (fascinating and important!) meta-topic; worthy even of dedicated books [2] and beyond the scope of Speaking JS.
“I didn't remember the exact wording, but he/she mentioned something in the lines of Javascript is better written than spoken.”
In that case, you’re gonna love this book. There’s a small code example for every two paragraphs or so, which really helps make things clear. (Disclaimer: I was a technical reviewer for this book.)
I saw some tweets yesterday from which I inferred there have been some DNS propagation issues. I notice the IP is an S3 one so I tried.. http://s3.amazonaws.com/speakingjs.com/es5/index.html and it seems to work, so might be a good temporary workaround.