Cocoa and Objective-C: Up and Running (by me) is now available from O'Reilly.

I'm Writing a Cocoa Book for O'Reilly

Writing a book is a fairly crazy thing to do. It's like coming up with 200 essays on a single subject. You can only do it if you really like the thing you're writing about. Fortunately, I really like making Mac software and teaching other people about it, so O'Reilly asked me to turn that into a book.

Cocoa and Objective-C: Up and Running


The book is called Cocoa and Objective-C: Up and Running. It's a ground-level introduction to everything you need to write Cocoa apps. I don't assume you know C or compilers, or anything other other how to use a Mac. It's available now from O'Reilly Rough Cuts. More content will be added before it goes into production later this year.

In short, I took everything I've learned about writing Cocoa tutorials since 2004, cleaned it up, filled in the missing pieces, revamped and updated it for Snow Leopard, and put it all together into one, cohesive walkthrough. If you like the Cocoa articles on Theocacao and the tutorial I wrote for Cocoa Dev Central, I really think you'll like this book.


Who This is For?

I had to figure out who to write for. A book for expert programmers is easier to write because you can assume a lot more; but I wanted to make it possible for anyone to learn Cocoa, even if they had no programming experience. Once I decided on that, though, I had to figure out how to actually do it.

Cocoa is based on Objective-C, which is based on C. So I could write a book on C, then a separate book on Objective-C and Cocoa. The downside is that you could end up wasting time reading about the obscure parts of C that don't apply to modern Mac apps.

Another option is to skip C entirely, and just jump right into Cocoa and Objective-C. I almost went this route, particularly because it's how I learned. But then I remembered how many examples and explanations were going over my head when I was learning because I didn't understand the underlying rules of C. I got a lot of code to work purely by accident.

There's also a good chance that you'll want to use existing C code, and to do that, you need to know how to read and write C. In fact, some of the frameworks in Mac OS X can only be used as C types and functions. And sometimes, you may just need the extra speed of C.

So I asked myself was: "Am I training people to write one-off Cocoa apps, or to be productive Cocoa engineers?" I decided I wanted to make engineers, not just people who can run through basic examples. But it takes time to learn C first, and I want to help you get started right away. So what's the answer?

I decided to teach a core set of C concepts that apply directly to Mac and iPhone programming, leaving out the archaic C conventions that Cocoa has better answers for. So this book has only two chapters on C. They focus on just the parts that you need to be a productive Cocoa programmer.

What If I Already Know C?

The other big decision I made was that the book shouldn't be only for new programmers. I wanted it to be useful for people who already knew C or C++. I know this sounds like hyperbole, but I really mean it. I want to be able able to hand this book to an experienced programmer who's new to the Mac and tell them it will be useful.

So the chapters are setup to be modular. If you already know C, you can skip ahead to the Objective-C chapter. If you've spent some time with the iPhone SDK, you can start with the chapters that cover the frameworks. This was not something I took lightly and was not easy to do, but I think the result will be something that will work for a lot of people.

How Is it Written?

The main job I have in this book is to tell you how Cocoa works in simple terms and a personal voice. The world does not need another big, dense book with distant language. If you read Theocacao or Cocoa Dev Central, the style will probably be familiar, but hopefully even more stripped down.

My editor at O'Reilly, Brian Jepson, encouraged me to talk directly to you, and even write as if we're having a conversation. He also asks questions that he thinks you'll have, and suggests I just answer them directly in the text.

The CocoaBook.com Site

The home base for the book is CocoaBook.com. Please check out the site and share it anyone you know. This is where I'll post the code for the examples, along with any news on new versions or other things that come up along the way. I'm sure a lot of the major developments will end up on Theocacao, too, or you can get updates through my Twitter account.

CocoaBook.com



Another Bonus

Now, what about Cocoa Dev Central? There are a lot of useful tutorials there, and some of them need to be updated. The good news is that I talked to O'Reilly about this and they gave their blessing to posting the revamped versions of the existing tutorials back to Cocoa Dev Central (specified as a percentage of the total book content). This is no small thing to me, and they really get why this is important.

