Archive for June 2011

Thursday, June 30, 2011

Final Cut Pro X FAQ


Can I purchase a volume license? Final Cut Pro X, Motion 5, and Compressor 4 Commercial and Education Volume Licensing will be available soon via the Apple Online Store for quantities of 20 or more. After purchasing, customers will receive redemption codes they can use to download the applications from the Mac App Store.

What about third-party developers?

Obligatory MobileMe Filtering

Mike Conley on MacInTouch (via Gary Robinson):

It’s fairly clear to me that Apple is silently filtering outgoing E-mail; no notice is given when a message is dropped. On what grounds they feel it reasonable to do this and using what criteria are not clear to me, but, as far as I’m concerned, there is simply no justification for this policy.

He also notes that, as of last summer, it’s no longer possible to turn off MobileMe’s junk filtering of incoming messages. This means that good messages can end up in a Junk mailbox even though SpamSieve didn’t think they were spam. If you care about your e-mail, you should have your own domain name. Otherwise you are at the mercy of a particular host’s policies and availability.

Update (2011-07-08): Cult of Mac noticed filtering of outgoing messages, too, and got confirmation from Apple that they spam-filter sent messages.

Pushing iCloud

Guy English:

iCloud builds on a single, high capacity, short message distribution system. Apple has called it “Push Notifications” before but, really, there’s a lot more to it than that. The advantage Apple gains from this isn’t apparent if you’re looking at software checklists — I’d bet there’s an Android announcement in a week or so that claims all the features iOS 5 promises. The thing is this, and it’s an important thing — always bet on the technologies that scale. […] Apple is now betting that multiple applications maintaining their own connections to disparate servers will end up performing poorly on mobile devices. I believe they’re right.

Designed for Use

Looks like a great new book by Lukas Mathis.

Designing GitHub for Mac

Kyle Neath:

Remember web development in 2004? When you had to create pixel-perfect comps because every element on screen was an image? That’s what developing for Cocoa is. Drawing in code is slow and painful. Images are easier to work with and result in more performant code.

He has an interesting perspective about the things that Cocoa makes much more difficult than you would think they need to be.

Saturday, June 25, 2011

The Future Is Disposable

Rich Mogull:

One of the most fascinating aspects of this transition is a return to the days where our devices don’t matter. As not only our data, but our applications and settings migrate and synchronize across the cloud, we are no longer tied to the anchors sitting on our desks or carried in our bags. While we aren’t fully there yet, we’re close to being able to move from device to device and maintain the functionality and familiarity we need.

I had a similar feeling of invincibility until I discovered this morning (through a failed EagleFiler verification) that one of my files was damaged. I logged into CrashPlan to retrieve an older version from the cloud, but it was unable to search for or restore any of my files:

Unable to restore due to a backup archive I/O error.

I’ll update this post when I hear back from CrashPlan technical support. I had recently stopped using Time Machine because, through various drives and enclosures, it was failing with the error:

Error: (-50) Creating directory Backups.backupdb

I had also briefly tried backing up to a Time Capsule before finding that, even after the initial slow backup had completed over Ethernet, it was causing various applications to lock up for 20 minutes at a time while mds was apparently indexing the backup (even though it was excluded from Spotlight).

So the backup situation is not as solid as I thought, although I can probably find a reasonably recent version of that file on an off-site SuperDuper clone.

I’ve just starting experimenting with Arq to back up my most important files to Amazon S3. I don’t want to pay what it would cost for a full backup this way, though.

I’m also considering using CrashPlan with a directly connected hard drive as a Time Machine alternative for storing versioned files.

Update (8:20 PM): I have not yet heard back from CrashPlan support, but I tried the restore again and was able to browse and search all my files. I was able to find the file in question and restore a version of it from a few weeks ago that had the proper checksum.

Update (2011-06-27): CrashPlan technical support recommended clearing my CrashPlan cache data by clicking the logo and entering the command “backup.replace 42”. So apparently they don’t think there was any problem in the data center.

Update (2011-06-30): Amazon has announced that they are no longer charging for inbound data transfer, which should make S3 more affordable for backups.

