Sep 26 2008
This post is the second in a series reviewing the book Cocoa Programming, by Aaron Hillegass. This part of the review is dedicated to a closer look at the code examples.
Starting from Chapter 2, the book dives into building relevant code examples. Working with Xcode and Interface Builder, you’ll quickly become familiar with the interface and interaction among both tools. There is even a short segue into the basics of debugging in Chapter 3.
There is a division of examples that are tied solely to one chapter, and those that extend over a range of chapters. I typically favor the former, short concise examples that are working pieces of code. With this approach, you can open the book to most any chapter and quickly grab what you need. Aaron does a nice job of using both approaches. Even when examples are used across multiple chapters, code is clearly managed/added in logical blocks, that make longer examples easier to follow.
You can download the code examples, and once unarchived you’ll find that each example is packaged as an Xcode project. This is really nice as all you have to do is double click the project file and you are good to go.
Unlike the XCode 3 Unleased book, in which examples were all shown in color (as were all figures), this book takes the more traditional approach, white pages, black text. To its credit, the code examples make good use of bold text to callout specific concepts and notes.
Overall, the code examples are quite helpful and do a good job of backing up the what the author is describing. You can download the source code for the examples here.
In the third and final post in this series, I wrap up with a quick review of highlights of the book as well as a few suggestions for improvements in the next edition.