Core Mac OS X and Unix Programming
If you've been learning Mac OS X Cocoa programming, you might already know Aaron Hillegass through his excellent book Cocoa Programming for Mac OS X, which was one of the first good introductory books on the topic, and is still one of the best available. Information about this earlier book can be found at bignerdranch.com/Book/. Both Aaron and Mark are instructors at the Big Nerd Ranch, which offers courses in Mac OS X programming. More information about them and the courses can be found at http://www.bignerdranch.com/Company/Who.html. This book is based on the course with the same name at the Big Nerd Ranch. The book's website and a link to order it online can be found at borkware.com/corebook/ . Discussion and further information for both books can be found at cocoadev.com/index.pl?CocoaBooks.
Audience and Writing Style This book is not an introduction to programming on OS X. It doesn't explicitly cover how to use Apple's Project Builder or Interface Builder, or much of the Cocoa or Carbon APIs, except during discussion of code examples. So if you're entirely new to programming or to using Mac OS X, start with a different book such as Hillegass' earlier Cocoa Programming for Mac OS X to get up to speed with using the development environment. This book will leave you behind at times if you are unfamiliar with using the command line, however, the examples are complete enough to follow along by just typing in what's in the book.Core Mac OS X and Unix Programming does have some very basic material in its first few chapters. They focus on the details of C programming, using the compiler, memory management, and debugging. These chapters will be mostly review for anyone who's developed in C on Unix before, but will be invaluable for programmers who learned to program using Java, for instance. They should also be required reading for programmers who started programming with Objective-C and Cocoa and are still unsure about using "plain" C. If you've ever complained about having to use a C API from CoreFoundation in your nice pure Cocoa application, don't avoid this book -- you need to read it even more.
The book is clearly written and easily understood. The writing is occasionally conversational, in keeping with its history as a course textbook. In the grand history of well-written technical books, it is also occasionally funny. The authors don't try to sell the technologies they discuss, instead giving practical advice that's useful to a programmer who is trying to actually build something. For example, the authors discuss bugs and inconsistencies in the system, clumsy API design and other problems that aren't great ad copy but you will need to know to develop robust applications.
I found this aspect of the book one of the most appealing, that it felt as though I was actually getting down to business. Gems of practical advice that can cut short frustrating problems appear throughout the book, so be sure to read carefully, don't just skim.
Hits Here I'll discuss a few examples of where I think this book really shines. First, the level of detail of the standard Unix APIs and the development tools is excellent -- I learned many immediately useful things in the first 13 chapters. For example, chapter 8, "Debugging With GDB," was not simply a repeat of the online help, but also contained useful tips about how to use GDB more effectively, from using Objective-C specific features to tracking subtle memory errors. Programmers who had only used Project Builder's interface to GDB will benefit greatly from this chapter.Next, there is pervasive sample code. Each chapter had a complete sample program demonstrating the topic at hand. Much of this code is also available online: see "Online Supplements" below.
Finally, as I mentioned before, the text contains tips and reminders throughout about potential mistakes, tricky problems, and differences between Mac OS X, OS 9, and other Unix flavors. A particularly useful example of this is in chapter 24, "CVS." There is a small but important paragraph that discusses using CVS 1.11 (as used in Sourceforge) with Interface Builder .nib files that can really save some grief. In other chapters, they even include workarounds for system bugs in some of the sample code. This pragmatic approach is really appealing.
Misses In this section I'll mention a couple potential disappointments. You will have to be willing to learn by just reading code at times. Most of the code examples are not explained line-by-line as is the custom in tutorial books. Comments explain tricky code, and the text covers the areas most relevant to the chapter topic, but for other sections, understanding is up to you. I mentioned this because although I feel the code is clear and a fair trade-off was made to fit in a lot of information, the amount of explanation you like is a matter of personal preference, and so you should know what to expect.Pointers to further reading is another problem. Aside from referring to man pages, there is little attempt to point to good external documentation on any of the more complicated topics. One chapter is not enough to completely cover BSD Sockets, for example, and so a reference to a Unix network programming book would be useful. In fact, every chapter could be improved by a references section, even if it only collected links to Apple online documentation or Unix community websites. With all the practical knowledge in this book, the lack of clues on where to look to answer your own questions was disappointing.
Finally, the cost of the book, at $97.95, is higher than you might expect. I admit that as a student, I would have to think twice about paying this price, although I am sure it would be easily justifiable for professional programmers. I believe that it is worth the price, however, because you would have to buy several other books to cover the same range of topics, and you still wouldn't get the Mac OS X specific information.
Online SupplementsThe authors have set up a promising resource for the book at http://borkware.com/corebook/ . The site includes the sample code, errata, reader comments indexed by the chapter and topic they refer to, and a general discussion board. There are already some errors listed, and a few pointers to useful documentation and interesting external discussions on mailing lists. The sample code is not complete at the time of this review, but more is being added. This site looks like it will be a useful addition to the book, especially if many good chapter-indexed comments are added. The site could be kept open as a reading companion while going over a chapter in the book. This site's organization is, in my opinion, much more useful and usable than other books' companion websites, including the site for "Cocoa Progamming," which hid its information from you unless you knew which page number was relevant to your topic.
Conclusion Core Mac OS X and Unix Programming is a very useful book, and even if you've been developing on Unix systems for years, you can probably learn a few immediately useful things by reading it. I recommend it for any serious Mac OS X programmer who wants to know what to read next after all the tutorials that have come out in the last year or so. I suspect it'll become a canonical reference, and may even be in need of a clever nickname. Congratulations to Mark and Aaron on a job well done.Michael McCracken is a grad student and Mac OS X developer; he says "I have not attended any Big Nerd Ranch courses, nor have I met either author, although I did see Aaron Hillegass in a crowd once." Update: 07/02 17:36 GMT by T : According to publisher AtlasBooks, bn.com won't actually be carrying this book, but you can get it right now from Atlas. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
Be careful, you might actually teach them some good programming techniques.
It is interesting to note that Microsoft in a previous article said that they had no intention of porting Office to Linux right now, but being that they have ported it to OS X most of the work has already been done.
--SolidGold
Everything you know is wrong. Or more accurately, inaccurate.
keychain has been a part of the mac os since OS 8, albeit not it it's current unix-ized form
i'm sorry, i'm just sleep deprived... but bitter. yes. very bitter.
I suppose you are correct, but who really cares? It really doesn't say much about your reading skills that you can't skim through bad writing, get the gist of things, and leave it at that.
No, we won't mod you down. We'll tell you. You are nit picking. All it says about his writing qualitiy is, that he was nice enough to review the book. This is slashdot. It's relaxed and depends on contributions from people.. a lot.
/trogdor
Unless you have something nice to say, say nothign at all. And unless he made a flagrant error, I suggest just commenting on the book.
-
ping -f 255.255.255.255 # if only
You can't be "unfamiliar with the command line" and a programmer. Pick one.
That'd put a major dent in my crack usage...
In the grand history of well-written technical books, it is also occasionally funny.
I hope the reviewer meant "grand tradition," although I don't see how this cliche fits here...
Oh...and do yourself a FAVOR and download Cocoa Browser before you even lay down a single line of Objective-C. The ONLY way to access the frameworks references.
blakespot
-- Heisenberg may have slept here.
iPod Hacks.com
How relevant will this information be with Panther merging to BSD 5.0 userland and the new Xoode environment?
I can't seem to justify the price for this book ... yet.
I like big butts and I cannot lie.
If you can "read" a EULA, I'm sure this is cake.
I understood is point, I didn't say "huh", nor did I otherwise get confused. Sheesh. Even the "Hacker Exploit Papers" have jokes and innuendos spiced about. And they're considered 'professional'.
It's not a port. It's a completely different product. They tried a direct port with Word 6, and it failed miserably. Mac users don't want Windows ports.
/usr/bin/word. It's a Cocoa app, not a UNIX app.
Most of the work is most certainly not done. It's not like we run
--
the strongest word is still the word "free"
I see Unix in the title but there is no mention of SCO. Just what in the hell is going on around here?
What on earth does that have to do with this book review? Nothing about Microsoft, Office, or Linux.
OFFTOPIC!!!!
This got a funny mod? Um, flamebit?
When you buy an Apple you get what you pay for, so that's a bad example anyway.
Who mods this stuff?
For example, chapter 8, "Debugging With GDB," was not simply a repeat of the online help...
;)
Wow, so we didn't even RTFS (summary), did we?
"Quoting famous computer scientists out of context is the root of all evil (or at least most of it) in programming." - K
Wow... you're my hero. You can nitpick without any effort at all. Do you think you could teach me how to do that? I'd also love it if you could teach me how to be an arrogant and pompous asshole since you seem so good at it.
This is Slashdot, not English class.
... If you have a Barnes & Nobel reader's advantage card:
List Price: $97.95
Our Price: $78.36
You Save: $19.59 (20%)
Readers' Advantage Price: $74.44
(OUCH!) This looks to be one book I'm going to have to skip. Bummer.
No matter where you go... there you are.
On a side note, I have wanting to see a program developed for the *nix desktop that allows a user to select from all available "man" pages and display them in the active window. This would minimize some time I spend on the command line - not that I mind the command line, but for document viewing, editing, and note-making I would rather have a graphical interface. Let's call it "RTFM" ;) . This may be able to be done through another program and I may just be unfamiliar with its operation. Anyone???
You can't (currently) get the book at bn.com. Use this web page to buy the book: http://www.atlasbooks.com/marktplc/00981.htm
I don't understand. Are you expecting that the book reviewers be held to a higher standard than the editors of /.?
Uh, did you even read the summary?
First off, glibc doesn't have a man page. The book isn't $60, it's like $98 and even discounted it's going to be around $75-$80. Secondly, the guy specifically states that the GDB stuff isn't a regurgitation of the man page, which I assume would hold true for other pieces of the book as well.
Secondly, although I have publically stated my fundamental disagreements with Apple about their policies on patents and their general disregard for some of the fundamental concepts behind open source software, Apple makes *great* hardware -- it's *much* better stuff than you can find in value-priced x86 machines. A little overpriced, yes, but you expect that from a strong brand like Apple.
My journal has hot
You're right. Don't know what I was thinking.
That makes them even less portable.
--
the strongest word is still the word "free"
How long till SCO sues the author for leaking trade secrets?
will they sue these guys for having Unix as part of the Book title?
Read about 43's daring statement here
Cheers,
W00t
Why don't the other books on OSX cover topics like sockets, and pipes? Well because its all been done before. Did Apple add new functionality to the sockets API? I dont think so. Its pointless.
Thought you could pass yourself off as an Apple user did you? We all KNOW that Apple users are pot smoking hippies, not crack smoking executives! Go back to your windows desktop, poser!
I'm trying to teach myself to set people on fire with my mind... Is it hot in here?
I plan on buying this book when I get the cash, but from talking to Aaron last week at WWDC, the price is that high is because it's basically the course material for the classes they have at the Big Nerd Ranch. Of course...I can't afford the classes, so I'm going to get the book.
Am I reading it correctly that the price is $US97 plus shipping?
Also, is it showing up on Amazon? I looked and didn't see it.
Clues gratefully accepted...
This is Slashdot. It isn't relaxed here. You must always spell and grammar check everything you post. If not, it will be picked to death by the spelling and grammar nazis. If you have something nice to say, keep it to yourself. This site is about discussion. Disagreement makes for better discussion.
I stole a nice Obj-C wrapper for keychain and tweaked it a little. You can get it here
You are thinking of Mr Rogers.
His marriage is an economic one. His wife is one of the richest people on the planet and employee 10 at MS.
Dude, you've posted this exact same comment, verbatim, at least a dozen times before. If you insist on being a troll, can't you at least be a creative one...
Why would MS port Office to a platform they see as competition for Windows? Apple isn't competition; Office on the Mac doesn't take away potential sales of Windows and other MS products. Selling Office for Linux, on the other hand, would just encourage migration from Windows to Linux.
-- Slashdot: When Public Access TV Says "No"
there has to be *some* way to cleanse us of all that ashcroft hath wrought
how a post that would have gotten -100,000 flamebait is suddenly informative/insightful now that Apple is the toast of /. instead of one of the whipping posts
it's shocking what a few years and a pretty UNIX GUI can buy you in terms of publicity and acceptance in such a fickle self-absorbed market as this one
I much prefer AppKiDo since it allows searching and it shows you a list of all methods of a class (including those from super classes) as well as a list of just those provided by the class itself.
Heaven forbid!
The book lacks sufficient references to 'jo2y',
I could only find about 3 or 4.
"It's as though he is sitting there beside you, casually instructing you as you move through the work."
...
That's gonna make it harder to code in the nude
it says in the Acknowedgements:
"...All layout for this book was done using OpenJade, TeX, and Norm Walsh's DSSSL stylesheets for the DocBook DTD."
And why would anyone buy a Model T when you could get a horse for cheaper and it works on more roads!
Be very quiet or you will never be able to catch a clue.
What I consider critical improvements, you consider "proprietary/design flaws compared to just Unix".
I know OS X is all unix central nowadays...Yet to see a book about core Unix programming on a Mac still has me to a doubletake the same if I saw a book called "A vegetarians guide to cooking steak."
(+1 Funny) only if I laugh out loud.
It always annoys me when I see a supposedly "advanced" programming book start out with newbie C programming, and unfortunately this book falls into that trap (spending nearly 100 pages on C basics). I don't know what possesses authors to do this, as it is a waste for any programmer with even a little bit of experience, and it won't be a suitable first book for someone who doesn't know what an if statement is.
With Panther and XCode just around the corner, other information in the book will soon be out of date, reducing the relevant page count even more.
I also think the price is obscene, and won't buy the book because I don't want to validate the decision to price it so high (and I own just about every OS X programming book released so far). It appears the price was the result of discussions along the lines of "this is the info you'd get if you paid $3500 to come to the class, so $100 is a bargain!", but book pricing should be done in the context of the publishing business, not the training business. If the book were priced competitively with similar programming books it might be worth a look; at $100 I suspect many people will pass it by.
Indeed it is. We also used CVS to collaborate on the sgml files and the makefiles to drive the DocBook->PDF toolchain. I used emacs for my chapters, and Aaron used an in-house tool called DocBooker. The early version of DocBooker is presented in Aaron's Cocoa Programming for Mac OS X book. Many illustrations where done with OmniGraffle.
I know that GNUStep is implemented in Obj-C, but would this book be useful for learning Obj-C and the GNUStep interface? Would there be any advantages for doing so (would I gain any cross-platform Linux-Mac OS X benefits)?
If you were me, you'd be good lookin'. - six string samurai
MS Office is a Carbon app. There's no carbonlib for any *nix except Mac OS X out there. Porting it to Linux would mean either porting carbonlib (i.e. a cleaned up version of the legacy Mac OS api + extensions) to Linux,
Wait a minute - if I had my modpoints now, I'd surely give you an "insightful" just for this. Are there any attempts to create something like free carbonlib compatibility environment? This could bring much more than just MS Office to Linux and other free OS'es. After all, majority of games for MacOS X is actually written in carbon - and they run natively in OpenGL, so there is no further need for the DirectX compatibility. Would this be worth the effort?
All that talk about the wonders of emacs.... when is someone going to resuscitate the ole' vi verses emacs debate in this thread. (heh, guess right now, huh?)
Honestly, I spent an hour lecture debating this. I claimed emacs was better, while he was die hard vi. I kid you not; it happened this past May. We beat that horse so dead that by the end of the hour the contention was that vi was more productive because it had no bundled games built in to it to kill you productivity.
... I said that emacs provides you built-in entertainment for ones lunch break.
100% Crunchier
Yes, and he wasn't the king either.
Boromir: "We have no need of kings."
It's only several years old...
Silly person.
Yeah, I suppose you are running LocalTalk over a 56k modem or something and running a broken System 7 installation?
Try to copy the 17 Meg file with your fancy 486 running Windows 95 if that suits you better, but please stop whining.
What should one use? I've heard that Cocoa is the way to go, but that involves learning Objective-C.. Would Carbon be supported in the future and would we be able to use all the cool features of OS X with Carbon (like Quartz)?
But no fucking Programming book is worthy of nearly $100 no matter the author(s).
The pass the R&D efforts of teaching Consultants how to program cost onto a potential tens of thousands of general programmer audience is the same asinine attitude some folks felt and I disagreed with while at NeXT.
Miraculously Steve thought $50k for WebObjects was steep and dropped it to $699. Amazingly, the product still exists.
Drop the price guys, get a better publisher to distribute and cover your costs so you can give us this sure to be excellent resource.
Hell, W. Richard Stevens, Advanced Programming in the UNI* Environment is definitely cheaper than this worthy book and it already has a place in history.
I agree with the reviewer about the lack of pointers for further info. I hope that the authors might fix this at the excellent site for the book.
For close to $100 this is an expensive book, but if you want to learn to write professional Mac apps then it's probably worth the price. These guys know their stuff and the book is a lot less than the $3500 they charge for the course.
Tony Williams
Ed, ed, ED, ED!