Open Shelf…

Stephen Fry Understands 24Sep07 | Comments Off

Why am I not surprised that one of my favourite writers/actors/critics is able to accurately describe the Apple users’ ethos so accurately:

Why should a faceless, graceless, styleless nerd or a greedy hog of a corporate twat deny us simplicity, beauty, grace, fun, sexiness, delight, imagination and creative energy in our digital lives? And why should Apple be the only company that sees that?

Full article here, if the site regains its composure after the thrashing it’s doubtless receiving from Fake Steve Jobs.

Apple’s Stance on iPhone and Apple TV Development 11Sep07 | 1

MacRumors today reports on a story at Gearlog, quoting Apple’s VP of marketing Greg Joswiak, in which he outlines Apple’s stance on iPhone development:

Apple takes a neutral stance - they’re not going to stop anyone from writing apps, and they’re not going to maliciously design software updates to break the native apps, but they’re not going to care if their software updates accidentally break the native apps either.

This to me echoes the reports that Apple was unconcerned about third-party Apple TV developers — that they would not be specifically doing anything to hamper that process, but that no support was offered and people who manage to brick their ATVs have only themselves to blame. The Gearlog story was in fact updated to clarify this with regards to the iPhone.

A second update to the Gearlog story mentions that Apple now says that “software updates will most likely break” native iPhone applications in the future. I take that to mean much the same as the Apple TV 1.1 update, which changed the APIs somewhat, but not extensively. So, after a software update your third-party apps may not function, but their developers will probably be able to create new versions without any real difficulty.

Ooops, another bug in BackRow 10Sep07 | 0

Recursive functions are great. They’re a very useful tool for a great many things, and in the BackRow framework’s RUIPreferenceManager class, they’re put to (presumably) good use when handling preference domains. There’s a single funnel function which uses CFPreferencesCopyAppValue() to fetch a preference from a given domain/app; if unable to find a value, it splits the domain, removes the last component (provided it’s got more than two components here) and then calls itself again with this new, shorter domain.

That in itself is not a problem. The implementation, however, has one small flaw that will at least throw an exception, and at worst cause a crash. See if you can find it:

- (id) _valueForKey: (NSString *) key forDomain: (NSString *) domain
{
    [_preferencesLock lock];
    id result = (id) CFPreferencesCopyAppValue( (CFStringRef)key, (CFStringRef)domain );
    [_preferencesLock unlock];

    if ( result == nil )
    {
        NSMutableArray * components = [NSMutableArray arrayWithArray: 
            [domain componentsSeparatedByString: @"."]];
        unsigned count = [components count];

        if ( (count == 0) || (count <= 2) )
        {
            [components removeLastObject];
            result = [self _valueForKey: key 
                              forDomain: [components componentsJoinedByString: @"."]];
        }
    }

    return ( [result autorelease] );
}

Yes, that’s right. The recursive call will return an autoreleased object. Which then gets autoreleased once more.

Oops. Time for another software update there ;)

iPod Touch 06Sep07 | 0

So, the iPod touch was announced yesterday, and made available to order. I’ve placed an order for the 8GB model (having bought a 30GB iPod classic not long ago, which is plenty big enough to contain everything I have), pretty much purely so I can do some iPhone programming.

According to MacRumors, the iPod touch and the iPhone both run the same operating system, on the same hardware, to the degree where the apps on the iPod touch are “the same damn binaries” as on the iPhone. This means that I’ll be able to do some work with ‘Touch OS X’, be it the UIKit or more esoteric items such as CoreSurface (low-level graphics), GMM (Google Maps), DeviceLink, ITSync (iTunes sync, which probably uses DeviceLink internally), MultitouchSupport, MusicLibrary (in Obj-C, no less), and the iPhone Preferences.

My order is due to ship by September 28th, and due to arrive by October 5th. Hopefully it’ll ship ahead of schedule, but once it arrives, we’ll see whether there’s a disk mode I can enable, and whether that gives us the ability to see the OS drive. Personally, I have my fingers crossed for a Journaled HFS+ partition with a custom UUID, like the Apple TV’s software restore partition. That’s at least mountable on the desktop.

I can hardly wait !

PS: I’m now following John Gruber’s example and making all my posts using MarsEdit by Daniel Jalkut. It seems to work really quite nicely, so go & buy it now. Yes now. No, you can’t wait until later. Oh, okay, if you’re actually in the middle of something then you can wait until you’re done. But as soon as you’re done you’re going to buy it. Bokay?