The iPhone is a gateway Apple product — April 3, 2010

The iPhone is a gateway Apple product

I bought an iPhone a year and a half ago. This made me really want to develop an iPhone app — something I’ve not yet done, but which I intend to start very soon. [1].

Now, the thing about the iPhone’s UI, which I don’t think you can fully grasp until you’ve actually used one, is that nearly everything — at every scale — works as it should. There is not a single sharp corner left in the product; everything has been rounded for your pleasure. The first place you see this is when you scroll to the end of a long list. When you hit the end, the iPhone doesn’t jarringly stop there. Instead, it bounces you, as though you just ran into a rubber wall on the way to catch a fly ball in the outfield.

It turns out that there is *nothing* jarring in the iPhone. If you’re rocking out to some tunes and a call comes in, the iPhone doesn’t just turn off your music and start ringing. Instead it gradually fades out the music, then starts ringing. When you’re done with the call, it gradually fades the music back in. Nothing about the product will ever put you ill at ease. That’s why I say you have to use it to understand this: in principle, written out like that, it seems like most products should and do behave like that, right? But they don’t. Getting all the details right — every detail, at every scale — is apparently so difficult that virtually no one does it. You really don’t notice how rare it is until you find yourself absolutely pleased with the iPhone, in a way that you’ve never been pleased with a piece of consumer technology before.

Having decided to do iPhone development, my terrific employer very graciously offered to buy me a MacBook Pro. The first couple days were a little difficult for me: I do a lot of command-line stuff, so I needed to get MacPorts or Fink going. And I had to get used to all the Mac OS X keyboard shortcuts.

With that out of the way, I fell into the same feeling of comfort with OS X that I have with the iPhone. The first step was realizing that every piece of the Mac UI is exactly as it should be. The second step, having gained such confidence in Apple’s UI design, was to ponder how I would do something in OS X, then ask, “If everything worked as it should, how would I perform this task?” It turns out, uniformly, that OS X’s UI always behaves the way it should. This gives you the confidence, as a friend pointed out to me last night, to go forth and try new things, and to really engage with the product in a way that you wouldn’t with some (forgive me) Microsoft piece of shit.

The first time this really took hold for me was when I asked whether I could plug my iPhone headset into my MacBook Pro and use it there the way I use it on my iPhone. For those who don’t know, the iPhone headset has a little clicky piece that performs two functions: it’s the microphone through which you carry out phone conversations, and it’s a control device for iTunes on the phone. Click the microphone once to pause the music you’re listening to or hang up the phone call you’re on; click it twice to advance to the next track. (It probably does other things as well.) If Apple designed its products the way you should expect (but which you’ve come *not* to expect from any consumer-electronics company), you should be able to pause iTunes on the laptop, advance to the next track and so forth using the iPhone headset. It turns out that you can do exactly that. And I’m not even using an Apple-manufactured headset: I’m using an incredible pair of Sennheiser MM 50 earbuds. It must just be that Apple requires single clicks to issue a certain signal and double-clicks to issue another, which both the iPhone and the MacBook Pro are programmed to respond to in the same way (namely firing off an event in iTunes). I don’t trust any other company to manage this amount of integration.

Stephanie and I discovered yesterday that there’s an app called Keynote Remote that lets you control Apple’s presentation software from your iPhone via WiFi. This is integration that everyone can use, and of course it helps Apple: the more Apple products you buy, the more value you get out of any one of them.

I’m probably going to buy a Time Capsule, which (so I gather) is so thoroughly integrated with OS X that you never even have to think about backing up; it just does it automatically. I gather that you could use other remote-backup devices in place of a Time Capsule (I believe the Time Machine software works with any number of devices), but — again — experience shows that Apple has integrated its devices spectacularly well; why would I want to use anyone else’s? Yes, I know that this is Kool-Aid drinking, but it’s Kool-Aid drinking based on a lot of positive experiences.

