Topic: Computing

What is “polish”?

One thing that I hear from time-to-time is that Yummy, my iPhone application, lacks “polish.” But what do people mean when they say that?

When I ask, what I usually find is that these people have never actually used it. They have probably looked at screen shots, maybe one of the screencasts. They can see that there are few graphics and little animation.

That’s fair — it’s absolutely true — but that’s not what I think of when I think of polish.

Instead, Yummy is designed to be quick and convenient to use. It’s modelled more after Apple’s Contacts app than, say, the Camera or Photos. In this sense, it’s not a few well placed graphics that makes all the difference. It’s the fact that Yummy saves your location in it when you exit1, even when you’re in the middle of editing a bookmark. It’s that your searches are automatically saved so you don’t need to re-type terms you use regularly. It’s that you can edit bookmarks even when offline. It’s that if you use a short bookmark (like tinyurl or bit.ly), you can fetch the full URL and the title of the web page.

In short it’s lots of little things that I can’t even begin to list on the features screen in its iTunes store listing. They’re not really features as such, but their absence would make for a much weaker program.

None of these things can be seen just by looking at screenshots. Indeed, some of those refinements may not be noticed at all. But I think it’s this very subtlety that defines polish. Marco Arment touches on this when he says that the best UI is invisible — this is exactly what I was aiming for.

  1. Of course iOS4 does a lot of this for you now, but I first implemented this when iPhone OS 2.x was current. []

iPhone Dev: Saving State

I see every now and again that Apple needs to make it easier to allow developers to save the state of their application so that they open up exactly as they were when they were shut down.

Obviously I’m all for Apple making my life easy, but that’s not going to happen for a while yet so I thought I’d share how I implemented it in Yummy.

The key is this simple protocol:


@protocol SaveState

- (NSData*) saveState;
- (id) initWithSaveState:(NSData*)data;

@end

This is what I have in my applicationWillTerminate: method:


NSMutableArray* vcList = [NSMutableArray arrayWithCapacity:3];
for (UIViewController* vc in self.navigationController.viewControllers) {
    // Classes that don't implement the SaveState protocol will be ignored
    if ([vc conformsToProtocol:@protocol(SaveState)]) {
        NSArray* state = [NSArray arrayWithObjects:NSStringFromClass([vc class]),
                                                                     [(UIViewController*)vc saveState],
                                                                     nil];
        [vcList addObject:state];
    }
}

This is in the applicationDidFinishLaunching::


for (NSArray* screen in screenList) {
    UIViewController* next =
                [[NSClassFromString([screen objectAtIndex:0]) alloc]
                                   initWithSaveState:([screen count] == 2) ?
                                   [screen objectAtIndex:1] : nil];
    if (next != nil) {
        [[self navigationController] pushViewController:next animated:NO];
        [next release];
    }
}

So a simple example, for a view controller that needed to be remembered but didn’t need to store any extra state, would be:


- (NSData*) saveState {
    return nil;
}

- (id) initWithSaveState:(NSData*)data {
    return [self init];
}

But you can initialise each view controller with anything that can be converted into an NSData. (I picked NSData rather than, say, id because an NSData can always be serialised. Made sense to make that assumption.)

One weakness is that it doesn’t cope with the situation where a modal view is on top but that should be pretty easy to implement if it’s important (it generally isn’t in Yummy).

The Up-Sell

I don’t mean to single out a single business here. The flaw I’m pointing out is shared by many sites but this post was inspired by a recent visit to TripIt. In general it’s a great service. It’s well thought out, allowing you to enter all your details with a minimum of effort; just forwarding your email confirmation to them is a masterstroke.

However. (You knew that was coming.) However, many links on the main page are non-functional, by which I mean they push you straight through to their paid-for service sign-up form.

The “tricky” part is that before you press them it is difficult to know which links actually work and which ones just ask for money.

There are a number of other tricks that some sites have. Another favourite is the interstitial screen, forcing you to view adverts before you can do what you actually want to do.

But it’s not just that I find it obnoxious. I don’t have data but I do have a nice anecdote that shows that it doesn’t really work.

During the dot.com boom I helped build a website. The launch went pretty well but the client decided that they wanted to push a secondary product, one with great margins but where customers really needed to be vetted. (I don’t want to get into specifics but it was a financial product.) The marketing people said that a pop-up would be the right thing to do.

We balked at the idea. At the time, pop-ups were the scourge of the Internet. They were used on all the least reputable sites. Technically adept users closed them without looking; the less fortunate were conned into either filling their screen with pointless adverts or visiting website they had no interest in. Pop-up blocked were a few years away.

