Aaron Hillegass’ new book, titled “Core Mac OS X and Unix Programming“, is now available in the stores. In the past, we reviewed his previous book “Cocoa Programming for MacOSX” and we got a good idea of Aaron’s elegant writing style, descriptive chapters and advanced development under Mac OS X. In this book, he goes down under, teaching us how to handle and develop for the underpinnings of OSX, the core of the OS.The book starts with a refreshment of your C knowledge and paces extremely fast on more advanced topics of the compiler and C, all in the first 4 chapters. This book is not intended for newbies, it is a book for people who are already developers and have a good gasp of C or ObjC programming and are already familiar with UNIX.
You will learn how to use the compiler from the command line, how libraries work internally and how they “fit” into the whole framework. One of the biggest chapters in the book is possibly Chapter 7, discussing “Memory”, a very important topic, and Aaron does a good job teaching us not just how to handle memory efficiently, but also how to avoid common traps.
The book starts getting more interesting after Chapter 10 in my opinion, where I/O, permissions and file systems are discussed. Networking programming with sockets was an okay topic, but I believe that it was a bit rushed. The book starts getting interesting again in Chapter 15 with the introduction of multiprocessing and later multithreading (also a chapter that could have more information into it). Rendezvous, Distributed Objects, performance tuning and keychain authorization conclude the book among other smaller chapters.
I believe that this book is a must-have for any serious and/or professional developer for the Mac OS X platform. In fact, it is the only book that I know that goes deep and digs up hard issues, real questions seeking real answers (e.g. multithreading).
Not everything is great though. The book has a lot of source code listed and less actual text explaining that code. This resulted to confusion sometimes and so I would have preffered a bit more verbosity among code listings.
One thing I would have liked to see was a chapter with a sample driver. A USB driver for something… like for a web cam or a printer/scanner. Or implementing a remote system like “Apple Remote Desktop” (which would still be of value as the free VNC is extremely slow). In fact, I still haven’t seen any OSX books discussing driver creation without just scratching the surface.
Another small nitpick would be the choice of CVS as the revision control tool of choice in this book (a whole chapter is devoted to its usage), while professional developers buying this book (or attending Aaron’s classes at Big Nerd Ranch) would most probably be using the much more powerful Perforce.
The retail price of the book is at $98 and I believe that it is a fair price. Luckily for you, Barnes and Nobles sells it for less than $80. As someone once put it, “the book’s price is more than 30 times smaller than Aaron’s classes“. I met Aaron in WWDC briefly this year and indeed seemed like a very nice guy, smiley and inviting, surely the kind of teacher you would want. However, if you can’t afford, his now famous, five-day classes, this book is your best alternative for some good and tried knowledge.
Overall: 8/10
is Scot Hacker up to anything writing-wise these days..?
I know C++, I have no interest in learning how to program in C (yes, it can be done, but I like objects). objective C AFAIK uses all of C’s syntax for the structured programming features and an object syntax that fits well withthe C syntax.
is this correct about ObjC or no?
I don’t exactly understand your question, but objective-c syntax looks more like smalltalk than it does c or c++.
For instance if you wanted to call a object method it would look like:
[obj methodParam1: 1 param2: @”This is a string”]
A lot of people (myself included like obj-c syntax better than c++.
but what about the structured aspect of their syntax? inside the object you need to use structured syntax for methods as you do for the code manipulating the objects. what is that like? I have been under the assumption that it is almost exactly like C.
90 bucks for a developers book!?!
Wow. I only paid $55 for ANSI Common Lisp, which seems like a far more specialized and, therefore, expensive topic.
Not saying it isn’t worth it. But still. Sticker shock.
The core of the OS is hosted in CVS at opendarwin.org, so it makes sense to discuss CVS if you’re going to be building upon anything in OS X that has an open source component.
You have to be realistic here. Hillegass writes these books also as a promoting way for his Big Nerd Ranch week-long classes. This is his main business. People who will buy this (expensive) book, are people who are most likely to attend his classes. These PRO developers want to learn about Mac OS X for their applications and products, they don’t care on hacking Darwin. Darwin hackers — except the Apple employees– are students and open source devs/enthusiasts, with most of the time no money for the $4000 classes that Aaron offers. Therefore, the main audience of this book, pro developers, are more likely to be using ClearCase or Perforce than CVS. And that was a miss in that book in my opinion too.
JonP, I can’t agree with you there. If they cover Perforce they had to cover other alternatives, for example clearcase as you mention, and absolutly cover CVS. CVS is to widespread to ignore. I also can’t agree that only “professionals” would buy this book.
Everyone can set up a CVS repository at home so it makes sense to use that as an example. If you are a professional then you surely know and probably already use a version control system and know what it is about.
I really can’t see any reason to include a chapter on using perforce or any other commercial system.
Not to mention that CVS is good enough for almost all projects out there. And, im not really sure about this, but is there really a perforce OSX server?
I seem to recall seeing something about C++ being included in the next update to the dev tools, XCode…yep, mentions C++ here:
http://developer.apple.com/tools/xcode/index.html
X Code…..hmmm…is that going to be free like the other dev tools?
also, doe coaca support C++ in this next iteration?
and what the heck is objective C++!!!
a) c++ began as c plus classes. One can write c code that is just a well organized, structured and encapsulated as c++. in the proper hands it can actually work more effectively. (perhaps you have heard of linux?)
b) if you only learn c++ you will be obsolete in the next 5-8 years; expand your mind to become a better programmer.
c) there is no such thing as objective c++
d) objective c is just that, c with objects. the objects you claim to love are there. see b).
C++ is supported of course, by the compiler (GCC) as is Objective-C++, which is exactly what it sounds like, a mix of C++ and Objective-C. This doesn’t mean that there are C++ interfaces to the Cocoa APIs.
For anyone interested in Objective-C as a programming language, a quick intro is here: http://www.geom.uiuc.edu/software/w3kit/overview/objective-c.html
As a matter of fact, there is Objective-C++ . It’s not a language : just a clever (?) hack to mix in the same .o ObjectiveC and C++. The ONLY interest (but hey, that’s quite useful) is to simply mix C++ and ObjectiveC code, so you could for example have a C++ backend and an ObjectiveC code for the gui. But if you start from scratch… well, ObjectiveC is so more clean 🙂
ObjectiveC++ is for example the thing which made possible WebCore, the Apple framework for HTML rendering based on KHTML, the KDE C++ HTML rendering engine.
it’s possible to use in a program C++ and Objective-C without ObjectiveC++, but they will then need to be in two separate objects files, and, it could be quite painful to communicate between them. ObjectiveC++ just made things easier.
umm… yeah… thanks for your….. comments.
a)I know, I just prefer C++ over C because I like what classes do… you can pretend you have classes in C but they are still functions and can be used by anything in the program though the programmer is pretending that you can not.
b) where did I say anything about other Languages? I was giving my reasons for not learning C. I know python, I am learning Java, I am interested in C# and I will eventually look at pearl, and that is a list of short term objectives.
c) well yes there is, as can be seen from the Xcode web page if you bother looking. I was asking what it was and have gotten satisfactory responses (thanks everyone.)
d) umm…yeah I know, in-fact I even said that. I was interested in the syntax used in class/object creation and calling.
here is a tip for the future…don’t be so presumptuous and try not to make assumptions.
It’s nice to see an actual technical discussion
Response to d)
An example of creating an image object:
//Objective C
NSImage *icon = [NSImage imageNamed:@”DefaultWorkoutIcon.tif”];
//Java
NSImage icon = new NSImage( “DefaultWorkouticon.tif”, false );
Then you can access the icon object instance methods like this:
// Objective-C
if ( [icon isFlipped] == true ) {
// do something..
}
// Java
if( icon.isFlipped() == true ) {
// do something..
}
Well dont know if this helped or just added some more confusion.
/D
hey, thanks…..wow…ObjC’s syntax is realy diffrent from Java/C++