OMFG.

There are days when it doesn't pay to check my inbox before I fall asleep, as while I was nestling into the pillow I kept randomly laughing at the ramifications of the below. My brain wasn't going to drop it until I'd dragged myself to the computer and forwarded it onto a few like souls who'd also appreciate it, and leave myself a note to write a post...

Anyway, I recently filed a bug [radar - #4273090] with Apple about how Preview breaks its bookmarks to files when their file path changes because it doesn't refer to the file via its file system node, and they replied. Quelle surprise! Unfortunately, the reply was less than encouraging.

To quote:

"NAME REMOVED: Engineering has determined this issue behaves as intended based on the following information:

"If you move the file, how would Preview know where you’d moved it? This kind of thing only works with applications because of the launch services mechanism and the Finder. Since Preview isn’t running all the time, it can’t receive notifications of when every file on your disk is moved, and you probably wouldn’t want Preview being launched every time you move or rename a file."

Oh my fucking god.

Will R.

That rhythmic thumping you're hearing is the sound of a thousand developers across the world beating their heads on their keyboards. Since everyone hates being excluded from a joke, and you may not be a developer, we'll quickly go through why the title of this post is OMFG...

The background

Some time ago I mentioned I had a little side project going, whose goal is to map out exactly what the hell was going on at Apple when it came to Quality Assurance in their software from the outside. I think it'd be a worth project for someone to focus on hardware too, but I'm primarily limiting myself to the black box that is their development process.

It's been kinda fascinating, as from what I can tell, in some groups they are fairly up to speed with modern practices, and in others they're in the development dark ages -- for all intents and purposes trying to scale shareware development models up to a multi-million-dollar desktop environment. It's no real secret I've been soaking up what I could where I could and cross-referencing it, and Mac devs will send me all sorts of data points to feed the monster.

I just throw them all in to look for commonalities, so that I am better able to catch real problems versus axes to grind, and one of the more common issues involves aspects of bug reporting and resolution, and the above is one of the more amusing examples I've come across because the ignorance is so pervasive. You'll note I removed the name from the reply above, as I'm guessing it was someone forwarding on the engineer's reasoning, and throwing their name out there wouldn't be fair.

The problem

There're more than one misunderstanding in the engineer's reply, but we'll try to break this down a bit without beating you over the head. In Mac OS 10.4, Apple added a new feature to Preview.app called "Bookmarks", which was a nice touch.

The idea was to allow you to mark your place in PDFs, so you could pick up where you left off easier, or note something you want to come back to. Depending on the type of content, the alternative would be to commit the page number to memory or search. It's much easier to just open Preview.app and select the bookmark from the menu, which then opens the PDF and takes you to the desired page.

The problem, and the reason why the dev above filed a bug, is that whoever worked on Preview.app is storing hard-coded file paths to point to the file, such as:

/Users/drunkenbatman/Desktop/OMFG.pdf

This works great as long as the PDFs never move, however if you bookmark a PDF you have on your desktop, and then later move it to another folder, your bookmark is dead in Preview.app.

Luckily, Apple engineers foresaw this problem and implemented calls in Mac OS to abstract the path from the file itself, so you could have a persistent reference to a file. They brought them to Mac OS X, and aside from a horrifyingly-incendiary technote have generally encouraged their use since. For some extra overhead and cycles, you too can store a reference to a file that'll persist in your app instead of just storing the current file path.

When the Apple engineer running around authoritatively closing bugs had gotten past chapter 3 of whatever book they're learning to program applications on OS X with, they'd know this. I know this, even though I had to look up the exact calls (Aliases.h), and someone at Apple would have to be suitably desperate to allow me to run around closing bugs, let alone engineer software they're selling. This kind of crap is pervasively damaging to third party dev morale, as a normal user never sees what they're often dealing with.

The joke

Is on us.

yummy alcohol posted button Posted by drunkenbatman
    October 02, 2005, at 02:49 AM


Comments (52)




Post a comment



Anonymous comments are allowed, but please enter something for a name.

And do endeavor to appear sane.









Remember personal info?