In short, we felt that at best there was a reputational risk. Unfortunately we couldn’t come up with numbers to show that it was financially a bad idea, plus it was actually pretty cheap to implement. So they asked us to go ahead with it, over our objections.

As I recall it didn’t last very long.

After go-live there was a substantial up-tick in the number of people applying for this secondary product. However, there was actually a drop in the number of people who were accepted. That’s to say that it attracted exactly the wrong kind of person, which is bad enough, but there was also a cost associated with each rejected application.

Moving back to 2009, I think the problem with pushing your paid products too hard is that you actually make your free version less appealing. And, frankly, if your free version is a pain to use I’m certainly not going to pay for the full version just to make the evil bits go away.

To be clear, I have nothing against the so-called “freemium” business model. It can work really well. Flickr, for example, seems to have the balance about right: the site is useful even if you don’t pay for it with the extras useful for regular users. And paying LWN readers can get their content a week ahead of other people.

In short, if your paid extras are genuinely useful you don’t need to be obnoxious, you don’t need lots of “dead” links or interstitial adverts. And making your free version painful is most certainly not the answer.

Shrinking

I just realised that there are two anniversaries this year. Neither would be worth grabbing a bottle of champagne for but they are vaguely connected and it does give me a chance to reminisce about some neat, old technology.

I forget the exact dates of both events but they were fifteen and ten years ago. Back in 1994 I first installed Linux on my 386SX-based PC. At this point in time my exposure to Unix had been only on “big” computers, the Sun (Solaris) and HP (HP-UX) machines in the Universities labs. It seemed incredible that you could even get something approaching a full version of Unix running on my little home computer.

I guess it would seem pretty primitive if I were to look at it now. I seem to recall that they’d only just got X working on it and it didn’t work at all on my 386. But still, it ran and I could log in multiple times using virtual terminals. It even multi-tasked, something that Windows 3.1, the operating system in the other partition, couldn’t really do with any reliability. Despite the limitations, it was good enough to help me finish my final year project without having to make the half hour, hilly walk to the labs every day.

Five years after that I got my first mobile (cell) phone. It was an Ericsson flip phone, long before they teamed up with Sony. It was pretty small (even by modern standards) but they had achieved this by providing only a single line LCD display and stubby aerial that caught on the inside of your pocket when you pulled it out when receiving a call. Still, this was better than the Motorolas of the time which often allowed you to remove the battery when you intended to flip them open to answer a call.

At this point mobile phones were becoming popular but were far from ubiquitous. My Ericsson was tied to one2one, a network that no longer exists as a seperate entity (it’s now part of T-Mobile). Friends told me that this was a bad idea as they had poor coverage but I never really had a problem. When I did eventually move it was when they declared that I was on an “illegal” tariff and doubled my monthly fees. I’d called because I wanted to upgrade, to spend more money with them, but this was not what I’d had in mind!

As an aside, I continue to be fascinated by the farce that is the US cell phone industry. Ten years ago UK networks talked about coverage and dropped calls but it’s pretty much been a non-issue for a while now1. Both still seem to be big problems (or selling points) in the States and yet Americans pay more than almost anywhere else for their service. The bizarre thing is that many of the most tech-savvy people actually defend the telcos.

But back to the main narrative.

It’s kind of odd to think that we’ve now pretty much come full circle. What was considered “big” in 1994, Unix, has now filtered down to the decedents of that Ericsson mobile phone. Pretty much all of the “cool” phones released in the last few years have a Unix core, the iPhone, the various Android handsets, the Pré.

I’m not sure that ten or fifteen years ago I would have predicted that you would be able to get Unix on a phone, but Moore’s Law was well known so it wouldn’t have been an outlandish idea. But what comes next? Unix (and Linux especially) already span the whole range from tiny, embedded systems right through to super computers.

Where do we go from here?

  1. Orange have just started advertising about their 3G coverage, but this the first I’ve seen for a long time. I’m not even sure if it’s generally accepted that there’s a reception problem with the other carriers. I’ve been on most of the networks over the years and I’ve not seen dramatic differences. []

Snow Leopard

Most people reading this will know that Snow Leopard refers to version 10.6 of the Macintosh Operating System, Apple’s latest update released late last month.

I wasn’t sure whether I should upgrade initially. I have been stung before by being an early adopter. Mac OS X 10.4 was a nightmare on my iMac G5. The big ticket new features such as Dashboard and Spotlight worked just fine1. What didn’t work were little thing like, oh, networking. Eight times out of ten it couldn’t connect to my AirPort Base station. This made almost everything, including downloading patches to fix this very problem, a compete and utter pain. I think it took until 10.4.3 before everything worked reliably.

I waited several months before making the leap to 10.5 for this very reason. But Leopard at least had some neat new features (and the lame new look of the dock) to try to tempt me over. Snow Leopard, by design, has few user-facing enhancements to make it worth the risk.

