inessential by Brent Simmons

July 2012

Copying Search URLs from Safari

I upgraded to Mountain Lion on my laptop. (But not on my desktop development machine yet, just due to healthy pre-shipping-paranoia.)

I wasn’t sure what I’d think of the new combined address/search bar in Safari. I’m skeptical when software tries too hard to divine my intentions. Past experience has shown me that software often gets it wrong, and it becomes very difficult to make it do what I want.

But — at least so far — I’ve been happy with the new address/search bar. It does figure out what I want to do.

I did find an unexpected problem, though: I wanted to give somebody else the URL of a Google search I just did. And I couldn’t.

Screenshot showing Safari’s search/address bar

I asked on Twitter. One way is to drag the magnifying glass into whatever text I’m editing. Another way would be a bookmarklet that gets the current page location. A third way would be an AppleScript script.

I ended up writing a Python script.

Now I can just switch to Terminal (cmd-escape on my machine, thanks to FastScripts), start typing the name of the script, hit Tab, then paste in my search results. (No need even to put them in quotes.) Hit return, and then a search string is on the clipboard.

So it’s not that bad. At least for someone like me who’s only a split-second away from the Terminal at all times. But it’s not nearly as nice as just copying the URL out of the address bar.

It’s weird that the address bar doesn’t always include an address. It feels like a contract has been broken. Maybe it’s one that needed to be broken. (And maybe not.)

Update 11:30 pm: I like Andy Lee’s script and Dominik Porada’s additions.


Every iOS developer has seen the word “purple” in stack traces.

No Stars

I’ve never seen an app go so dramatically bad as the latest update of Scrabble for iPhone. (Don’t get it; don’t update if you have an earlier version.)

It had an average four-star rating across all versions. But look at the ratings for the current release.

1,132 one-star ratings for Scrabble 3.0

The new version feels like a UIWebView app — that is, I think it’s mostly HTML, CSS, and JavaScript. The old version — which wasn’t perfect, but was playable and fun — felt like a native iPhone app.

I’m tempted to say that there’s a truth here, that UIWebView-based apps always suck. But I’m not sure that that’s really the problem — the problem is that it’s a really, really sucky UIWebView-based app.

The biggest issue is that the main game play is super-difficult. It’s hard to read and hard to manipulate.

I would love to write a Scrabble game for people who love Scrabble. Get a great designer who loves words (Neven Mrgan would be choice one). Imagine how awesome it could be! But I’m not going to write that game, or any other.

In the meantime, I wish I could give this version zero stars.

It’s the only iPhone game I play.

(Commence the sighing.)


I usually don’t care about the differences between nil, null, and just plain empty data — it amounts to the same thing. RSIsEmpty works on NSString, NSArray, NSSet, NSDictionary, and NSData.

RSStringIsEmpty is just an optimization for when I know for sure it’s a string.

Hardly earth-shattering code — but useful, and I use these all the time.

Geek Rules

John Scalzi explains who gets to be a geek (anybody) and the difference between geeks and hipsters:

Many people believe geekdom is defined by a love of a thing, but I think — and my experience of geekdom bears on this thinking — that the true sign of a geek is a delight in sharing a thing. It’s the major difference between a geek and a hipster, you know: When a hipster sees someone else grooving on the thing they love, their reaction is to say “Oh, crap, now the wrong people like the thing I love.”

Okay Atomic

I have habitually declared my properties as nonatomic. Exceptions are extremely rare.

Since atomic is the default, I have to do this:

@property (nonatomic, strong) NSString *foo;

But it occurs to me now that switching to atomic will not be a performance issue. It makes sense to stick with nonatomic for things like Core Data objects — but it isn’t really needed for things like IBOutlets and other properties that are not frequently set.

Since it isn’t really needed in those cases, I could just go with the default and save myself a little typing and a little code.

@property (strong) NSString *foo;

Hmmm. Looks naked, but I could get over that.

Update 3:12 pm: I just learned that strong is the default for properties since Xcode 4.3.

Which means I could do this:

@property NSString *foo;

I like less code. It looks shocking to me — scandalous, even — but I’d adapt.

Update July 17, 2012: I just couldn’t do it. I’m sticking with nonatomic — and still declaring explicitly as strong.

Dave on Twitter

Scripting News: Twitter is a Corporate API.

Cocoa Development Board

The Cocoa Development board on Glassboard has a new invitation code: COCOA. (Case-insensitive.)

I have no idea if Glassboard is a good medium for these kinds of discussions. So we’ll find out. (I think the in-beta web app helps, since we’re at our desks when coding, and since it’s tough to type coding questions on a phone.)


Now there are hot tub boats.

As my co-worker Brian pointed out — take a boat and fill it with water: isn’t that called “sinking?”

NSCoder Online

There’s a virtual NSCoder night via Google+ Hangouts.

Quote to file under slightly-funny-sign-of-the-times:

Sadly, because apparently humanity has reached the point where any public video conferencing service eventually devolves into Chat Roulette, we have to restrict access to these sessions. We do this by having a special circle of friends with whom the hangout session is shared each week.

This doesn’t mean that we restrict access to anyone with a legitimate interest in Objective-C. We do this simply to keep the signal-to-penis ratio up.

Mike Lee on Complaints Developers Have

In an interview with Business Insider, Mike lists some complaints. The one I think is most important: “iOS developers feel completely cut off from their customers.”


If I have a customer who is unhappy with my app for any reason, the customer should be able to write me telling me they have a problem. And if somebody doesn’t like my app, I should be able to give them their money back.

Clipstart 1.5 Out

Manton Reece released Clipstart 1.5. It’s no longer on the Mac App Store, unfortunately.

Also: Manton provides a discount code. Today is a good day to buy software. (Like every day, yes.)

Facebook and Your Address Book

Matt Galligan asks:

What in God’s name was Facebook thinking when they defaulted everyone’s publicly facing email address to their address?

New Pixel

Black Pixel Welcomes Michael Jurewitz.

So cool. Congratulations to all!

Tim on San Francisco

Tim Bray’s sad story (scroll down) reminds me that while I love San Francisco I’m just not used to having my heart hurt so often.

Hawking in Seattle

Stephen Hawking on time travel, M-theory, and extra terrestrial life:

Do I believe that there is some government conspiracy to conceal the evidence and keep for themselves the advanced technology the aliens have? If that were the case, they aren’t making much use of it

I wish I had seen this.


My brother-in-law’s sister is doing a very awesome thing: the Rêve tour, which follows the same course as the Tour de France.

In what we believe will be a first for women’s cycling, a team of six amateur women will take on the ultimate road cycling challenge of a complete grand tour. Starting in Liège one day ahead of the pro peloton our riders will complete the entire parcours of the 2012 Tour de France arriving in Paris on the 21st of July. In the process they’ll prove to themselves, other female cyclists, and women thinking about taking up the sport, that any bicycle dream is possible.

She’s tweeting as she goes.