James Montgomerie’s World Wide Web Log


I open-sourced a little bit of, as I’ve been calling it on Twitter, “THE GAME” - that is, the game Em and I’ve been working on: “THIn”: Three easy ways to do things later in Cocoa/Cocoa Touch.


I wrote some key-value observing (KVO) and key-value binding (KVB) helper classes for iOS and Mac OS X. Not much more to say about them than is in the ReadMe file on GitHub. I’m pleased with them. Comments (and pull requests) welcome.

Migrating Xcode SDKs

Lots of people don’t realise that you can copy SDKs from previous versions of Xcode to newer versions and still use them.

For example, with the release of Xcode 4.5, Apple no longer ships the iOS 5.1 or Mac OS X 10.6 SDKs, but if you still need them for some reason, you can grab them from an older install. SDKs are stored in the Xcode app bundle, in Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/, Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/, and Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ - just copy them from inside your old Xcode to similar locations inside your new Xcode.

Note that this won’t give you the ability to do …


I posted YACYAML, the Cocoa YAML parser/object archiver I’ve been working on for a little while to GitHub today. It converts Cocoa objects to and from YAML, a plain text, human friendly data serialization format.

YACYAML can be used in lots of ways - from replacing plists or JSON for simple config files, up to storing entire custom documents in an easy to view (and easy to hand-edit) format.

Why have I made this?

The short answer is that I like YAML. It’s ‘nicer’ than plists and JSON to edit, and it’s far, far, nicer to look at than …

iOS' Hidden Base64 Routines

It’s commonly held that iOS has no built in Base64 routines (a strange omission, if you ask me). Pootling around in the BSD headers today though, I discovered this is not entirely true. There are a couple of functions hidden away in libresolv.dylib. That’s the, err, BIND-9 DNS resolution library… If you’re not put off by linking to BIND just to get Base64 translation, it’s easy to use. Here’s the interface (publicly declared in a less readable fashion in resolv.h):

// To encode:
// Returns the byte length of the ASCII Base64 encoded data, or -1 on failure.

Please Do Learn How Software Works. If You Want To.

By all means, learn enough programming to put together a prototype and have a better perspective on hiring and managing engineers. Just don’t mistake a foothold in the world of coding for true engineering expertise.
Buzz Andersen, commenting on Jeff Atwood’s Please Don’t Learn to Code

Apple, Failure, and Perfect Cookies

It’s painful, hard, and often time-consuming to restart when you’re already done, but you can’t argue with the results. Both Apple and Nintendo create some of the best, most inspired design out there.
Lukas Mathis, in Chabudai Gaeshi