Of course I’m not a typical end user. The reason I moved from Windows to the Mac back in 2001 was because of its Unix underpinnings:

MacOS X is based on a BSD Unix kernel (called Darwin and available under an Open Source licence) and has an enhanced Macintosh user interface grafted on top. This is truly the key. You have the complex internals available from a command-line when you need it and a state of the art GUI when you just need a word processor.

And now that I’m an iPhone developer I have a vested interest in using the best tools available for the platform, and they were only available for Snow Leopard. Also a lure where the new APIs (Grand Central Dispatch, OpenCL) and language enhancements (blocks). I’ve not done much Macintosh development but these were exactly the kind of things that would potentially get me started.

All this is a long way of saying that, despite the risks, I took the plunge anyway.

And…

Well, so far it’s pretty much been a non-event.

Yes, it’s quicker. Most noticeably in starting up, shutting down, Time Machine and in Mail. Don’t get me wrong, there are lots of nice little things — and I’m still finding new ones — but it’s mostly been entirely seamless, almost an invisible upgrade. And I mean that in a good way.

Yes, all my programs still work. I’d read reports that PhotoShop Elements didn’t work under Snow Leopard. I can report that it takes a considerable amount of time to start up and frequently beach-balls afterwards. Or, put another way, it works just as well as it did under 10.5.

I’d also seen scare-stories about old versions of Microsoft Office and other PPC applications that need Rosetta to run but, again, I’ve not seen any problems2. Even lower level software like my screen calibration program and film scanner software are fine.

I have two negatives so far, both fairly minor in the grand scheme of things.

The first affects Yummy and Yummy Browser and that’s the fact that the new version of Xcode only supports developing for iPhone OS 3.x3. Luckily there are very few users on 2.x but it’s still a little disappointing that I have had to make the move.

Secondly, it’s my printer. There is no longer a HP-supplied driver for my 2002-era DeskJet. Luckily Apple includes GutenPrint with Snow Leopard and there’s a bundled driver that recognises it. So on the plus-side I don’t have to go out and buy a new printer as I feared I might have to. On the down side the quality is just not there. While it was never a match for any contemporary photo printer, it was more than adequate for my needs. With GutenPrint, text is readable but there’s noticeable banding. I’m not sure I’d use it any more for “official” letters, though maybe I’m just being a snob. Photos have the same issue with banding but have the added distraction of some coarse dappling as a substitute for the more subtle colours.

No significant upgrade is going to be entirely problem-free but overall I’m happy with it. It’s about as easy as it could be and, despite Apple’s claim of no new features, there are certainly tangible benefits to making the leap.

  1. Some would argue with that statement. Personally I never had any serious problems with Spotlight. []
  2. To be fair, I moved to Office 2008 around the same time. []
  3. It’s true that you can build for older releases but there’s no way to test it in the simulator. I’m not willing to release software that I’ve not been able to test. []

Professionalism

A few years ago I was subcontracted to one of the large consultancies. I was taking over from someone who was, supposedly, quite senior and the task at hand, I was told, was very hard. I should take copious notes as she wouldn’t necessarily be around afterwards to help me. Making a mistake or missing out any one step could be disastrous to the whole process. If I did everything properly each new installation would take about a week.

This turned out not to be entirely correct.

After sitting through over a week of her spelling out each and every step in excruciating detail — much of which I don’t think she really understood — I spent three days writing a shell script to automate over ninety percent of the process. I don’t mean a quick, shoddy hack either. I spent the time to gold-plate it. It was a work of art. I set it up so that you only needed to copy the one file and allowed for the user forgetting to switch FTP into binary mode1.

In the end, my three days of work reduced the week long process to about an hour, and most of that was waiting for the file to transfer over the network.

I say all this not to show off. I think any engineer would have thought to do this. I note the extra refinements so you realise that it could have been done in much less than three days had I not wanted to practice my Unix-fu.

Result: I was heavily criticised for not following the proscribed process. I pointed out that my new scheme was quicker, easier and less error-prone. They countered that I had been unprofessional to begin a “development project without authorisation.”

What does “professionalism” mean to you?

Sometimes, I think, it’s used as an excuse to do or not do something in a particular way. “That’s not professional” is kind of a cop-out. In this case I can only assume that the real reason was that they wanted to bill a week of my time to the client for each installation. Of course they couldn’t say that.

Since then, every time I hear the phrase “that’s not professional” I try to drill down and find the real, underlying reason. I’m hoping that one of these days I won’t be disappointed with what I find. It hasn’t happened yet.

  1. I basically appended a tar’d and uuencoded file to the end of the shell script which it knew how to extract and decode. []