The final step in Apple fanboydom is to proselytize, which I unashamedly do now. But it’s proselytizing to those who could actually get a lot out of the product. Take my girlfriend, for instance (not literally; I enjoy dating her). She needed to make a movie on her ThinkPad, running Vista, so she used the built-in Microsoft Movie Maker. She spent a large fraction of a day trying to convert from the QuickTime-formatted movie that nearly every point-and-shoot camera generates to something that Movie Maker could process. Having never used iMovie, I nonetheless knew its reputation as the product you use when you want to make movies. So I brought the MacBook Pro up to New Hampshire one night, we plugged her camera into the USB port, and within a minute she was editing video. 24 hours later, she had bought a MacBook Pro of her own. People want to get shit done; they don’t care that Microsoft lacks QuickTime support because it wants to screw one of its competitors.

As a friend pointed out: Apple knows that you want to look cool. Even if Microsoft had made it easy to import .MOV files into Movie Maker, you know that it would have botched the execution after that; you would not look cool when it was done. It would offer you “wizards,” which would lead to very boring videos resembling animated PowerPoint. And those wizards would somehow, miraculously, not make your life any easier. They’d be a needless abstraction piled on top of a crummy user experience. Apple would fix the user experience so you wouldn’t *need* the wizard.

A coworker was giving me some good-natured ribbing the other day about using a Mac. He, like me, grew up during the Mac-versus-Windows wars of the early 90s. News flash: those wars are over, and the Mac has unquestionably won. I would be shocked if anyone who’s considered the matter actually believed that Windows was more usable, or more technically well-assembled, than OS X. (Though I’m fairly certain that Windows is easier to manage for enterprise installations than either OS X or Linux. But that’s not the realm that my coworker was arguing in.)

If there is still an OS battle going on, it is Linux-versus-Mac. But that battle has nothing to do with UI; again, no one could seriously assert that Linux’s UI is better than Apple’s. If there’s a Linux-Mac battle, it’s a battle over the open Linux model versus the closed OS X model. Windows is not seriously in competition with OS X for its end-user experience; it succeeds because it has succeeded. Windows is the Martha Coakley of operating systems: you hold your nose and use it because you have to, not because you want to.

[1] — One thing I’ve realized about my work style, and maybe about work styles more generally, is that I need to get something utterly trivial but functional done ASAP, and can move from there to getting something real working. As of now, I know nothing about iPhone development, so the field seems vast and intimidating. The point is to kill that feeling of intimidation as fast as I can. The way to kill it is to just get something, anything, done in the platform so that it no longer seems beyond my grasp. Had I used this technique in college, I think I would be a far better mathematician than I am.

Reasons to maybe not feel entirely confident when flying Bahamasair —

Reasons to maybe not feel entirely confident when flying Bahamasair

Stephanie’s and my Bahamasair flight from Stella Maris to Nassau was half an hour late yesterday (I’ve decided to use the phrase “Bahamian efficiency” from now on), so I had time to examine the airline’s new statement of principles on the check-in room’s wall. Their principles, in order, are

* Safety
* Security
* Regulatory compliance
* Quality

A few paragraphs down, the airline affirms that these are their principles, *regardless of how the airline behaved in the past*.

First of all, you have to arch your eyebrow a little bit at the presence of “regulatory compliance” in that list. I have a number of principles, which I adhere to inconsistently, but “abiding by the law” is one that I don’t feel it necessary to list; I take that one for granted.

Secondly, the regardless-of-the-past clause seems like the sort of thing you write while walking away from the smoking hulk of one of your aircraft. “Fresh start,” you say to yourself while dusting the soot off your clothing and bandaging your bloody calves. “Yessir, Bahamasair is a *new company*, starting right now … not that we had much choice, given that our only plane is disappearing beneath the North Atlantic even as we speak. STILL, though! New company. Yep.”

We made it back to Nassau in one piece. I’m pretty sure the Stella Maris-to-Nassau plane was the smallest such vehicle I’ve ever traveled on: I had to fold my body in half to fit under the ceiling on the way to my seat. If you’re a ten-year-old child, though, you will have no problem at all flying in a Bahamasair plane.

(I wish the Bahamasair principles document were on the web, but it sadly appears not to be.)

