Archive for November 2008

Friday, November 28, 2008

Scoped Objects in Objective-C

Guy English shows how to use GCC’s attribute feature to automatically send -release messages to objects when they go out of scope.

Wednesday, November 26, 2008

Dropbox

Dropbox is certainly a promising technology—in many ways, what iDisk should have been—but it currently has some serious problems. It does not support Mac resource forks, extended attributes, or packages. Worse, it does not tell you that it doesn’t support these features. It just silently throws away those parts of your files. Until this is fixed, it should only be used by technical users who are sure that these limitations will not cause problems for them.

Update (2010-12-17): Dropbox 1.0.

Tuesday, November 25, 2008

A Web-focused Git Workflow

Joe Maller:

The key idea in this system is that the web site exists on the server as a pair of repositories; a bare repository alongside a conventional repository containing the live site. Two simple Git hooks link the pair, automatically pushing and pulling changes between them.

Inside Safari 3.2’s Anti-phishing Features

MacJournals:

The Apple Customer Privacy Policy says nothing about Safari sending any information to places other than the Web sites you’re visiting—but as of Safari 3.2, it does exactly that…If the URL of a page you want to visit matches the hash prefix of a known malicious page, Safari 3.2 appears to send that prefix to Google and ask for the entire 256-byte hash to make sure that this really is a malicious page (and also to verify that the page hasn’t been removed from Google’s lists since Safari’s last list update). Millions and millions of URLs could produce hashes that start with the same 32 bits, but if Google gets several requests for the same value, the company could reasonably infer that people were visiting the malicious page it had tracked—and since the request from Safari to Google comes from your IP address, Google might infer data from that as well.

Script Debugger 4.5

Script Debugger 4.5 is a $49 upgrade that adds full Unicode support, horizontal and vertical window splitting, regular expressions, customizable key bindings, and some nifty dictionary-aware auto-completion features. It also brings back the “Edit with BBEdit” feature and the scriptability of Script Debugger itself.

Safari in iPhone OS 2.2

John Gruber:

To make better use of the available space in the location field, Safari no longer shows the “http://” or “https://” protocol scheme. You do see the protocol scheme, however, when you tap the location field to edit the URL…But it’s hidden, sort of like file name extensions in the Mac OS X Finder, in the normal display view.

I agree that, at least if you know what the magnifying glass means, the new search field is a waste of space. What I don’t understand is why the reload button is now inside the location field. The × button inside a search field makes sense because you’re clearing the field, but the reload button applies to the page.

Update: Jesper adds:

…if you’re editing, there’s a white cross in a grey circle in the right end of the URL field that means “empty the text field”, and when a page is loading, there’s a UI teal cross in the right end of the URL field that means “stop the page from loading”.

Monday, November 24, 2008

The Netflix Prize and Napoleon Dynamite

Clive Thompson (via Jason Kottke):

Mathematically speaking, “Napoleon Dynamite” is a very significant problem for the Netflix Prize. Amazingly, Bertoni has deduced that this single movie is causing 15 percent of his remaining error rate; or to put it another way, if Bertoni could anticipate whether you’d like “Napoleon Dynamite” as accurately as he can for other movies, this feat alone would bring him 15 percent of the way to winning the $1 million prize.

Guide: Writing Testable Code

Miško Hevery:

To keep our code at Google in the best possible shape we provided our software engineers with these constant reminders. Now, we are happy to share them with the world.

TaskPaper 2.0

TaskPaper looks much-improved, with a more advanced query language, theming options, and a quick entry window. I’m glad to see that the toolbar is back at the top of the window.

HandBrake 0.9.3

HandBrake now leverages the FFmpeg project so that it can convert video from all sorts of different formats, not just DVDs. This should make it the clear replacement for the recently discontinued VisualHub. For unstated reasons, Handbrake no longer has built-in DVD decryption, although if you have VLC installed it will use VLC’s libdvdcss and work pretty much the same as before. Despite the version number, this looks like a big upgrade. As far as I know, HandBrake is the easiest and fastest way to convert video for use on an iPhone.

Update: Ars Technica adds:

Jon Rubin, one of HandBrake’s developers, got in touch with Ars to explain the true reason behind the removal of the DVD libraries: “One of our developers works for a large company and felt more comfortable concerning his employment if what he did in his free time didn’t raise IP issues.…”

Friday, November 21, 2008

Scala?

Guido van Rossum:

Steve [Yegge] characterized Scala as “static typic’s revenge” […] and went on to make fun of the incredible complexity of Scala’s type system, which contains such esoteric concepts as type erasures, variance annotations, existential types, polymorphic method types, and many more (just scan the ToC of the language reference).

I have to agree with Steve—if this is what it takes to have compile-time type-safety in a language, I’ll take dynamic typing any day. There’s got to be a better way—perhaps Haskell?

Thursday, November 20, 2008

Google Mobile Uses Private iPhone APIs

John Gruber:

Third-party iPhone development is purportedly a level playing field. If regular developers are forced to play by the rules, but Google is allowed to use private APIs just because they’re Google, the system is rigged.

Erica Sadun at Ars Technica has some more information about this.

Tuesday, November 18, 2008

