• Skip to main content
  • Skip to secondary navigation

Ken Liu, Writer

Author of The Grace of Kings and The Paper Menagerie

  • Home
  • News
  • Books
  • Short Fiction
  • About
  • Other Writings
  • Adaptations
  • Talks
  • Events
  • Translations
  • Shop

programming

Programming iOS 4

July 7, 2011 by Ken

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.)

Filed Under: geek Tagged With: ipad, iphone, macintosh, programming

Drawing the Genome

October 27, 2010 by Ken

Suppose we do the following:

Let A = MOVE LEFT 1 UNIT;
Let C = MOVE DOWN 1 UNIT;
Let G = MOVE RIGHT 1 UNIT;
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.

Filed Under: geek Tagged With: fun, programming, science, scifi

WordPress Child Themes and remove_theme_support

August 4, 2010 by Ken

One of the interesting new features in WP 3.0 is child themes. This is a way to customize a given — “parent” — theme without copying or directly modifying the original theme files. This way, when the original theme is updated, you can update its files without losing your customizations.

[Read more…] about WordPress Child Themes and remove_theme_support

Filed Under: geek Tagged With: php, programming, wordpress

Copyright © 1996–2025 Ken Liu