Tuesday, June 21, 2011

Lazy Evaluation in Objective-C

Rob Rix:

Applying the runtime techniques we described above yields a function, TESSValueize, which takes a block and swizzles it to be a member of a subclass (dynamically created if it does not already exist), copying in methods from the TESSValue class which conforms to the TESSValue protocol (remember that protocols and classes have different namespaces).

Dropbox Authentication Bug

Arash Ferdowsi:

A very small number of users (much less than 1 percent) logged in during that period, some of whom could have logged into an account without the correct password.

It sounds like there was a four-hour window in which anyone could access your account. I’m not exactly sure what “very small” means here. Doesn’t Dropbox have more than 25 million users?

I still think Dropbox could be more transparent. In the past, they posted important stuff only in the private forum. This was posted on the public blog, but people who would want to know about this don’t necessarily follow that. Customers should have been notified via e-mail.

More generally, I think every Web service should have a test suite to make sure that login authentication works, and users should be able to see a log of the IPs that have accessed their account.

Monday, June 20, 2011

gdb Tips and Tricks

Mike Ash:

Sometimes you simply want the debugger to print some information but not pause the program. This effectively allows you to add logging statements on the fly. To do this, simply put continue at the end of your breakpoint commands, and execution will immediately resume.

Saturday, June 18, 2011

History of Collaborative Editing

Martin Pittenauer (via John Gruber):

Martin [Ott] did research into if that was actually possible and found - beside other research - Xerox Parc’s Jupiter paper. I remember that we were all amazed by the simplicity and elegance of the approach. From that we started work in early 2003, finishing 1.0 of Hydra (now called SubEthaEdit) just 8 weeks later, eventually winning the ADA later that year.

Kindle Periodical Improvements

Two longstanding Kindle problems have been that, unlike with books, magazines could only be downloaded onto one device. Secondly, you could keep old issues as long as you want, but if you upgraded your Kindle (or needed to replace it for some other reason) you could not transfer the kept issues. Andrys Basten reports that Amazon has made some improvements recently. It is now possible to download current issues onto multiple devices—i.e. Kindles or Android devices, since the iOS and Mac clients don’t support periodicals. Additionally, old periodical issues that were purchased individually (not via subscriptions) can be re-downloaded at will. Ideally, magazines and newspapers would work just like books—you’d be able to get any issue that you’d purchased, complete with your notes and highlights, at any time—but this is at least some progress.


Greg Parker:

The compiler knows which selectors are optimized by the runtime. It compiles the call site differently, calling objc_msgSend_fixup via a function pointer. At runtime, objc_msgSend_fixup replaces the function pointer with one of the objc_msgSend_vtable functions, if the called selector is one of the optimized selectors.

Update (2014-06-25): objc-runtime-new.m (via Colin Wheeler):

* vtable dispatch
* Every class gets a vtable pointer. The vtable is an array of IMPs.
* The selectors represented in the vtable are the same for all classes
*   (i.e. no class has a bigger or smaller vtable).
* Each vtable index has an associated trampoline which dispatches to 
*   the IMP at that index for the receiver class's vtable (after 
*   checking for NULL). Dispatch fixup uses these trampolines instead 
*   of objc_msgSend.
* Fragility: The vtable size and list of selectors is chosen at launch 
*   time. No compiler-generated code depends on any particular vtable 
*   configuration, or even the use of vtable dispatch at all.
* Memory size: If a class's vtable is identical to its superclass's 
*   (i.e. the class overrides none of the vtable selectors), then 
*   the class points directly to its superclass's vtable. This means 
*   selectors to be included in the vtable should be chosen so they are 
*   (1) frequently called, but (2) not too frequently overridden. In 
*   particular, -dealloc is a bad choice.
* Forwarding: If a class doesn't implement some vtable selector, that 
*   selector's IMP is set to objc_msgSend in that class's vtable.
* +initialize: Each class keeps the default vtable (which always 
*   redirects to objc_msgSend) until its +initialize is completed.
*   Otherwise, the first message to a class could be a vtable dispatch, 
*   and the vtable trampoline doesn't include +initialize checking.
* Changes: Categories, addMethod, and setImplementation all force vtable 
*   reconstruction for the class and all of its subclasses, if the 
*   vtable selectors are affected.


