Core Mac OS X and Unix Programming
[Please note: This article was originally published on sentientfood.com 3-Feb-2005.]
What do you do with a book that’s essentially a $65 (reduced from the almost $100 when first published) advertisement for a $3500 training class? You dive right in to see just how much information you can get out of it. The book promises much and covers numerous topics, from the C language to Unix memory management to Rendezvous-support in its 25 chapters. Does it deliver?
Short answer: Yes, with some minor issues.
You will not use ‘B’, excepting that you proceed immediately to ‘C’
The C language is familiar to many programmers who’ve been around for a while, but may only be an academic curiosity to the more recent comers to the field, given that Java and C++ (or even Perl or PHP) are more likely to be used these days. Because of that, there are some ‘gotchas’ that need to be understood in order to work at the C-language level in the Unix underneath Mac OS X. Dalrymple spends 53 pages on the fundamental interactions of C. Much of this is good information if you’re coming from a non-C background, though there are times when the information is a bit basic even from that perspective. These chapters are really meant to be skimmed (or to be a refresher) so this isn’t really a problem.
Command-line Blues
Once you get past Conversational C, the book moves north into more interesting territory for those foreign to the guts of Unix. This is where you start learning to take control of the environment, to be able to turn your source into an application and see the results. Developers spoiled on integrated development environments (IDEs) may be in for a shock when faced with command-line build configurations like:
cc -g -Wall -o preprocTest preprocTest.m
but the whys and wherefores are fairly well explained in the context of the projects that come with each chapter. Most people know how to make the compiler behave through the IDE; here you’ll learn what that translates to on the command line, including special pre-processor tricks, linking, and more. Later on, command-line debugging with gdb
is covered as well.
Past is prologue
Wrap up the rest of first 11 chapters with things like files (ignore at your own peril), memory management (this isn’t your father’s heap space) and libraries (plugins anyone?), and the stage is set for the real heavy learning. From this point on, you progress deeper into making a real Mac OS application, building on the “why” from the previous chapters, covering such topics as authorization, distributed objects, directory services, and multithreading. Performance tuning is even included, and rightfully, after all the major topics are broached.
A few blemishes
The book isn’t perfect; there are a handful of typos and misspellings. The organization of the chapters apparently reflects the chronology of the class topics on which the book is based, and as such, makes sense in the context of going through the material in a week’s time. It can, however, lead to some frustration if you put the book down and come back to it later, as would be typical of many of the target market programmers.
This certainly doesn’t prevent the book from being useful, nor does it hamper learning all that much, but there are some odd placements, such as covering CVS (source code control) all the way at the end in Chapter 24 or placing the debugging information between memory handling and exceptions. If you’re not already familiar with some of the topics and you don’t barrel right though, re-reading previous chapters might help cement understanding of some of the topics.
Each chapter includes challenge exercises and deeper info “for the curious”. The extra info is interesting for the geeks, but I was disappointed not to be able to find solutions to at least some of the challenges on the book’s otherwise thorough companion site: http://www.borkware.com/corebook. Learning by doing is the way to go, but readers who get stuck don’t have an easy cheat-sheet to figure out where they’re going wrong.
Wrap up
This book is expensive, but less so than when it was first released. Price is no reason to avoid the book, however. There’s a great deal of useful information in it, whether you’re coming from Classic Mac OS and want to understand Unix better or if you’re new the Mac OS development world and want a glimpse into what Mac OS X puts on top of the Darwin functionality.
Rating: Recommended
Administrivia
Title: “Core Mac OS X and Unix Programming”
ISBN: 0-9740785-0-6
Authors: Mark Dalrymple and Aaron Hillegass
Edition reviewed: 1
Printing reviewed: 1
Pages: 560
Price: $65 (US)
Buy from: http://www.atlasbooks.com/marktplc/00981.htm
Topic: Software Development
Background and Disclosures
Reviewer background: The author of the review has been programming in various languages since the early 1980’s on mid-range and microcomputer platforms, including traditional Mac OS toolbox, PowerPlant, standard C/C++, and more recently, web development. Additionally, the author has managed teams of developers using these technologies and many others.
Disclosure Statement: This reviewer is a long-time friend of Mark Dalrymple and has had previous business dealings with both Mark and Big Nerd Ranch. The review copy of the book was provided free of charge.
I found a great Unix tips article in the IBM website. Its a little old but I’m sure your readers will find it useful. Here’s the link http://www.ibm.com/developerworks/aix/library/au-badunixhabits.html