T-shirt idea — March 26, 2010
Three progressively better ways to generate a random string in Python — March 23, 2010

Three progressively better ways to generate a random string in Python

Version 1 here is what I started with. Version 2 comes from a colleague, version 3 from another colleague.
Version 4 just makes things a little more succinct.

I enjoyed watching this simple function get cleaner as the days went by.

#!/usr/bin/python
import random
import string

def random_str_1(n):
“””
Generate a pseudorandom string of
length n.
“””
out_str = “”
letters = [‘a’,’b’,’c’,’d’,’e’,’f’,’g’,’h’,’i’,’j’,’k’,
‘l’,’m’,’n’,’o’,’p’,’q’,’r’,’s’,’t’,’u’,’v’,’w’,’x’,’y’,’z’]
for i in xrange(n):
out_str += random.choice(letters)
return out_str

def random_str_2(n):
“””
An improvement, using the fact that Python
strings are iterables that iterate over their
characters.
“””
out_str = “”
letters = ‘abcdefghijklmnopqrstuvwxyz’
for i in xrange(n):
out_str += random.choice(letters)
return out_str

def random_str_3(n):
“””
A further improvement, using an existing
library attribute.
“””
out_str = “”
for i in xrange(n):
out_str += random.choice(string.ascii_lowercase)
return out_str

def random_str_4(n):
“””
Adding a bit of concision.
“””
return “”.join([random.choice(string.ascii_lowercase)
for x in xrange(n)])

def test_all():
“””
Not really much of a unit test. Just confirms that
each of the generated strings is as long as specified.
Doesn’t test that strings are sufficiently random.
“””
methods = [random_str_1, random_str_2, random_str_3, random_str_4]
for n in xrange(40):
for method in methods:
out_str = method(n)
assert len(out_str) == n

Stop going off about the public option — March 22, 2010

Stop going off about the public option

Sorry to be so negative, but really: people just shouldn’t be getting pissed about the absence of a public option, for at least three reasons:

1. Even with a public option, we always would have needed to address subsidies for those with low incomes. People are welcome to chime in with other information here, but the public option does not address affordability at all. It addresses the quality of insurance. Subsidies were always the bigger deal.
2. *We got coverage for 32 million people*. We got *affordable* coverage for 32 million people. We got coverage that *saves 32 million people from health-care-related bankruptcy*. Liberals of a certain stripe have gotten monomaniacal about their preferred policy, rather than focusing on the end goal — which is *to help people who couldn’t afford good health insurance to afford good health insurance*.
3. Now we have something that we can fix. Before we had nothing. New entitlements don’t disappear, as David Frum has now-famously pointed out. Entitlements get better. So let’s make this one better.

This has been, in some ways, a great hour for the Left. In other ways, it has revealed them to be monomaniacal public-option fetishists. Now is not the time to continue the fetish. Now is the time to consolidate our gains and *keep moving forward*. You want a public option? Great! You’re closer to a public option than you were a year ago. So go get it. Donate to candidates who support it. Call Bernie Sanders’s office and ask what tactical advice he’d give. Don’t act like an armchair quarterback and complain that the big bad U.S. Congress with its big bad traitorous liberals didn’t give you what you wanted.

History is written by the winners; history also exalts the winners — March 21, 2010

History is written by the winners; history also exalts the winners

If this health-care-reform thing happens, people will find Reasons Why It Happened. Look at what happened when Scott Brown won in Massachusetts: people tried to look for a Large Trend or whatever that explained why the Republicans were taking over. Brown won with 52% of the vote — certainly a solid lead, but not exactly a landslide. Many things could have caused a three-percent swing in votes. Coakley could have been a better candidate, for instance. But once Brown won, journalists had to opine on What It All Means — because it had to Mean Something.

Now here we are on the eve of what looks like the greatest progressive victory since Medicare. I, for one, am incredibly excited. I’m excited both because 32 million of the least fortunate Americans will have a safety net beneath them that’s a bit stronger; and because I hope that this will energize progressives toward future victories.