At the program startup, the message reference trampolines are pointers to the objc_msgSend_fixup function. For each message_ref, when its trampoline pointer is invoked for the first time, objc_msgSend_fixup gets called receiving the obj to which the message’s got to be sent and the message_ref structure from which it was called. So, what objc_msgSend_fixup must do is get the selector for the message to be called. Since, this has to be done only once for each message reference, objc_msgSend_fixup must also replace the trampoline field of the ref by a pointer to another function that doesn’t fix the message’s selector. This function is called objc_msgSend_fixedup (the selector has been fixed up). Now that the message selector has been set and this doesn’t have to be done again, objc_msgSend_fixup just calls objc_msgSend_fixedup and this just calls objc_msgSend. After that, if a message ref’s trampoline is called again, its selector is already fixed, and objc_msgSend_fixedup is the one that gets called.

Wednesday, June 15, 2011

What We Talk About When We Talk About RSS

Brent Simmons:

Here’s what I think is actually dead: the notion that software that makes you subscribe to feeds that you run across in your browser will ever cross the chasm.

It’s not entirely clear to me why this is, because it doesn’t seem much different from following someone on Twitter, but this does seem to be the case.

Automatic Reference Counting

Apple has now posted some ARC documentation. I love the idea of full garbage collection in principle: less code, fewer crashes, and potentially higher performance. However, due to backward compatibility, iOS, and concerns about bugs in the system frameworks, I have so far only adopted it in a few plug-ins. Automatic reference counting seems to promise the same three benefits to a slightly lesser extent, plus lower memory use, and without the drawbacks. (And the deterministic behavior seems to work very well in Python.) So I think this is a good direction for Objective-C. Overall, though, I tend to agree with Andrew Abernathy:

From my perspective, most obj-c devs think manual ref counting problems overblown, problems of alternatives under-appreciated.

Between autorelease pools and accessors, I don’t have to think about memory management much, and it has not tended to be where I write my bugs.

Update (2011-06-16): Lots of good information from Apple’s Chris Lattner.

Tuesday, June 14, 2011

Citi Accounts Were Hacked via URL

The Consumerist (via Matt Gemmell):

Basically after you logged into your account as a Citi customer, the URL contained a code identifying your account. All you had to do was change around the numbers and boom, you were in someone else’s account.

The New York Times:

The method is seemingly simple, but the fact that the thieves knew to focus on this particular vulnerability marks the Citigroup attack as especially ingenious, security experts said.

One security expert familiar with the investigation wondered how the hackers could have known to breach security by focusing on the vulnerability in the browser. “It would have been hard to prepare for this type of vulnerability,” he said.

If this is what it sounds like, it’s absurd to call it a vulnerability in the browser, and neither ingenious nor hard to prepare for.

iOS 5 and iCloud

Lukas Mathis:

There still doesn’t seem to be a workable way of managing more than a few documents, and it’s still hard (or sometimes impossible) to move files from one app to another. But at least we won’t have to use iTunes to copy files to and from iOS devices anymore.

iCloud seems to do a good job of handling the most common case, and it’s certainly interesting from a developer perspective, but the scope is surprisingly limited. From the perspective of a user like me, OS-level support for Dropbox would have been preferable. I want to see the same documents in different apps and in a folder in the Mac Finder.

Also, we’ve heard a lot about the North Carolina data center, singular. The recent Amazon outage got a lot of press, and yet Amazon seems to be operating on an entirely different plane from Apple for availability and redundancy.

For some reason, Apple doesn’t want to use the word «synchronize». Gruber thinks it’s because there’s only one official data storage, the one in the cloud: «As Jobs put it on stage, iCloud’s data is “the truth”. This means no conflicts or merging.» But I don’t understand how having cloud data avoids conflicts.

This is the other elephant in the room. Calendars and contacts can sync and merge, but those are built-in apps that already had their own special support in Apple’s cloud. Apple did have a (troubled but improving) cloud syncing API in Sync Services and MobileMe, but to my knowledge there has been no official statement about whether this (or even iDisk) has a future.

