Feature Idea for UIKit: UIDeviceCharacteristics

Though I will probably always regard it as reeking of code smell, I have to admit that there are times when one has to write device-specific logic based on the current device’s hardware identifier. I’m referring to the identifier obtained using sysctl(). For example, the iPhone 4S has the identifier iPhone4,1.

A good example of a valid case for device-specific code is any app that has custom AirDrop features. For example, OvershareKit has to know whether or not the current device supports AirDrop when populating the list of available services for a share sheet. Since Apple provides no APIs for checking the availability of AirDrop, our only recourse is to maintain an exhaustive list of all hardware identifiers for devices that support AirDrop.

But AirDrop is only one use case among many. Lots of apps run into situations where code really needs adapt to the capabilities of the current device. Shoehorning the same code into a ever-widening array of devices results in compromised user experiences for either the oldest or the newest devices, or both. Last year’s iPod touch and the iPhone 5S are two devices that both run iOS 7.1, but with vastly different performance characteristics.

The deeper problem is that basing device-specific logic on hardware identifiers is an indirect solution. What developers really want to know about are the characteristics of the current device, not what kind of device it is. This will be even more true if (as?) Apple’s iOS lineup branches into new device categories (cars, TVs, and watches, to name a few).

A better solution would be for Apple to provide a hypothetical UIDeviceCharacteristics framework, which would abstract out specific characteristics like graphics performance, brute computing power, hardware features, etc. This way developers could write code that targets stable and meaningful device characteristics, instead of brittle and incomplete lists of device identifiers.

I’ve submitted this as a Bug Radar, too.

|  1 Apr 2014




Rdio iOS SDK

From the Holy Moly department: Rdio, my favorite music streaming service, has an iOS SDK. It looks fantastic. The Rdio.framework is pretty much a plug-and-play solution. It handles all the low-level audio and network streaming stuff, and has convenient wrappers for RESTful API calls. In short, you could build a clone of the official Rdio app, and the only thing you’d have to worry about is design and caching API responses for performance.

Check out the SDK in action in Rdio’s sample iOS app on Github.

Rdio is my favorite service because it’s organized around albums. Younger folks who came of age after the age of Napster and iTunes seem to like singles or playlists. I still like to listen to whole albums, often on repeat. Rdio makes it easy to thumb through my album collection, and to snoop through the collections of people I follow.

|  24 Mar 2014




Two Alarm Fire – One More Old Post From 2008

Here’s one more post from my old blog. I have no memory of writing this, though I remember the event just as clearly as the day it happened.

A FIVE ALARM fire is one that is responded to by five fire halls. I never knew this until a two-alarm fire was despatched to my apartment—or rather, what was left of my rapidly disintegrating apartment. Until then I had not suspected that I was living such a combustible life.

MY BROTHER AND I reached the basement door and emerged panting. We ran around to the front of the building so quickly that I have no memory of the lengthy jog it took to get us there. A crowd of spectators had already begun to gather, neighbors and passersby milling about in the middle of the street, arms crossed and heads cocked at thoughtful-looking angles, as if our building wasn’t burning but sobbing sloppy confessional tears to them, its confidants, who nodded softly and offered bracing mm-hmms. No one spoke to any of us survivors escaping from the building, for which I was very grateful. Silent distance can be a very decent thing, especially between strangers. I consider it a duty for one of disaster’s fifth-wheels to keep their comment-holes shut. Grief is like aerobic compost; it needs air to decompose without producing a necrotized stench.

THE TELEVISION CREWS, which arrived with or perhaps slightly before the fire department, were not as respectful. Our apartment fire was a three-alarm headline. The local ABC, NBC, and CBS affiliates were there, represented by office trollops with shimmering silk blouses and synthetic nails. FOX was conspicuously absent, or at least I couldn’t see them, and for that I owe to them my undying gratitude. If you’re reading this, thanks for not televising my unraveling life at the very moment of its unraveling.

TWO ALARM FIRES are a sight to behold. A fire hall does not send a basketball or a soccer team’s worth of men. It sends a full NFL franchise worth of first draft backdraft fighters, muscle-bound and thick-necked, stomping around your charred property in dusty yellow hides and air-tight facemasks. A man for every job. Clockwork. One spins the truck into position. Two open the hydrant and connect the hose. Two unload pressurized oxygen tanks still blackened and shopworn from the last fire. Uncounted dozens of front-line infantry suit up and mask up and stampede up your hellish stairs, axes flying. Raw, inchoate, manly shouts directed them inwards and upwards. Under the circumstances, the urgent barking was tantamount to hollering strategies at a rodeo cowboy on a bull in full-tilt. Isn’t the objective simple? DON’T DIE.

