Archive for January 2, 2003

Thursday, January 2, 2003 [Tweets] [Favorites]

Crufty UI

Erik Barzeski has some sensible reactions to Matthew Thomas’s article. I think there’s a deeper UI principle here, almost a quality without a name. It’s about presenting the right abstraction to the user. Of course the computer should prevent you from losing unsaved work, but the real point of manually saving documents is to give meaningful names (and locations) to user-specified states of the document. Until the computer can read my mind, it had better not try to be too clever. If its “perfect” high-level abstraction won’t let me do what I want, it should let me drop down a level. In an application’s case, this may mean not hiding (or obfuscating) the file system. This is my main complaint with applications like iPhoto, VOODOO, and Frontier. They think they’re making things easier, but they really just get in the way if you ever have to do anything outside their little universe. The situation with quitting is similar. Unless there’s a reason I’d never want to quit, the application had better let me. The current Mac OS X virtual memory system is not such a reason. I still quit applications that I’m not actively using. Part of this is to free up space in the Dock, granted. But it’s often true that switching to a swapped-out application is slower than launching that same application. Also, some applications save data and perform cleanup tasks when they quit, and it’s good to let them do that to make sure all their data are in a consistent state. With a perfect system, this wouldn’t matter, but Mac OS X isn’t perfect. A few days ago it froze on me while I was in iChat, and I couldn’t even ssh in. Don’t let the “modern” OS underpinnings make you lazy; you still have to think about when and where to save.

Project Builder as an Organizing Tool

Mac OS X Hints has a tip that I found amusing. Apparently there are people who like Project Builder so much that they want to use it for non-programming stuff, too. The basic idea is good, though, and I do something similar with BBEdit’s File Group feature. Note that you can option-double-click an item in a BBEdit File Group to open it with the Finder instead of BBEdit.

Pointers in Cocoa

I don’t quite understand what Victor Ng is on about. Objective-C ivar pointers are initialized to nil, and you should get a compiler warning if you attempt to use an uninitialized local variable. But he’s right, of course, that it’s easy to send a message to a released object. Unlike Victor, I don’t set pointers to released objects to nil because I think that would make it harder to detect errors; Objective-C will happily send any message to nil without complaining. I’d rather use NSZombieEnabled during testing.

Semantic Web: The New AI?

Nate Batchelder:

The semantic web is one of those technologies that will never live up to its full hype, but will provide us with real benefits nonetheless. I think it will be like AI: lots of interesting things were accomplished, but somehow each little piece that actually worked was officially categorized as “not AI”, leaving AI always a distant dream. If researchers in the ’70s had seen Microsoft Word running with speech recognition, correcting grammar, they would have hailed it as breakthrough AI. Today, it's just what a computer does, and AI remains somewhere in the future.

How very true. It’s no wonder that AI is publicly seen as a failure.

That Sort of Thing

John Gruber, whose Daring Fireball has lost its Bob Dole/Karl Malone complex, compares BBEdit 7’s new sorting plug-ins with the latest version of Craig Maynard’s venerable LineSort plug-in. This comparison is missing from my BBEdit review because for some reason I thought that LineSort hadn’t been Carbonized.

Modal dialogs get a bad rap from many users, so you might find it curious that Bare Bones would choose to use them for new plug-ins. But there are in fact several advantages to modal dialogs. One is that they can be driven by the keyboard. Bring up BBEdit 7’s Sort Lines dialog, then hold down the Command key, and a moment later you will see shortcuts appear for each of the checkboxes in the dialog. These shortcuts don’t conflict with normal menu command shortcuts, because most menu commands are disabled when a modal dialog is open. A floating palette such as LineSort’s can only be driven using the mouse.

Modal dialogs, used right, are great. I’m so sick of these Cocoa applications where it’s impossible to tell which window has keyboard focus.

Multiple Emacs Shell Buffers

I don’t use Emacs that often anymore, but it’s occasionally quite useful. One thing I like is its shell buffers. Unfortunately, I’m always forgetting how to open more than one shell buffer at a time. Normally you can type M-x shell to open a new shell buffer, but if you already have one open that will just switch to the existing one. The solution is to use M-x rename-buffer to change the name of the first shell buffer before creating another one. The next time I forget, I’ll just search for this page.

Deleting Code

Ned Batchelder has a nice little article about deleting code. I agree completely; I hate seeing lots of old code that’s in the file for some unknown reason. Version control rules. CVS is a bit clunky, but it has a great practical advantage over (technically) slicker solutions like VOODOO: it stores everything in a very low-tech way so that you can break the abstraction barrier when there’s no tool to do what you want. In this case, it’s sometimes useful to be able to open the ,v file in BBEdit and search for fragments of deleted code.

iCal 1.0.1

The new version of iCal seems to be a big improvement. I have about 550K of calendar files, and iCal 1.0 took 15–20 dock bounces to launch and used more than 50 MB of RPRVT RAM. iCal 1.0.1 launches in 3 bounces and uses 16 MB of RAM. Additionally, it’s much more responsive once open and it’s a bit less clumsy at editing event information. Apple’s download Web page is wonky, though. I unchecked the box for sending me news about Apple software updates, but it kept telling me to enter my e-mail address. Even after I did, it still wouldn’t let me download iCal until I had also entered my name.

10.2.3 and Open/Save Dialogs

I haven’t upgraded my main machine to 10.2.3 yet, because I don’t want to risk any problems before ATPM 9.01 is released. There was a time when I’d download a 0.0.1 Mac OS update and install it as soon as possible, but with Apple’s recent Installer problems, its lack of release notes, and the sheer size of Mac OS X updates, that’s just not a wise idea. I did update my Mac OS X installation on an external drive, however—mainly because I had two reports of SpamSieve not working with 10.2.3. One guy got SpamSieve (and some of his other software) working again by disabling FruitMenu. The other one still gets this Console error when he tries to launch SpamSieve. WindowServer[424]: ERROR! execle(/Users/db/Utilities/SpamSieve.app/Contents/MacOS/SpamSieve) returned, err=22 This is a mystery to me, as the error number apparently means that the executable was compiled for a different processor type. The positive news about 10.2.3, however, is that keyboard navigation has returned to Open and Save dialog boxes. This is really great; I’d almost given up hope that Apple would fix this, since it’s been broken since the Public Beta. The new dialogs are easier to understand than either Standard File or the initial Navigation Services dialogs, but even with keyboard navigation I’m still finding them more clumsy to use. I wish there were a utility like Dialog View that could automatically enlarge all the dialogs for all my applications (and shrink the font size, too). Maybe Default Folder X does this now, but I’d prefer a non-haxie utility that just modified the .plist files.

Semantic Markup

Mark Pilgrim has sparked discussion of how to use tags like <cite> to produce more information-rich Web pages. It’s definitely something to consider when I have more time.

Evolution

Gary Robinson:

If you’ve been perplexed by the question of whether genes or organisms are the basic unit of natural selection, see this excerpt from Matt Ridley's book Evolution.