So now the press will have to come up with explanations. Health reform succeeded because Nancy Pelosi is one of the greatest Speaker in House history, for instance. The Republicans failed because the Tea Party movement, while important, was ragtag and ill-focused. Etc.

But we were all alive over the last year. We saw where this could have failed any number of times. It could have failed if House Democrats had fallen apart after Scott Brown’s victory, as it looked like they would. It could have failed last summer if the Tea Party thing had freaked people out more than it did. Had it failed at any of those moments, the press would be looking for reasons. Nancy Pelosi would still be the Speaker, but now she’d be the worst Speaker in House history — squandering a massive lead, etc., etc. Flip a few Congressmen the other way, and suddenly the narrative changes massively.

I’m not saying that this victory — should it happen — is entirely arbitrary; of course it’s not. What I *am* saying is that, if it were as inevitable and foreordained as the narrative will make it out to be, then no one would have panicked over the last year.

I like simple explanations as much as anyone else. I like, for instance, the Larry Bartels model that predicts presidential elections on the basis of macroeconomic factors like the unemployment rate. So far as I know, there’s no such model predicting victory in this health-reform debate. The only explanations that people can advance are post-facto ones.

Which doesn’t bother me a bit, in this case. My side looks like it’s going to win. (If it doesn’t, I will do the appropriate amount of crow-eating.) If this will have any effects, they will be positive effects for my side. Victory is like that.

What I’m curious about is how long-lasting the effects of a victory — any victory of this magnitude — are. It’ll help us, but for how long?

What would people like to attack after this? Financial-system reform?

The abridged O Ya report — March 18, 2010

The abridged O Ya report

Stephanie and I went to O Ya last night, one of the items on the Laniel 2K10 Post-Full-Time World Dominance (aka Y’All Just Rentin’ This World From Me) Tour. [1] [2] I hope it’s not gauche of me to sum it up as “good, but not $267.56-per-person-with-drinks-and-tax-and-tip good.” I mean, a meal has to be pretty over-the-top good to be worth that. I’ve not yet had a meal at that price range that justified itself.

The last time I was in that price range was at L’Espalier, where the meal ended up costing about $750 in total for two people — so far above and beyond the realm of the comprehensible that we could only laugh. In fact Stephanie and I laughed about that one for the next 20 minutes as we walked away from the place. And the food wasn’t even that outstanding: of the 10 or so courses that L’Espalier brought us, two were really outstanding; they overwhelmed us with tastes and textures flowing over our palates more quickly than we could process them. There was smoky, crunchy, popping, astringent, smooth, fatty, liquid, and dense, all at once. This little one-ounce morsel was something I wanted to spend the next hour eating, though it would still have left me in the same dazed state.

But still, I must return to the moral: $750 for a meal that was 20% overwhelming?

O Ya was similar, though less absurd for a couple reasons. First, I knew going in that it would cost about what it came to. Second, O Ya doesn’t try as hard to make you think that you’re having a Fine Dining Experience: rather than L’Espalier’s sumptuous opulence, O Ya looks like a relaxed Japanese bar. O Ya’s exterior door is, on first glance, so dingy-looking that I assumed it was the entrance to a run-down warehouse rather than to an exalted restaurant. (On closer inspection, the door is supposed to remind you of the entrance to a humble Japanese home. It’s a very nice touch, in retrospect.) Inside, they’re playing rock music, and the chef is bouncing his head in time with the music.

The chef, I should note, isn’t doing all the things you expect a sushi chef to do: he’s not assembling rice balls or cutting large filets of fish from a newly dead animal; those jobs are left to the servants, who are off in a mostly obscured kitchen. They would periodically come out and receive a scornful glance from the chef, who clearly functions as the prima donna in this opera.

Anyway, to the food: 16 courses, each two bites (one for me, and one for my lovely dining companion). Most were standard sushi-sized pieces of fish, drizzled with oils, topped with preserved Japanese oranges, and so forth. They were delicious. But (and again, I feel like a clod for saying this) not $500 delicious. One particular dish was a few pieces of Japanese beef, seared, dressed with just the right amount of salt, and served atop a special (artisanal? heirloom? sous vide?) potato chip. This dish on its own was $61. There is just no reason for that.

