- Paperback: 224 pages
- Publisher: No Starch Press; 1 edition (February 6, 2011)
- Language: English
- ISBN-10: 1593272820
- ISBN-13: 978-1593272821
- Product Dimensions: 7 x 0.8 x 9 inches
- Shipping Weight: 12.8 ounces
- Average Customer Review: 169 customer reviews
- Amazon Best Sellers Rank: #586,946 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Use the Amazon App to scan ISBNs and compare prices.
There is a newer edition of this item:
The Amazon Book Review
Author interviews, book reviews, editors picks, and more. Read it now
Customers who bought this item also bought
Customers who viewed this item also viewed
About the Author
Marijn Haverbeke is a programming language enthusiast and polyglot. He's worked his way from trivial BASIC games on the Commodore, through a C++ phase, to the present where he mostly hacks on database systems and web APIs in dynamic languages. He created and maintains several popular open source projects.
Top customer reviews
There was a problem filtering reviews right now. Please try again later.
No, the code examples are not superficial. It's similar to Zed Shaw's exercises in Learn Python the Hard Way - they are specially crafted to teach you something. You should type out the examples on your computer, write comments on what each line does, download the data files from the website, and get the examples to run.
The author put this quote in the introduction:
"I do not enlighten those who are not eager to learn, nor arouse those who are not anxious to give an explanation themselves. If I have presented one corner of the square and they cannot come back to me with the other three, I should not go over the points again." -Confucius
An example is functional programming. I never understood it or the hype. I read many articles and discussion forums, but I never really got it. In Chapter 5, Higher-Order Functions, the author doesn't even mention the buzz-words "functional programming". He simply starts off with the typical for-loop to print each item in an array. Then he shows how the for-loop can be enclosed in a function. Then he modifies the function so it can take in generic actions instead of just printing - a function that takes another function as input. For practice with functions on functions, you create a few more: filter, map, reduce... BAM! it all hits me. With the stuff I learnt in Chapter 3, I now know the benefits of no-side effects, limiting scope, recursion, and leaving the original data alone. I see why stringing small functions together allows more flexibility than a long recipe of for-loops. I see why functions allow you to follow the data being manipulated more clearly. I finally get it.
The funny thing is, the book isn't even that "deep". After all, it's actually a programming book where he walks you through code examples, not a conceptual computer science book. It's odd how concepts just come to you - that's how eloquent the book actually is.
One of the things that is confusing is certain keywords and concepts are not explicitly defined or explained, but are described and used in examples to demonstrate their purpose. A good example is the keyword 'this'. 'This' in JS is different from other programming languages and the value changes depending on the calling context (execution context) of 'this' in relation to its parent object. Confused? You are not the only one (and I don't have enough space to properly define 'this' here). The author does suggest a work around (var self=this), but 'this' serves as a foundation for other concepts (call, apply, & bind) and OOP, so knowing the keyword 'this' is essential.
Also, there are a few other things that are not adequately covered like prototypal inheritance (which JS uses), pseudo-classical inheritance ('syntactical sugar' in JS), and classical inheritance (not used in JS, but used in Java,C, etc) and some code examples stretches best practices. Some of the examples are challenging to follow, explanations might be sparse, there is an example that prints a table to the browser console instead of the webpage/DOM elements (maybe better thru the terminal?), and some examples have methods and functions in the constructor function, but maybe they should be in an instance method, in the prototype, or in a separate function (I'm kind of torn on this, there are good examples to see, but maybe not good examples to see FIRST when you are learning the language).
However, there are technical details sprinkled throughout the chapters that indicate a deep understanding of JS, and you would not readily get from reading the technical definition on Mozilla Developer Network (aka MDN Web Docs) or some of the discussion boards, and are a good for future reference.
Most recent customer reviews
Do all the exercises to get the most out of it!