Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 520

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 535

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 542

Deprecated: Assigning the return value of new by reference is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 578

Deprecated: Function set_magic_quotes_runtime() is deprecated in /home/melaloui/public_html/ueckerman/wp-settings.php on line 18

Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1199

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1244

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1391

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/classes.php on line 1442

Strict Standards: Redefining already defined constructor for class wpdb in /home/melaloui/public_html/ueckerman/wp-includes/wp-db.php on line 306

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/melaloui/public_html/ueckerman/wp-includes/cache.php on line 431

Strict Standards: Declaration of Walker_Comment::start_lvl() should be compatible with Walker::start_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::end_lvl() should be compatible with Walker::end_lvl(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Declaration of Walker_Comment::end_el() should be compatible with Walker::end_el(&$output) in /home/melaloui/public_html/ueckerman/wp-includes/comment-template.php on line 1128

Strict Standards: Redefining already defined constructor for class WP_Dependencies in /home/melaloui/public_html/ueckerman/wp-includes/class.wp-dependencies.php on line 31

Strict Standards: Redefining already defined constructor for class WP_Http in /home/melaloui/public_html/ueckerman/wp-includes/http.php on line 61
ueckerman.net » JavaScript

Archive for the ‘JavaScript’ Category

Book Review: JavaScript: The Good Parts

{Tuesday, March 16th, 2010}

I had been looking forward to reading Doug Crockford’s book since I enjoyed his similarly titled presentation one year ago. I came across the presentation searching for a better way to develop JavaScript, a language I had considered terrible since I knew better. Of the languages I have used in web application development I assumed it encouraged the most obfuscated code of all. This book, I hoped, would be JavaScript’s redemption and would show me why the UI Freaks love the language. My intention in this blog is to review the book, briefly listing Pros and Cons and finally a summary and rating.

Pros

  • JavaScript as a functional language: While JavaScript’s syntax attempts to disguise the language as a conventional imperative language, Doug convinces that the language is functional at its core.
  • Extending the features of the language: While it’s fundamental features are limited, Doug explains how to extend those features to include constructs such a currying.
  • There are plenty of bad parts: Doug, while being involved in the language for sometime, is clearly impartial presenting more negative than positive parts. I’m grateful the appendices on the awful and bad parts are included - I found them particularly education and entertaining.

Cons

  • 100 pages = not many good parts?: While arguably a Pro, the length itself implies JavaScript doesn’t have many good parts.
  • Focus on JavaScript: 15% of the book focuses on Regular Expressions. One complex example is painfully analyzed over 5 pages. Nasty. Just refer me elsewhere to learn more already.
  • Unexplained complex examples: A chapter dedicated to standard methods available on Objects, Arrays and Functions presents hypothetical implementations that are not discussed. Either explain them or don’t include them at all - their too complex to be given the silent treatment. Don’t throw-in one page of continuous, unexplained script - any site can give me that experience for free just by looking at the source.
  • Presentation aimed at experts, book aimed at novices: The presentation was targeted to an expert audience - it’s a shame the book doesn’t follow suit. Initial chapters discuss the basic language syntax for those who’ve never seen it before.
  • Poorly factored code: The book talks about The Good Parts, but in the process why not show Some Good Code? Yet another author who discusses good coding form, and has even authored JSLint, yet publishes some shocking code. Worst case is one method spread over an entire page - unexplained to boot.
  • Filler content: You get the impression that the author has thrown in some content as filler - maybe it was a challenge to make 100 pages? The last two chapters are simply essays in general programming for the novice. Throw in detail on Regular Expressions, unexplained code examples and laborious syntax discussions and you get the impression the good parts can be covered in 30 pages. Maybe a whitepaper was a better alternative?
  • Stop mid-way: I’d argue you don’t need to go the distance on this one. The experienced JavaScript developer will get little from the final 4 chapters.

Summary

I am a better JavaScript developer because of this book, and that alone makes it worthy of a recommendation. For such a small book though, you’ll feel like you’re taking the long way to reach your destination. Overall 4.5/10.