iWeb, apparently, does not, and it’s not clear what will happen to MobileMe Galleries. Their predecessor, .Mac Homepage, has already been shut down. With a track record like this, I can’t see recommending an Apple service for hosting photos or Web content.

Also, double-tapping the home screen will allow you to jump directly into the camera app, similar to WP7.

It was probably one of the easiest features to implement, but my guess is that this and the volume shutter button (first seen in Camera+) will be my favorite improvements in iOS 5.

I still think webOS does the best job with its multitasking UI, and I wish Apple would just do multitasking in iOS the same way.

The iOS task switcher is unpredictable enough that I find myself going to the home screen rather than double-tapping the Home button. Since the switcher uses app icons rather than thumbnails, it doesn’t feel like a switcher, anyway—more like a DragThing dock for launching recent apps.

Update (2011-06-14): InfiniteApple says that iCloud is partially built atop Windows Azure and Amazon Cloud Services, which seems like a good idea to me.

Update (2011-06-24): Apple has posted some more information: no iDisk, no iWeb publishing, no photo gallery, and no keychain/Sync Services syncing.

Update (2011-09-05): The Register has more on iCloud, Azure, and Amazon AWS.

Friday, June 10, 2011

Hal Abelson Q&A

Peter Seibel interviews Hal Abelson about a variety of topics (via Hacker News):

Actually, when I was at Princeton, Knuth was visiting that year. If you remember, Knuth laid out the whole whatever it is, eight-volume, eight-book series. We found him walking around campus in ’68 and we said, “Hey, we’re undergraduates and we’re doing this project, and we hear that Volume 4 is going to be about compilers. We want to write a symbol table; could we use the manuscript for Volume 4 to do this?” Knuth said something like, “Well, it’s not quite done yet, but we’re really close. I’m sorry it’s not going to be in time for your class project.”

Thursday, June 9, 2011

App Store Subscriptions, Revised

With the June 30th deadline approaching, Apple has again changed the App Store Review Guidelines (via MacRumors). Previously, Apple required that all paid content be available via In-App Purchase (a huge technical hurdle) and that it not be available at a lower price anywhere else (a huge financial hurdle). The guidelines now say:

11.12 Apps offering subscriptions must do so using IAP, Apple will share the same 70/30 revenue split with developers for these purchases, as set forth in the Developer Program License Agreement.

11.13 Apps that link to external mechanisms for purchases or subscriptions to be used in the app, such as a “buy" button that goes to a web site to purchase a digital book, will be rejected

11.14 Apps can read or play approved content (specifically magazines, newspapers, books, audio, music, and video) that is subscribed to or purchased outside of the app, as long as there is no button or external link in the app to purchase the approved content. Apple will not receive any portion of the revenues for approved content that is subscribed to or purchased outside of the app

The rules for content and subscriptions seem to have essentially gone back to what they were originally. That is, you don’t have to support In-App Purchase, and if you do you can set your own price. Either way, you are not allowed to include a link to buy the content from your Web site.

In summary, apps like Kindle and Netflix can stay, but they’re not allowed to help you buy anything except via In-App Purchase. Amazon could theoretically offer one-tap book purchasing, and at a lower price, but Apple won’t allow that.

Sunday, June 5, 2011

Steve Jobs at WWDC 1997 Q&A

Steve Jobs makes some very insightful comments in this video (via MacRumors). I started watching the bit about NFS home directories, but pretty much the whole thing is gold. It’s funny how he keeps saying what Apple should do before adding, “But I don’t make these decisions.”

The Future of NetNewsWire

John Gruber interviews Brent Simmons and Daniel Pasco:

SIMMONS: Yes. The fun and glory of being there on Day One [of the iPhone and iPad App Stores] was undeniably attractive. How could it not be? If I went into further details which I can’t go into, anyone would agree that I had to do it. To not go for it, both times, would have been flat-out insane.

