book

JavaScript: The Good Parts

As a result of the recent hubbub about web apps, I decided to get myself up to speed on JavaScript and CSS. Knowing Douglas Crockford's reputation as the JavaScript guru, I read his book, entitled JavaScript: The Good Parts.

It's a good book. The basic idea is that while JavaScript is actually a pretty cool little programming language, it has a lot of features that are best not used, and it has many outright flaws, so Crockford presents a recommended subset of the language.

The most valuable parts of the book are appendices A and B, entitled "Awful Parts" and "Bad Parts", respectively. These appendices list the gotchas of JavaScript and present rationale for leaving certain constructs out of the recommended subset.

My only gripe with the book is that, while it is presented as an introductory book, it seems to assume some previous knowledge and experience with JavaScript. I got a bit lost in some parts, particularly those regarding prototypes, the new keyword, and how this gets bound in various situations. (I was able to eventually figure these things out with a bit of Googling.) It also assumes some experience with functional programming, which is OK with me, but which will probably confuse a lot of introductory readers.

So, while I can enthusiastically recommend the book, I think I'd recommend it as a second JavaScript book.

Review: Core Animation for Mac OS X and the iPhone, by Bill Dudney

Either I’m stupid, or Apple’s developer documentation sucks. Whenever I try to enter a new area of Cocoa development, I am presented with simplistic tutorials and detailed reference information, with little in between to bridge the gap between newbie and expert. Often, the only way to learn an API is to hack on the example programs until enlightenment occurs, or do a lot of Googling.

This is exactly what happened with Core Animation. Most OS X developers don't need to know much about Core Animation, as it is a relatively new feature of OS X, and Mac users don't expect fancy animations in every application's UI. However, on iPhone, users do expect things to bounce and zip around the screen, so an iPhone developer really needs to know this stuff.

I started reading Apple’s Core Animation Programming Guide several times, and each time, I got lost in Chapter 2. Skipping forward to subsequent chapters didn't get me anywhere. I was presented with architectural diagrams and abstract discussions of geometry and transforms and layers and timing and so forth, but there was nothing concrete that I could grasp.

Bill Dudney’s Core Animation for Mac OS X and the iPhone filled in the gaps perfectly. It doesn't contain much information that is not in Apple's docs, but it presents it in a way that makes sense to me. Dudney leads you by the hand through actual working code that does cool stuff. After reading this book, I now understand what Apple was trying to tell me in the Core Animation Programming Guide.

I read the PDF-formatted version. I also tried reading the epub-formatted version using Stanza on the iPhone, but that didn't work so well: the diagrams and code examples aren't readable. So I recommend sticking to the PDF or paper formats.

My only gripe is that I'd like to see more iPhone-specific information. The majority of the book covers Core Animation on OS X, and then there is a single chapter at the end about the iPhone. I would prefer to have an iPhone-centric book with an oh-by-the-way-this-works-on-OS-X-too chapter. But that's a minor quibble; I think I understand the material well enough now that I can learn the iPhone-specific aspects of Core Animation on my own.

Syndicate content