Tag Archives: programming

Programming iOS 4

Matt Neuburg’s Programming iOS 4 is among the best programming books I’ve ever read. I’d rank it right up there with Programming Perl.

I’ve tried several Cocoa / Cocoa Touch books before, and generally found them wanting. Many of them share a common problem: they take a breezy tone and try to get you to put up your first “Hello World” application as soon as possible, without sufficient explanation of the fundamentals. After a few chapters of cutting-and-pasting code, I usually gave up because I’m the sort of person that needs a solid foundation in the low-level details before we jump off into putting up pretty pictures.

Neuburg, on the other hand, takes an approach that I favor. He explicitly states near the beginning that he’s seen many iOS programmers leap into development via copy-and-paste coding without understanding the fundamentals. His aim is to remedy that. Without a good foundation, it’s impossible to develop the necessary intuition for the system that is critical for good design and assured debugging.

To that end, Neuburg spends more than a hundred pages going over the foundations of Objective-C before even telling you to open Xcode, and when he does, he does so methodically, explaining to you the philosophy behind Xcode’s design, how its makers envision a project workflow, and exactly what the various buttons do. (This is also one of the only good guides to the radically new interface of Xcode 4 I’ve found.) By the time you put up your “Hello World” app, you actually feel that you have a good intuition of the system as a whole.

Neuburg’s book covers the fundamentals of iOS programming as well as some advanced topics, so intermediate coders and beginners alike will find the book useful. I really think there’s something in here for programmers of every level of skill and experience.

(If you buy it through the Amazon link above, I get some kickback.)

Drawing the Genome

Suppose we do the following:

Let T = MOVE UP 1 UNIT; 

Then we can map any genome into a random walk, a kind of Etch A Sketch with DNA as the commands. The result might be interesting as a sort of message/art.

Here are a few examples.

bacteriophage MS2

Bacteriophage MS2, a virus.

Phi X 174

Bacteriophage Φ-X174, another virus.

Canis lupus familiaris

A small section of the genome of Canis lupus familiaris, the dog.

Seems like a promising premise for a story…

The quick-and-dirty script I hacked up for drawing these can be found here.