The Blog

Perspective

August 24th, 2010

225,000 titles in the App Store is a pretty big number, right?

Not really. There are currently over 13,000,000 music tracks in iTunes.

Of course, when it comes to influence and mindshare, apps are more important than music. They’re the hot new thing that gets the attention of the press, developers and customers alike.

But from Apple’s point-of-view, the worldwide infrastructure that distributes this large collection of media is more important than the tiny fraction used to get apps to our customers. As developers, we often become frustrated with the slow progress of this infrastructure. But when we ask for product upgrades, better marketing tools, or the ability to communicate with our customers, someone has to make sure that these new features don’t break other parts of a much larger system.

It’s also important to remember that the App Store is only two years old. Over the short life of this new software ecosystem, Apple has made steady improvements to iTunes. Restricting reviews to paying customers, in-app purchases, featuring apps in App Store Essentials, iTunes Connect changes, and faster review times are all indications that folks in Cupertino are working to improve this system we all depend on.

So the next time you encounter a problem with some aspect of iTunes, try to keep all this in mind. Hard, I know, but your blood pressure will thank you for it.

Easter Eggs

August 12th, 2010

Technical books don’t have to be boring. Throughout the text, I strived to make something that was as fun to read as it was educational. To this end, I did something you won’t find in other books: there are four Easter eggs.

The Easter eggs are sprinkled throughout the book: the only hint I will give is that each one appears in some form of computer input or output. So references to things like “Al Czervik Web Site” on page 243 do not count. Nor do the copious mentions of the CHOCKLOCK in source code listings (including the one in Figure 1-2 that you probably missed.)

The first person who successfully finds one of the hidden phrases will win a T-shirt and Ollie vinyl figure from the Iconfactory store. Each of the four winners will also be mentioned on this site (along with a description of the Easter egg they found.)

Send your guesses to the email address shown in Figure 5-6. Good luck!

Updated August 18th, 2010: We have our first winner! Matt Moriarity correctly identified that the device name fields in Figure 5-9 were David Bowman and Francis Poole: the names of the astronauts in 2001: A Space Odyssey. Congratulations, Matt!

Updated September 22nd, 2010: And another winner! Marcus Schröder noted that my user name on page 264 isn’t “studmuffin” (although part of me wishes that it was.) Well done, Marcus!

And another hint for those of you still looking: the remaining Easter eggs are numbers that you can read.

Updated September 28th, 2010: We have our final two winners!

Glenn Hoppe spotted a “unique” hexadecimal value in the breakpoint on page 56: 0xf135h90d. (For those of you who don’t speak 1337, that’s FLESHGOD AND ITS AWESOME.)

I wasn’t really expecting the final Easter egg to be found, but Nick Mackintosh spotted it on page 296. If you enter the Advertiser ID from Figure 9-12 into a calculator and turn it over, you’ll see a special message. Make sure you don’t use one of my favorite iPhone apps.

Congratulations to all the winners and their detective skills!

Downloads Updated

June 22nd, 2010

Just a quick note to let you know that the downloads on the Missing CD website have been updated:

  • Due to a bug in Interface Builder, some readers with smaller screens were not able to open the XIB files in the sample projects. The files have been fixed and now open correctly on all monitor sizes.
  • The Xcode projects have been updated so they are compatible with the iOS 4.
  • The source code for the Safety Light website was missing in the initial download. It’s now included as Ch07_SafetyLight_Website.zip.

Starting Out

May 7th, 2010

As we began discussing the outline of the book, one thing was clear: we’d assume that the reader had a basic knowledge of programming. Someone who’s done some JavaScript or C development should feel comfortable with the information being presented in the early chapters that discuss Objective-C and the Cocoa Touch frameworks.

The goal of the Missing Manual series is to get you started with a new endeavor by just presenting the most important topics. Explaining basic programming fundamentals fell outside this scope.

Regardless, there are still a lot of people who want to get into iPhone development and have no prior experience with software development. This post is for those people: I’ll present some pointers that will help you get over the hump of learning to think in code. Hopefully, you’ll want to buy my book afterwards. :-)

Learning to Think in Code

