Tuesday, October 2, 2012

Review: "Learning JavaScript Design Patterns" by Addy Osmani

Learning JavaScript Design Patterns
Since I started re-learning JavaScript after an absence of 7 or 8 years, I've found all sorts of great free resources online and purchased a ton of great books (JavaScript: The Good Parts, Maintainable JavaScript, Secrets of the JavaScript Ninjas (MEAP), JavaScript Web Applications, and Professional JavaScriptfor Web Developers); I've read two of them so far.  This new book, Learning JavaScript Patterns by Addy Osmani, was released both freely via Creative Commons on the internet and through O’Reilly, and I decided to add it to my stack.  (Full disclosure: I got the ebook for free from O’Reilly).

I found much of the book helpful, but it suffers from being uneven and unfocused.  There are 14 chapters in the book but 80% of the content is in chapters 9 through 13.  The first 8 chapters and introductory, repetitive, and short.  It would have been better to have a single 10 or 15 page introduction than eight 2 page chapters.  Even beginners could safely skip to chapter 9. 

Unlike other Pattern books that are systematically organized, it is hard to understand the structure of the book.  In the introductory chapters a table is given of the patterns described in the rest of the book, but it doesn't include page references.  Sometimes patterns are mentioned before they are actually described. The GOF patterns described rely, as you would expect, on Design Patterns by Gamma et al., but I don’t think the author described well how (or if) these patterns fit into JavaScript other than showing an implementation.  The chapter on User Interface patterns was good, heavily relies on Martin Fowler’s work, but seemed out of place where it was located.  The jQuery Plug-in Design Patterns chapter, was excellent and new, at least, to me.

The best chapter in the book is chapter 12, “Design Patterns in jQuery.”  It describes patterns by showing them in use in jQuery, and providing commentary on the actual source.  If the entire book had been organized like chapter 12, this would be a five star review.

One nice thing about the book is the many references included.  Almost everything was backed up by at least one, sometimes several, blog posts or articles by experts. 

The eBook originally had many errors in its diagrams, but O’Reilly has updated it recently, and most of the problems seem to be fixed.  I was disappointed with the kindle version which I read on my iPod; I had to switch to the PDF at times to understand the book.  Usually O’Reilly creates excellently formatted eBooks, so that was surprising.

There was a lot of good in this book, especially in the later chapters, but I would have a hard time recommending it for purchase, when the content is available online in a searchable form for free.

Product Information:

Monday, September 17, 2012

Review: “Getting Started with D3” by Mike Dewar

Getting Started with D3
D3 (Data-Driven Documents) is an interesting library for creating browser-based visualizations.  Unlike most JavaScript libraries I’ve looked at, D3 provides tools to declaratively transform data into graphics formats, rather than providing a pre-canned monolithic solution to various charting problems.  The successor of Protovis, D3 was specifically created to work with dynamic data. 

Its design is elegant and powerful, but it can be pretty daunting.  The website includes a large number of beautiful visualizations (which I definitely recommend checking out), some bare-bones API documentation, as well as links to introductions and talks.  Even so, it can be difficult to know where to begin to learn the library, and I was happy to see Dewar’s book devoted to it; I’ve been meaning to try out D3 for months but haven’t been able to work up the time or courage.

I like the book’s format: focused, concise.  With such a huge topic it would be possible to write a formidable, 600 page book that only a few people would actually read.  Especially with all the resources on the internet available, what readers like me need is a push in the right direction.   D3 relies on open-standards and modern web browsers, but the book doesn't waste time explaining JavaScript, CSS, or SVG.  There are recommended books in the preface, but nothing more.  D3 supports JSON, XML and CSV as data sources, but Dewar (wisely, I think) focused solely on just JSON.

The book is structured around a half-dozen visualization based upon NYC’s mass transit system, with each chapter describing the creation of increasingly complex output.  Even the most complex visualizations are not treated in a great deal of depth, however.  The source and input files are provided on the book’s website.  Unfortunately, there are no examples with dynamic content.   

The book might have needed closer editing.  I noticed a few mistakes in the code of the printed book, and at times the writing wasn’t very good, in the style of an informal blog post.  It would have been nice if the author had provided exercises.

I feel after reading the book that I know where to start with learning D3.  In short: if you need a quick start guide to D3, the book will probably be helpful.  If you're looking for something more from its 70 pages, you'll be disappointed.

(I read the kindle version, on my iPod, and the eBook conversion was excellent.)

Product Information:

Thursday, September 6, 2012


So I've been thinking about blogging again. In the past, my blogging endeavors have started strong, but lost steam, and mostly focused on things like Russian Literature. I'm going to try to take a more sustainable pace and also have multiple blogs for various topics. This first one will deal with Software Engineering, Development, etc. with a focus on learning. This will include book reviews, online content reviews, random technical opinions, and so on.

Professionally, I am a software developer with a background in Microsoft Technologies. For the past 6 years I've mostly focused on Windows Forms client server development in C#, but lately I've shifted focus towards the web. Since graduate school, I've had an on again off again interest in programming language theory and artificial intelligence. So, my topics of learning for this blog will include, but won't be limited to:

  • Functional Programming
  • The Microsoft Web stack, .NET, and C#
  • JavaScript and cognate subjects
  • Learning Programming Languages: particularly Python, Scala, and Clojure
  • Cloud-hosted web applications
  • Service Oriented Architecture
  • Massive Open Online Courses
  • Learning to Learn
That's a lot of subjects, so it'll be interesting to see how all this goes. I'll try to post approximately once per week.