Archive for November 30, 2012

Friday, November 30, 2012

Elevation Dock With Lightning Adapter

Marco Arment:

It’s even harder to remove the iPhone 5 from the Elevation Dock than I expected. It requires two hands almost every time, and it makes me want to throw the Dock out the window. The Lightning connector on Apple’s cables not only wasn’t designed for this use, but substantially hinders it.

Oh well. Is it possible to make an (official) Lightening connector that’s low-friction?

C and Objective-C Modules Proposal

Doug Gregor, who works on Clang at Apple (via Hacker News):

The C preprocessor has long been a source of problems for programmers and tools alike. Programmers must contend with widespread macro pollution and include-ordering problems due to ill-behaved headers. Developers habitually employ various preprocessor workarounds, such as LONG_MACRO_PREFIXES, include guards, and the occasional #undef of a library macro to mitigate these problems. Tools, on the other hand, must cope with the inherent scalability problems associated with parsing the same headers repeatedly, because each different preprocessing context could effect how a header is interpreted---even though the programmer rarely wants it. Modules seeks to solve this problem by isolating the interface of a particular library and compiling it (once) into an efficient, serialized representation that can be efficiently imported whenever that library is used, improving both the programmer's experience and the scalability of the compilation process.

There’s a PDF of his slides. This seems like a great idea that will improve compilation times while maintaining compatibility.

Update (2012-12-10): Here’s the thread on Lambda the Ultimate.


Colin Barrett:

Recently I had some free time so I broke down this enum situation and also included some of the history and present and also maybe even a little bit of the future of enumerated types in Objective-C.

Why Dave Winer Quit Netflix

Dave Winer:

I think Netflix missed the boat, bigtime. They could have been the place on the net to learn about and watch and share movie experiences. I think they could have started a type service. If you’re in a strange city and would like to go to the movies with someone with similar tastes, just click a few buttons. They were gathering all this information about people’s movie preferences. But they were reluctant to build systems around it. And reluctant to open it up to app developers. I think we all missed out on something, because movies at least to some of us are such an important form of personal expression.

I’m not exactly sure what Netflix should have done differently, but this resonated with me. When I joined the service in 2001, I rated movies and put every one that I wanted to watch in their queue. I saw it as an online database of my own movie information. That broke down some years later when I hit the maximum queue size and started augmenting it with a text file. Even with Ajax, managing the queue always felt cumbersome. And they never really built out the service in the way that I predicted. Why was there nowhere to add notes, such as why I had added a particular movie or what I thought of it? Why did their database and summaries remain so poor?

A few weeks ago, I deleted my entire Netflix queue except for the next few discs that I want to receive. I now manage the queue in a single text file. The new commands in BBEdit 10.5 make reordering easy. It syncs to my iPhone via Dropbox and WriteUp.

I still like Netflix the DVD-mailing service, though. The selection is top notch. The price, though higher than before, is still reasonable. With Blu-ray, the video quality is better than iTunes, except for some TV shows where Apple offers HD quality and only a DVD exists. You get commentary and other special features. You can keep the movie longer than 24 hours.

AirPort Settings for Best Wi-Fi Performance

Adam Fields:

I had previously had the radio mode set to all 802.11n, because I have a separate network for the few remaining 802.11g devices I have, and I thought I was benefitting myself by preventing the network from dropping down to g speeds to accommodate those devices. This turned out to be a counterintuitive mistake - if you lock the radio mode to 802.11n, it CANNOT achieve maximum throughput, and it cripples most modern connections. The only acceptable radio mode I’ve found is 802.11a/n - 802.11b/g/n (Automatic).


Geppy Parziale:

Now, wherever you need to send a signal to Instruments from your app, you just add this line of code:

DTSendSignalFlag("", DT_POINT_SIGNAL, TRUE);

You can also mark sections using DT_START_SIGNAL and DT_END_SIGNAL.

iTunes Through the Ages

Jacqui Cheng:

At the time of this release, the iPod had not yet made its public debut—that came later in the year. So those MP3s you were ripping? They were meant to be synced to some other MP3 player, such as those that were available from Creative Labs or Rio.

Look at that brushed metal window with Aqua buttons and a square Close box.

Restoring Apps From iCloud

Adam Fields:

However, as it turns out, if you have app syncing off, and then restore from an iTunes backup, what happens is this: you get a freshly restored iPad with all of your data, and exactly zero apps installed. Apparently, the ONLY way to get them back is to painstakingly go through your purchased list, figure out what you actually had installed, and bring them back one by one. And if you happen to forget something, you can end up with a lot of orphaned data in your Other section where the app’s data still exists on your iPad but the app doesn’t (the only way to delete that data is to magically figure out which app it might be, reinstall it, and then delete it again). Moreover, once you turn off sync apps, there’s no evident way to turn it back on again without completely wiping the list of apps that are already on your device and starting fresh.


Ian Delaney (via Dave Nanian):

You install the app and use it to look at pictures in your gallery. As soon as you open a picture, you’re told to go to in any web browser (not the one on your phone!).

Point the phone camera at the QR code that appears on the website, tap it when it’s visible on the camera screen […] your photos are automatically transmitted to the website and shown on the screen without another click.

This Windows Phone app offers AirPlay-like photo sharing to any device with a Web browser—no extra hardware required.

An Objective-C Literal Subtlety

Adam Preble:

I would argue that this method should use -boolValue to check the options dictionary values, but I would also argue that this is something the compiler should be handling when it translates the literal syntax into an object. I’ve filed radars on both of these issues this with Apple (rdar://12761147 and rdar://12761621).

He found that GLKit checks the identity of NSNumber objects rather than their value and that @(YES) doesn’t have class __NSCFBoolean.