Rob's Reviews > JavaScript: The Good Parts

JavaScript by Douglas Crockford

by
156533
's review
Apr 04, 10

bookshelves: technical, own, 2008, on-going, javascript, always-on-my-desk, 2010
Recommended to Rob by: Jonathan Phillips
Recommended for: intermediate-level JavaScript nerds looking to learn the "A" game
Read from April 01 to 04, 2010, read count: 3

"There is danger and misery at the edges."

As the title implies, Douglas Crockford takes a subset of JavaScript, identifies it as "the good parts" and proceeds to explain why these parts are good (and should therefore be used). Crockford commends JavaScript for being a very expressive language but is also honest about the failings of individual parts (e.g., how arrays aren't really arrays but are in fact "array-like objects") and proposes some genuine solutions for them that do not involve abandoning the language all together[†:].

Crockford gives a good overview of JavaScript's grammar without attempting to be exhaustive. He assumes that you are already at least familiar with JavaScript (which is why you would be interested in knowing "just the good parts", presumably) and there is an underlying assumption that you have experience with at least one other language (probably a "C-like" language).

Crockford's is a short book. It's a bit terse at times but his examples are clear and he supplements these with railroad diagrams[‡:]. That terseness also translates more/less directly into density, like he's running 10:1 compression on his thoughts here. They require some unpacking and digestion.

Of particular note: Crockford dedicates the entire 9th chapter to code-writing style. Why? He argues that it is an essential skill, that good code-writing eliminates ambiguities (see also: Appendices A & B) and makes the code easier to read and therefore easier (and cheaper) to maintain overtime -- doubly so if that code's lifespan exceeds that of its original developer.

This book is a great one to keep next to David Flanagan's "el Rhino diablo". That said, I believe this one should be consulted first to confirm good function and good form before winding back onto something more encyclopedic.


---
† = Which is, of course, fortunate because you have no choice but to use JavaScript when creating applications for the web. (And don't give me that bullshit about using Flash because that's a very narrow view of the web.)

‡ = To be perfectly frank, the railroad diagrams are bewildering at first. If you have never seen them before, they provide a serious "WTF?" moment the first time. When I encountered the second set of railroad diagrams was when I knew that I was going to need to re-read the first quarter of the book just to be safe.

---
2010 UPDATE: 3rd read. Still good, still relevant. Definitely the kind of book you get a little more out of each time. (For one thing, I slightly flubbed the quote above about the arrays, but not so bad as to retract it.)

Sign into Goodreads to see if any of your friends have read JavaScript.
sign in »

Quotes Rob Liked

“We see a lot of feature-driven product design in which the cost of features is not properly accounted. Features can have a negative value to customers because they make the products more difficult to understand and use. We are finding that people like products that just work. It turns out that designs that just work are much harder to produce that designs that assemble long lists of features.”
Douglas Crockford, JavaScript: The Good Parts


Reading Progress

10/05/2008 page 15
9.8%
10/09/2008 page 28
18.3% "there's like 10:1 compression going on here w/ the text"
10/14/2008 page 26
16.99% "doubling back (and using something like 3 bookmarks)"
10/15/2008 page 30
19.61% "caught up and passed where I was before doubling back (but still going to rock 3 bookmarks)"
10/16/2008 page 36
23.53% "re-learning everything I know about functions"
10/17/2008 page 46
30.07% "thinking it's going to take a while (and some DOING) for all that to sink in"
10/17/2008 page 65
42.48% "definitely hitting the point where I'm going to need to start putting stuff into practice for it to stick"
10/21/2008 page 98
64.05% "next up? "Beautiful Features"!"
10/21/2008 page 115
75.16% "great quote about usability vs. features"
12/20/2008 page 58
37.91% "doubling back from read #2½; getting more out of it, but the urgency is also greater"
show 3 hidden updates…

Comments (showing 1-3 of 3) (3 new)

dateDown_arrow    newest »

Michael Check out the video also... it contains spoilers. ;)

http://video.yahoo.com/watch/630959/2...

-m



Michael RE: Functions

I think you'll find the js functions are very similar to those Lisp functions you wrote all those years ago. :)

-m



message 3: by Rob (new) - rated it 4 stars

Rob OMG I'm not even sure I remember HOW to write a LISP function...


back to top