Yet it was still a mistake. It would have been amazingly hard to say, “No, sorry, I can’t do it.” It would have gutted me and disappointed other people that I wouldn’t want to disappoint. But it would have been the right thing to do. I just didn’t know it then.

NetNewsWire is one of my favorite Mac apps ever, however I’ve found that I don’t enjoy reading feeds on iOS (in either NNW or other readers). This is both because of the limitations of the smaller touch devices and also because Google Reader syncing has not worked well for me. So I prefer to “process” feeds on the Mac and send longer articles to Instapaper for reading on iOS or Kindle.

I have little experience with Black Pixel, but I’m glad to hear that they have big plans for NetNewsWire, and I’ll anticipate whatever Brent does next.

Trivia: NetNewsWire, Daring Fireball, Mac OS X Jaguar, SpamSieve, and this blog all debuted within about a month of each other in the summer of 2002.

Objective-C Blocks vs. C++0x Lambdas

Mike Ash:

By allowing each lambda to specify how it captures things, the C++0x system allows more flexibility. With Objective-C blocks, a given variable is either __block or it's not. Every block which captures that variable must capture it in the same way. C++0x lambdas allow each lambda to make its own choice on how to capture. The mutable keyword even allows them to capture by value but retain the ability to change the copied value internally. The downside is considerably increased complexity.

Drive Genius 3 LE

Prosoft (via Macworld):

Drive Genius 3 LE is a special App Store version of Drive Genius 3 which allows you to work on your external, non-startup drives.

The Depth and Breadth of Python

Guido van Rossum:

Python plays an important role in Dropbox’s success: the Dropbox client, which runs on Windows, Mac and Linux (!), is written in Python. This is key to the portability: everything except the UI is cross-platform. (The UI uses a Python-ObjC bridge on Mac, and wxPython on the other platforms.) Performance has never been a problem -- understanding that a small number of critical pieces were written in C, including a custom memory allocator used for a certain type of objects whose pattern of allocation involves allocating 100,000s of them and then releasing all but a few.


After abusing NSPredicate, Dave DeLong has moved on to writing his own parser in Objective-C. Number handling is via NSNumberFormatter and NSDecimal.

Nook Simple Touch

Marco Arment compares the new Nook with the Kindle 3:

The Nook can’t follow web links, since there’s no browser. The Kindle’s browser is awful, but it’s there if you need it. This isn’t a problem with most novels, but it’s relevant for many modern magazines and newspapers that are embedding links, and any content that originated as web pages (like Instapaper).

Any object registers as a “touch” on the screen, including clothing and blankets.

Amazon seems to have a much better catalog and ecosystem.

Thursday, June 2, 2011

ATPM 17.06

The June issue of ATPM is out:

Wednesday, June 1, 2011

It’s About the Hashbangs

Dan Webb (via John Gruber):

If you’ve implemented hashbang URLs at any point then want to change them without breaking links the only way you can do it is by running some JavaScript on the root document of your domain. Forever. It’s in no way temporary, you are stuck with it.

See also the Tim Bray post from February.

Windows Phone 7

Lukas Mathis:

At first, it would seem as if the lack of iTunes support for WP7 would be a disadvantage. I disagree. Not having to rely on iTunes for syncing is really, really nice.


You get to the Start Screen by pushing the phone’s Windows button. Unlike the iPhone’s home button, the Windows button is a truly idempotent reset button. It doesn’t matter what you’re currently doing, or how often you push the button; pushing the Windows button always resets the phone to the same known state. It always opens the Start Screen at the top scroll position.


This is a much better solution than iOS’s «let’s put custom a browser inside every app» solution. The WP7 browser always looks and works the same, always offers the same features, and always uses the same history, tabs, and bookmarks data.


I really like the WP7 keyboard. In fact, I think it’s better than the iPhone’s. It does all of the behind-the-scenes things virtual keyboards are supposed to do[…] And it does a bunch of additional things. For example, punctuation keys sound different from regular keys, and it makes yet another sound if it auto-corrects a word. So you don’t have to keep looking at the text, you can keep your eyes on the keyboard. If WP7 changes a word and you have to make sure it actually did the right thing, it’ll tell you.

Great article.