More than 2 years ago we reviewed the excellent “Core Mac OS X and Unix Programming” book. Now, a new edition has been released and it’s renamed to “Advanced Mac OS X Programming“. We take a quick look as to what has changed since the first edition.The book now features about 80 more pages of useful information about the internals of OSX 10.4. And to fit all the new information, the introduction to the C language has been (justifiably) removed altogether. This book is meant for advanced programmers, so that chapter was a bit of a waste of paper. Instead, the compiler section has gotten some extra love, and a lot of information about GCC 4, its switches and its new vectorization feature, FAT/Universal binaries through the command line and XCode, and 64bit compilation tips and tricks are included. This chapter alone is a great step forward for developers who want to create multi-architecture binaries, from plain PPC to x86 or the G5’s 64bit capabilities.
The chapter discussing libraries also got a refreshing up with info about ranlib and library optimizations, how to create your own frameworks, and how to debug them more efficiently, using several techniques. The networking bit has been updated too detailing more information about IPv6 and DNS.
A brand new chapter is about the port from FreeBSD of the Kernel Queues (kqueues) feature. This is a notification system where the kernel notifies services and applications of interesting events happening in the lower levels of the OS. Another brand new chapter includes the discussion of launchd and daemons and how to create your own services. In the last chapter, “Performance”, the authors discuss for the first time about CHUD, the Apple performance tools. The book offers a quick glimpse on how to make the most out of CHUD and they also discuss why developers must optimize their applications (the authors believe that overall raw speed does not evolve as fast as it used to in the past).
An important change from the first book is the demise of CVS and its replacement with Subversion. This is a good decision on the author’s part to discuss a newer, more modern source control system like Subversion, instead of the restrictive CVS.
Smaller changes, fixes and additions can be found at the rest of the chapters that involve multiprocessing, multithreading, memory, GDB debugging, exceptions, files and permissions, keychain and authorization, Bonjour, Directory Services…
Other than that, the book’s writing style has not changed significantly since the first edition. The style feels “serious” without getting annoying or boring though. It is easy to understand and the long listing of source code now has enough comments in it so everyone can follow it.
If I were to nit pick something though, that would be –again– the lack of a chapter that describes how to build a sample driver for OSX. Other than that, advanced programmers who need to port or write a Unix-based application or service for OSX, should definitely get “Advanced Mac OS X Programming” for is the most in-depth guide for the internals of Mac OS X.