The net result is that O'Reilly is getting a book while still enabling Cocoa Dev Central to be useful resource for Cocoa developers, which I think is pretty fantastic. Outdated content will be refreshed and missing pieces will be filled in. Some of the new content will be unique to the book, because we really want you to buy the book. But all of the tutorials that were previously available will stay that way. Nothing is being pulled from the site.

By the way, the reason I want you to buy the book is so that we can do more of this. This isn't my full-time job, and writing a book is pretty hard. But if you guys and girls like this one, I'll write more. Maybe it's too predictable, but I have to pull out the Disney quote that Brent Simmons first turned me on to, and John Gruber recently brought back into the collective consciousness:

"I don't make pictures just to make money. I make money to make more pictures. I'd rather entertain and hope that people learn, than teach and hope that people are entertained." -Walt Disney


I write software for a living, and I enjoy that very much. But I write tutorials because I like helping people learn how to do something that might change their life. I'll keep doing it for as long as you guys want to read it.

I hope you like it.
Design Element
I'm Writing a Cocoa Book for O'Reilly
Posted Sep 27, 2009 — 34 comments below




 

Eimantas — Sep 27, 09 6891

Good luck with finishing this! I am really looking forward to your published book as well as reading and reviewing it!

Jeff LaMarche — Sep 27, 09 6892

Awesome! This is really great to hear. Writing is horribly hard and time-consuming, but also really rewarding, and based on everything you've written online, I'm confident it'll be a great book.

I wish you the best of luck finishing the book and, more importantly, I hope it sells well.

Roman Busyghin — Sep 27, 09 6893

Great news, Scott! Could you please share table of content of this book when it will be ready for publishing?

harald — Sep 28, 09 6894

great news ... i like your cocoa tutorials and i'm looking forward to get my hands on your book :)!

StuFF mc — Sep 28, 09 6895

Very, but very, good news. I can't wait to have a look at it. It's not meant (really) to be a shameless plug to my own productions (since I'm not so much into podcasting anymore), but it might be good for some of you not knowing Scott to have a look at this video which I'd love to reiterate the next time I'm in SF (probably WWDC 2010). All the best for the book, Theo :-) hum, Scott.

Simon Wolf — Sep 28, 09 6896

Excellent news and I'm looking forward to this immensely. Your tutorials were one of a handful of really useful resources I can point to when I first started developing with Cocoa so I have high hopes that the book will be both great for beginners and also very useful for more experienced developers who may have missed a few tricks.

Fingers crossed for you that it sells well and that you get to write more books.

Dylan Beadle — Sep 28, 09 6897

Excellent news!

Having started programming a little over a year ago I can attest to how much your tutorials helped me through the steep learning phase and thank you for helping change my life.

Here's to hoping your book helps change even more lifes!

Steve Harris — Sep 28, 09 6898

Wow, there's a friend of mine who really needs this book! I've been looking everywhere for something pitched this way and I couldn't even put together meaningful combinations of things. I wish you all the best.

Andy Lee — Sep 28, 09 6899

This is great! I sometimes imagine writing an intro-to-Cocoa book (just idle daydreaming), and the target audience that strikes the most terror into my heart is the absolute beginner. Offhand I think you're taking a good approach to this, and you're one of the best-qualified people to make it work.

Best of luck. This *may* even inspire me to actually use my Twitter account.

I'd like to say I'll send you feedback, but I always fall short when I make promises like that, and then I feel crummy. So let's just say I'll send you feedback -- if I get around to it.

Steve Johnson — Sep 28, 09 6900

Scott,

I cannot adequately express how happy I am that you are writing "your book".

I know that it will be absolutely wonderful.

Go get em tiger.

SteveJ

Anderson — Sep 28, 09 6901

I'm very excited about this book. You seem to have a knack for explaining complicated concepts in a way that is relatively simple for even beginners to understand. The parts I'm most looking forward to are brief explanations of the Cocoa patterns, Bindings, and CoreData.

Manton Reece — Sep 28, 09 6902

Congratulations! Always loved the high quality and great attention to detail and design in your tutorials. Looking forward to checking out the book.

Adam Teale — Sep 28, 09 6904

Can't wait to get a copy, cheers Scott!

Darcy Otto — Sep 28, 09 6910

This sounds like a great project! It is always a difficult to start out with Mac programming, given that you have to be familiar with C, Objective-C and Cocoa. Several people have taken a crack at it, and while many of the attempts are admirable, none have got it quite right. I can't wait to see what you come up with!

Ken — Sep 28, 09 6912

Anything in there about Interface Builder?

Objective-C and Cocoa can be understood and grasped by individuals that have used C#, Java or other OO languages.

Interface Builder on the other hand is a very foreign land to someone coming over from Visual Studio, Delphi, or Eclipse.

Mac development frustrations:
10% objc
90% IB

Well... that's where I am at least.

Gus Mueller — Sep 28, 09 6913

Congrats! This is bound to be awesome if you're doing it :)

Adil — Sep 28, 09 6914

Good luck. I was wondering if you can tell when it will be available?

aquaibm — Sep 29, 09 6915

I am just wondering what's happend to this website, since it doesn't get update for almost half year! Glad to know you are back here with your book.

Tedd Fox — Sep 29, 09 6916

AWESOME news Scotty!!!

Nasser — Sep 29, 09 6917

Great news Scott,
the "beauty" of cocoadevcentral.com and theocacao.com is one of the main reasons that made me love cocoa. No doubt that I'm gonna ENJOY reading your book.
cheers

Jacob Friis Saxberg — Sep 29, 09 6918

Awesome. I need that book.

Pat Garner — Sep 29, 09 6919

As I've learned Cocoa over the past years, I've learned a lot from your posts here and on Cocoa Dev Central and you've been a great source of inspiration. Best of luck to you in this endeavor, you rock!

Steven G. Harms — Sep 30, 09 6920

This is a great didactic approach you're taking, I'm looking forward to having your voice shepherd those who wish to learn Cocoa.

mmw — Sep 30, 09 6921

Good Luck!, a lot of ruch time ahead, a good thing record vocal notes, and record yourself when reading what you just wrote, maybe for the first one you should have used an anagram like: Stephen Scotland 8-)