GitX 0.5

GitX (via Jonathan Rentzsch) is a graphical interface for Git with a real Mac interface, unlike gitk. Right now you can view the history (by commit, but not by file), browse trees, and make new commits. Excellent work.

Sunday, November 16, 2008

How to Price Your iPhone App Out of Existence

Andy Finnell:

There will be an iPhone app bust. The current prices simply aren’t sustainable. Either developers will crash out of the market when they discover they can’t make a living off their current prices, or the gold rush developers will lose interest and leave when they realize they can’t make a quick buck off the store. The developers left standing will be the ones who set reasonable prices for their applications.

Open Radar

Open Radar is a second place to file your Apple bugs so that other developers can see them (via Dave Dribin and Jonathan Rentzsch).

Thursday, November 13, 2008

KTUIKit - Layout Managers for Cocoa

Cathy Shive has released a framework called KTUIKit that provides better view controllers, easy ways to set view background colors and borders, and a basic layout manager class. I think NSView’s spring and strut system is the weakest part of Cocoa. It works fine in simple cases, but when you have multiple panes in a window or you need to resize a window through a wide range of sizes, it falls apart. KTLayoutManager looks like a good start at solving this problem, although ultimately I think it should be addressed in Cocoa itself.

Wednesday, November 12, 2008

AutoZone Source

The source code for AutoZone, Apple’s Objective-C garbage collector, is now available (via Bill Bumgarner):

AutoZone is a scanning, conservative, generational, multi-threaded garbage collector. Specifically, it is the garbage collector used by the Cocoa frameworks within Mac OS X Leopard and Xcode, the premiere development environment for Mac OS X and iPhone application development, is one of several garbage collected applications that shipped with Leopard.…While AutoZone was tested and deployed with a focus on supporting Cocoa application development, the implementation is language agnostic.

Tuesday, November 11, 2008

Wikipedia License Hacking

Charles Miller:

Most invocations of GNU/FSF licenses (including Wikipedia’s) permit distribution under any later version of the given license, so…The Wikimedia Foundation prevailed upon the Free Software Foundation to release a new version of the FDL specifically giving Wikipedia (and wikipedia-like “Massive Multiauthor Collaboration Sites”) a time-limited option to switch to the Creative Commons Attribution Share-Alike license.

Drobo and Time Machine

Erik Barzeski:

One thing that’s somewhat annoying: the Drobo, when it gets nearly full, will insist that I change a drive. It’ll turn the light(s) yellow and everything. Can’t it be told that it’s a Time Machine drive and that Time Machine will automatically remove old data to make room for new data?

Monday, November 10, 2008

HFSDebug 4.0 and New HFS+ Features

Amit Singh (via John Siracusa):

The most interesting technical things about HFS+ are not its features, but how several of the newer features are implemented. With the goal of retaining backward compatibility, new features have often been retrofitted, or shoehorned, if you will, into HFS+. Knowing such implementation details invokes different reactions in different people, ranging from “That’s a nifty way to implement this!” to “Gross!” This is something you can decide for yourself with the help of HFSDebug, which can show you exactly how the file system works.

Thursday, November 6, 2008

Tangle-resistant iPhone Earphone Cable

John Gruber:

On an airplane yesterday, as I took them out of their pouch on my carry-on bag, I suddenly realized that the difference was more than just texture. These new earphone cables are somehow very much tangle-resistant. Back here in my office, where I’ve got a slew of older Apple earphone sets to compare them against, the difference is striking. You can just ball these new ones up into a glob, stuff them in a pocket, and then just shake them straight when you take them out.

Is Apple Opening Up?

Chuq Von Rospach:

Me, I want to encourage Apple to keep this going and do more of it. You could watch the “new iMac” hype starting to build, and once Apple came out and said “nope. we’re done for now”—it was gone. That was good for Apple. Ditto this “Mac Mini dead” thing.

Tuesday, November 4, 2008

Dependency Injection Myth: Reference Passing

Miško Hevery (blog via Dave Dribin):

Since UserRepository can no longer do a global look-up to get a hold of the Database it musk ask for it in the constructor. Since LoginPage is doing the construction it now needs to ask for the Databse so that it can pass it to the constructor of the UserRepository. The myth we are describing here says that this makes code hard to understand and maintain. Guess what?! The myth is correct! The code as it stands now is hard to maintain and understand. Does that mean that dependency injection is wrong? NO! it means that you only did half of the work!

Monday, November 3, 2008

ATPM 14.11

The November issue of ATPM is out:

Sunday, November 2, 2008

OmniFocus Bonjour Syncing

OmniFocus, my favorite task manager, is now at version 1.5rc2. Version 1.1 for the iPhone is finally available, after more than two weeks in App Store limbo. The new versions support a “Bonjour” syncing method, in which OmniFocus runs its own Apache process so that you don’t have to setup WebDAV yourself. The iPhone version is much faster than before, especially at launching. Loading still takes a while, though, and so the best new feature is that it lets you add inbox items before it’s finished launching.

Update (2008-11-04): Omni says that the password and data are automatically encrypted via https when using Bonjour syncing. I never succeeded in getting this to work when manually configuring Apache for WebDAV syncing.