6 ms·
Speaking JavaScript
- deleted 13y ago[deleted]
- teemo_cute 13y agoI agree. Kidding aside. I think Eloquent Javascript is better geared towards experienced programmers: http://eloquentjavascript.net/ http://eloquentjavascript.net/ Edit: It seems like the post I replied to was deleted, but my following statements still holds true.
- mathias 13y agoWhat did the original post say?
- teemo_cute 13y agoI didn't remember the exact wording, but he/she mentioned something in the lines of Javascript is better written than spoken.
- mathias 13y ago“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.)
- rauschma 13y agoIt’s certainly a good book. Can you explain why you think it’s better geared towards experienced programmers?
- teemo_cute 13y agoI 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.
- rauschma 13y agoNote 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. [1] http://speakingjs.com/es5/ch18.html#_array_indices_in_detail http://speakingjs.com/es5/ch18.html#_array_indices_in_detail [2] “Functional JavaScript” by Michael Fogus. http://shop.oreilly.com/product/0636920028857.do http://shop.oreilly.com/product/0636920028857.do
- mycroft-holmes 13y agoI 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.
- bgilroy26 13y agoHave you ever seen Underscore.js? It's a javascript toolkit for solving problems in a functional manner. If you are interested in learning more, the video below walks through examples. http://youtu.be/tbt36MvV6qQ http://youtu.be/tbt36MvV6qQ
- macco 13y agoReally, I think it is totally geared to beginners.
- czzarr 13y agoEloquent Javascript, while a very good book, is pretty old and really aimed at beginners.
- marijn 13y agoThe second edition is coming along: http://eloquentjavascript.net/2nd_edition/preview/ http://eloquentjavascript.net/2nd_edition/preview/
- Flimm 13y agoThis 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!
- rauschma 13y agoIt’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”. [1] https://developer.mozilla.org/en-US/ https://developer.mozilla.org/en-US/
- dragonwriter 13y agoThere'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.
- hawkharris 13y agoI never knew that NaN is not strictly equal to itself in JavaScript (so NaN === NaN => false). Very interesting.
- memming 13y agoI would be surprised if it were. All languages I know says NaN == NaN is false.
- deleted 13y ago[deleted]
- acjohnson55 13y agoThat's the canonical way to check for NaN, in fact.
- chewxy 13y agoNo. Use isNaN() instead. Or if you have ES6 support, Number.isNaN() is much better an implementation than window.isNaN()
- adamman 13y agoIt makes sense. Just because both things are not something does not mean they are the same.
- chewxy 13y agoThe reason is simple: "hello" is Not a Number. "world" is Not a Number. (Number)"hello" == (Number)"world" returns false. 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)
- dalore 13y agoif a !== a then a is NaN
- hoers 13y agoAnybody else getting 404s?
- petercooper 13y agoI 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 http://s3.amazonaws.com/speakingjs.com/es5/index.html and it seems to work, so might be a good temporary workaround.
- hoers 13y agothanks!
- caniscrator 13y ago'Eloquent Javascript' (http://eloquentjavascript.net/ http://eloquentjavascript.net/) and 'Learning JavaScript Design Patterns' (http://addyosmani.com/resources/essentialjsdesignpatterns/book/ http://addyosmani.com/resources/essentialjsdesignpatterns/bo...) are the best resources so far.
- ritchiea 13y agoI 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.
- caniscrator 13y agoYes about Javascript Ninja, you are quite right. No doubt, its one's best companion for getting firm grip on cross-browser compatibility issues.
- eddd 13y agoI 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.
- mathias 13y agoIf 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.
- chewxy 13y agoGive Underhanded JavaScript a try then. It teaches you how to be an arsehole JS developer :P - published today too (http://leanpub.com/underhandedjavascript/c/NackerHews http://leanpub.com/underhandedjavascript/c/NackerHews) 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: http://leanpub.com/underhandedjavascript/c/NackerHews http://leanpub.com/underhandedjavascript/c/NackerHews
- frozenport 13y agoThis book is too expensive. I would only buy it if I saw a physical copy and judged a few pages funny.
- ritchiea 13y agoAgreed. 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. 1. http://eloquentjavascript.net/ http://eloquentjavascript.net/
- gtirloni 13y agoIs it possible the author is getting more revenue from that little ad on the right side then from actual sales? Is it common for O'Reilly authors to release their books this way?
- rauschma 13y agoIt’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.
- ptwobrussell 13y agoI 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. [1] http://amzn.to/GPd59m http://amzn.to/GPd59m [2] https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Edition https://github.com/ptwobrussell/Mining-the-Social-Web-2nd-Ed... [3] http://miningthesocialweb.com/category/book-as-a-startup/ http://miningthesocialweb.com/category/book-as-a-startup/ [4] http://bit.ly/IW3cbc http://bit.ly/IW3cbc
- camus2 13y agoRecently found this : http://www.comp.nus.edu.sg/~cs1101s/sicp/ http://www.comp.nus.edu.sg/~cs1101s/sicp/ 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.
- draegtun 13y agoAlso 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/ http://interglacial.com/hoj/
- camus2 13y agothanks for the link.
- ciclista 13y agoSweet, looks like something fun to work with this weekend, thanks for sharing!
- enen 13y agoI 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.