Cheers!

Colinj — Oct 03, 09 6927

I look forward to your book. I definitely adding this to my booklist. Your website is awesome and its great that it will be updated too but to be able to read this offline is an added bonus.

Cant wait!

Spense — Oct 04, 09 6928

Congrats and good luck with the book! Your tutorials are great and I can't wait to read the finished work. I was going to get the Rough Cuts version but they want $30USD for shipping to Canada! (For the online+print version)

Josh Smith — Oct 06, 09 6929

Sounds like you're writing this book for me. Can't wait to get my hands on it. Best of luck as you finish up!

GJ Nilsen — Oct 07, 09 6933

Hi!
I just bought the bundle, and I think its interesting so far. When are you planning to release the printed version?

Kamelito — Oct 07, 09 6934

Hi
I wanted to but online and peintes but its too expansive.
Why because the taxes were around 11$ and shipping and handling were 30$.
I then purchased only the online version for around 17$
I live in France.
Kml

A R — Oct 07, 09 6935

I know this is off topic but did you ever make a core animation example that was a slideshow. I can't find it on your site if you did.

Tomas Sancio — Oct 12, 09 6939

Thanks for taking your time to write a full-fledged Cocoa book! Will certainly look forward to the refreshment and incentive to finally write an iPhone app.

Steve — Oct 19, 09 6959

Will outsourcing affect Mac developers living in developed countries to the point where it does not make sense to code yourself? Just wondering.

GJ Nilsen — Nov 04, 09 6980

Since I bought the access for rough cuts, there has not been any changes. Are you still working on the book?

Bill — Nov 11, 09 6996

I bought the rough cut to the book. Do you want me to send a list of the typo's I've found? If so how?




 

Comments Temporarily Disabled

I had to temporarily disable comments due to spam. I'll re-enable them soon.




Technorati Profile
Copyright © Scott Stevenson 2004-2008