I wish I didn’t have to spend this much time discussing the money aspect. I actually didn’t spend much time during the meal thinking of it: I knew going in that it would cost that much, and I didn’t want to spoil the mood. Plus I was there with my girlfriend, who is my favorite dining partner in the world [3]. And in one or two cases, the dishes were so good that my eyes actually rolled back into my head. But for $500, your eyes should do something even more awesome, like evaporate and re-coalesce, or colonize Mars.

Honestly, if you’re looking to have a really special meal around here with a loved on, there are better bets: Craigie on Main for extraordinary food (Excuse me? 10-course vegan tasting menu?) in a boisterous atmosphere with some of the best cocktails in the city; Oleana for a more subdued, self-consciously exquisite meal; or Number 9 Park if you want to go all out.

When O Ya sets its prices that high, it gives itself an entrance exam that it then proceeds to flunk.

[1] – Uh, yeah, I might could have mentioned that they hired me full-time.

[2] – We’re going to the Bahamas at the end of this month — the second bullet on the Y’all Be Rentin’ Tour.

[3] – You also will never find a better person with whom to watch a movie on the big screen. There’s a particular “Stephanie’s jaw agape” photo that I’ve surreptitiously taken five or ten times now in the theatre; it never ceases to make me smile.

Vindication, then and now —

Vindication, then and now

On the elevator up to work today, I saw a headline that Obama says he’ll be vindicated for the choices he’s made on health care and financial reform.

To review: President Bush starts an unnecessary war in which thousands of Americans die and we literally detonate $3 trillion. Obama picks up a financial crisis that started on Bush’s watch, then helps to push through health reform that will cover 30 million of the country’s least fortunate while reducing the long-term deficit.

Now then: which of these two would you guess has to worry about how history will view him?

The MBTA doesn’t want my money — March 15, 2010

The MBTA doesn’t want my money

One thing I’ve always found weird about the T is that you can’t buy a monthly pass whenever you want. Suppose that on the last day of February, I decided that I wanted to get a monthly pass for February. That’s $60. Surely no one in his right mind would do that, right? But suppose I wanted to. Why would the MBTA stop me from giving them $60 for a day’s worth of rides?

Likewise, I have this habit where, if I get a small windfall (a particularly large contracting check, say), I try to find upcoming expenses that I should pay so that the money doesn’t burn a hole in my pocket. So I was in the T station the other day and decided that I’d put April’s T pass on my CharlieCard. The machine told me that I couldn’t do this, because only tickets up to March were available.

Suppose I wanted to buy passes a year in advance. Why wouldn’t the MBTA want that? They’d get about 720 of my hard-earned dollars, which they could put in a bank and earn interest on. I guess they’d have to add a bit more code to their kiosks, but that seems like a small price to pay.

While they’re at it, how about allowing recurring payments through their website, so that I don’t even *have to* interact with their kiosks?

Oh, and also: how about having their commuter-rail-ticket-dispensing machines ask you which *town* you’re going to, rather than which *zone?* I have no idea which towns are in which zones.

Arguing the World — March 12, 2010

Arguing the World

I just watched this; terrific stuff. It follows four New York intellectuals — Irving Howe, Irving [father of the omnipresent William] Kristol, Daniel Bell, and Nathan Glazer — from their meeting at City College of New York in the 40s to the present day. Glazer, Kristol, and Bell all curved off into one form or another of conservatism, while Howe remained until the end the strident liberal. But what’s spectacular about this film, and really sets it apart from any other movie I’ve seen, is that it refuses to take sides against any of these men. It wants to trace their failures and their achievements to their roots as disputatious New York Jews, while still trying to understand how men could come out of the Sixties with such different feelings toward politics and ideas. Really a terrific film. (And I submit that it’s impossible to come away from [film: Arguing the World] without a little crush on Irving Howe — particularly given the impish smirk he gives the camera just before we find out that he’s died.)

__P.S.__: Hat tip to Hendrik Hertzberg, from whom I learned about this excellent movie a few months back; it just floated to the top of my Netflix queue recently.