Tuesday, 16 September 2008, 19:11:53 EDT

Sometime in late 2005, or early 2006, I learned of a forthcoming book entitled Learn Objective-C on the Macintosh. Since I had desire to learn about this very topic I signed up to receive an email notification when the book was published. On July 26, 2006 I received that notification, and it has been sitting in my email inbox ever since. I never had the time to devote to the book while I was in school. Last Tuesday I purchased the eBook (just a PDF), and finished reading it this afternoon. This post is my review of the book.

First, the overall presentation of the book is well done. The eBook is colorful and has large, easy to read, text. Important points and side notes are broken out of the main text with in-lined blue boxes. The chapter openings are single column pages, and the chapter pages are two column. Each chapter is broken up into subtopics that make it easy to digest in small chunks. So the presentation gets a 5 out of 5 from me.

Second, the content. I think the book is well laid out, and does a good job covering the basics of the language. The book assumes a prior knowledge of C, but not any prior knowledge of Object Oriented Programming (OOP). Having taken two classes in C++ (an OOP language), I was already familiar with the concepts, but I found the discussion to be a welcome refresher and easy to understand. There are more in-depth discussions of OOP available, and the goal of the book is not to teach OOP. So I was pleased that the authors decided to give an overview of OOP instead of a full-blown discussion.

I feel like the book does a thorough job of covering the Objective-C language. Since Objective-C is a superset of C, and the authors assume the reader is already familiar with C, there really isn't that much to cover. Each chapter covers a single feature of Objective-C. Actually, there are a couple of chapters that cover the Macintosh development environment Xcode and common source code management. One important thing to note: this book is about Objective-C on Macintosh OS X. Therefore, the discussion of Objective-C, and the example code, revolves around the Cocoa API; specifically, it relies on the most basic parts of the FoundationKit. Altogether, I think the authors do an excellent job of teaching the Objective-C language while introducing the reader to development on OS X. I give the content of the book another 5 out of 5.

Third, I want to talk about some issues I have with the book. Namely the editing and lack of exercises. Most books such as this one give the reader some exercises to work on at the end of each chapter. These exercises let the reader think about what he has just read, and try to apply his new knowledge without just copying and pasting (i.e. retyping what is in the book and running it through the compiler). A perfect example is the K&R book. It isn't a textbook, but it could be used as one. Each section has a set of exercises to which there are no printed solutions. The reader has to understand the material to get it right. The compiler is his grader. Learn Objective-C on the Macintosh, on the other hand, has zero independent exercises. Granted, it is possible to come up with your own, but if you are just learning the language it's nicer to have some suggestions.

As for the editing, it could use a little work. There are several places where sentences don't quite make sense. It is clear that the author was typing one thing, and then changed his mind and typed another. But the worst error lies in the code snippets. There is a least one running example that has the same error every time it is printed. If the reader is not following along with the provided project files, or doesn't recognize the error, he could be very confused. For the most part the editing is fine, but the editing problems that are present are glaring.

One final note. This book was published in 2006, as I mentioned earlier, so it is a bit outdated in some parts. For one, Objective-C has been bumped up to version 2.0 which introduces garbage collection. This affects the boilerplate code generated by Xcode, and is not addressed in the book. There has also been some major changes to Xcode, specifically Interface Builder, which can be confusing when trying to follow along in the book.

Overall, I was pleased with the book and look forward to using the lessons learned in my next endeavor learning to write GUI Cocoa applications. Accounting for my issues with the book, which would be easily fixed with a new edition, I give Learn Objective-C on the Macintosh an 8 out of 10 (totaling the previous two high scores and subtracting two for my gripes).

Categories:

I sent in a bunch of corrections on that very first edition years ago and was told an updated one would be coming out very soon. This was back in February 2005 (!) and AFAIK they weren't done.

Posted by joecab on Saturday, 20 September 2008, 17:50:14 EDT.