One of the hallmarks of a good developer is that they can think in code. When faced with a problem, they instinctively know how to break it down into its constituent parts. That, in turn, leads to the eventual implementation.

Learning to think this way is essential. The language you use to develop this skill isn’t important. Many of the resources below have no syntactic relation to Objective-C (especially ones that focus on Ruby.) They are, however, conceptually the same as the language you’ll use to code on the iPhone.

I should also point out that I haven’t read many of these books. I first started writing code in 1976 and was introduced to C in 1983. It’s been a long time since I was a beginner, so I asked my followers on Twitter for suggestions. The links below are the ones that looked most promising after checking out the table of contents.

The Very Basics

Objective-C is an easy language to learn assuming you have good foundation with its progenitor: C. The problem is that C is not a particularly good language to start out with: it’s popularity is based on its power. And with power comes complexity.

Several followers suggested books that discussed Ruby and Python. There are a couple of reasons why these languages make good choices:

  1. Simple syntax — when the language you use to develop your first code doesn’t get in the way, it’s much easier to focus on the concepts behind that code.
  2. Interpreted, not compiled — C and other languages based on it (like Objective-C) are compiled languages: this extra step makes it harder to experiment and play with the concepts.

If you’re an absolute beginner, these books should help get your mind working like a programmer:

  • Why’s (Poignant) Guide to Ruby by _why — This free book is a joy to read. When I first started learning to use Ruby, it taught and entertained me at the same time. The comic book format is particularly good at keeping visual thinkers engaged.
  • Learn to Program by Chris Pine — I’ve read several books from the Pragmatic Programmers and they’ve all been excellent. I wasn’t aware of this title, but it looks like a great introduction to programming using Ruby.
  • Head First Programming by David Griffiths & Paul Barry — Like others in the Head First series, this book takes a very visual approach to the learning process. There are plenty of diagrams and graphics that help you understand how code works. The book uses Python in its examples.

The Foundation

At the heart of Objective-C is the C language. You’ll want to be familiar with it’s syntax before you jump into the process of learning how to code with the Cocoa Touch frameworks. Here are some books that will get you up to speed with this language:

Mac Attack

Objective-C first became popular with NeXT computers in the 1980’s. The transition to Mac OS X starting in 2000 brought this language to the Mac. With this head start, there are a lot of great books that explain how to use Objective-C using Xcode on the Mac. Using the Mac as a first step toward attacking iPhone development isn’t a bad approach:

Going Deeper

I’d be remiss if I didn’t list a couple of the books that helped me learn Cocoa. These are certainly more advanced texts, but I wouldn’t be doing iPhone development without them:

  • Cocoa Programming for Mac OS X by Aaron Hillegass — A great book for developers who already feel comfortable with C: it wastes no time and dives right into the essential parts of the Cocoa frameworks.
  • Cocoa Design Patterns by Erik Buck and Don Yacktman — A fantastic overview of the different approaches the Cocoa frameworks take to solve common programming problems. I frequently find myself using this as a reference when confronted with the eternal question: “How should I implement this?”

Hopefully these resources will help you get up to speed and prepare you to build your first iPhone app!

Side-by-side

May 7th, 2010

Now that you’ve downloaded both the Ebook and source code, this iPad dock trick from Pascal Balthrop may be just the thing you need.

As I said in my last post, the source code for Safety Light and the book are meant to go hand-in-hand. You’re welcome to download the Flashlight Pro project and build your own flashlight, but you won’t find too many comments in the source. That’s because they’re all in the book!

You’ll also see some things like target settings and build scripts that you don’t understand. Again, the text goes into detail about why they were chosen and how they can save you time and effort.

And if you’re waiting for your printed copy to arrive from Amazon, you can download all the materials now and take a quick peek at what’s about to come. Enjoy!

The Reviews

“Indispensable for anyone who wants to get serious with iPhone development. It covers not just the technology behind the iPhone OS platform, but the daily life of an iPhone developer—something far more difficult to put into words. Craig has been there since day one, and is now sharing some of his best tricks … Beginners will quickly get rolling, and even veterans will learn interesting things from the mind of a proven master.”

Matt Drance

Bookhouse Software

Read more reviews...