EVENTUALLY THEY REACHED my apartment and squelched the nine-foot flames that had been clawing their way out of the living room windows. The heat was popping out the panes. Glass was everywhere. The gutters hung in shriveled kinks like palsied limbs. Scorch marks blemished the bricks above the windows in a feathery pattern. The firemen waved the the high-pressure hose around my battered apartment like Hercules power-washing the augean stables. Whatver glass panes remained were blasted out. Clothes were soaked. The floors and walls were saturated and briny. Axes ripped gashes in the drywall, tore out ceiling and insulation, hacked my furniture into shards. No Chair Left Behind. A computer was thrown seventeen feet, from the dining room to the living room. Desks were flipped upside down, drawers tossed and emptied midair. More gashes were made in the drywall, some of them needlessly. It seemed the fire deparment’s policy was to ensure that anything usable or valuable that had survived the fire would not survive the fire department. Paintings and drawings were destroyed. Curtains torn, closets ransacked, bathroom cabinets pillaged. The Vandals had returned to once again dismantle the western way of life. Possessions were no more. Objects ceased to exist. Things fell apart. When some unspoken criteria of dystopic ruin had been met, the firemen switched off their hoses and dropped their axes to the floor. A job well done. Every measure had been taken to ensure that no half-assed crisis had interrupted my day. No, sir. I was a genuine refugee.

|  2 Mar 2014




Making Toast as an End in Itself

Back in 2008, I was recovering from a terrible bout of depression. I wrote often in my journal and on a (now defunct) blog about depression, desire, and moving forward. This post was one of my favorites.

The thing one learns about depression is that is primarily a crisis of desire. It isn’t a spiritual or a philosophical problem, nor is it a degree of sadness. Sadness and depression are not analagous. Sadness is a thorny flowering of a deeper happiness. Depression, on the other hand, is a lack of momentum in desire.

What is it that we desire? Commonly, we are wont to think of the particular objects that we desire: success, love, etc. The list is lengthy—and irrelevant, because underneath or behind all our particular visible desires is a deeper nonspecific desire, a generalized wanting. There is a void at work in the human person that is akin to the weatherman’s low-pressure front. It moves forward, drawing itself along and drawing others into itself. Along the way eddies of wind and even torrents of rain are produced, but these are just the visible effects of an invisible movement.

And this is good! This desirous gap is what drives us out of bed in the morning, what propels us after the things we want, what enables the human dynamo. When this void is moving forward, it does so in part with the help of inertia, and all is well. But when that inertia is threatened, when the generalized wanting comes to a halt, well, then everything is in a shambles! The self loses the motor force that sent it springing off the mattress every morning in hot pursuit of fame or fortune or a better sandwich cookie. The self despairs of its visible objects, feels its desire fading. It remembers what it was like to want, but only dimly. One finds oneself saying things like “I want to want…”

The problem doesn’t end there, however. The self, at some level, recognizes that behind all its particular desires, there once was a broader desire (I think the Greeks called this void eros but I may be mistaken) that made wanting possible, but now that desire is gone, collapsed, stagnant. In its frustration, the self tries to forcibly, muscularly jumpstart the ailing eros by various fixations and obsessions. One sees such a person resurrecting old abandoned hobbies and passions, or calling up wistful memories of “the one that got away,” etc. When this fixation occurs, when the self becomes obsessed with the always-already-defeated task of wanting to want again—that is the start of depression proper.

So what is the solution? I don’t know for sure, but I have an educated guess. I think that the void is only able to regain its momentum to the degree that one avoids interference with it. The void works best by being allowed to be a void, pure and simple. In other words, leave it alone. Depression is one of those rare problems best solved by doing as little as possible. It is for this reason that one who is depressed needs friends so desperately. Without desire, the task of daily life becomes an unbearable burden. Even the will to make toast, for example, has disappeared. But the only way to keep one’s mind distracted from the recovering void is to press-on through all the mundanity of life. The act of making toast takes on a self-salvific importance it never had before. It is imperative that I make this toast in order that I avoid the temptation to try to resurrect my desire to make toast. It is making toast as an end in itself, which, as anyone who has been through depression can tell you, is no small task. If one has friends to encourage him and to, ultimately, distract him from his depression, the problem will solve itself. What a strange problem, that.

Originally posted November 12th 2008.

|  2 Mar 2014




Designing Unread for iPad

The fun work of designing an app usually happens behind closed doors, where good ideas can’t spread. I thought it would be helpful to share my design process by documenting the design of Unread for iPad. I’ll be posting a series of videos on a new Vimeo channel. If you’re a developer who wants to know more about design, these videos may be especially helpful for you.

Also, this counts as the official announcement: I will be making Unread for iPad. Duh.

Watch the first video here. You can also subscribe to the RSS feed of the series.

|  26 Feb 2014