Archive for August 2003

Friday, August 29, 2003


Chris Hanson:

I think it’s far better for everybody involved—the client, the service provider, and the eventual end users—to use an iterative, agile approach to software development.

Debugging on Mac OS X

John Chang and Eric Albert have posted some debugging tips.

Continuation Based Web Programming

Chris Double:

Continuation based web servers provide a way of modeling the flow of a web application in a procedural manner. Instead of worrying about how to get inputs through forms and pass that data via the session to other forms you can write your code almost exactly like a normal procedural application and it ‘just works’.

Here’s an example.

Wednesday, August 27, 2003


With a nod to Douglas Adams, Hydra is now SubEthaEdit. Not the greatest name, perhaps, but it’s fun.


Bruce Hoult writes about a Dylan entry in the International Conference on Functional Programming contest.


Mac OS X Hints links to HTMLDOC, a tool that can download Web pages and save them to PDF, with clickable links.


Eric Blair praises iStockphoto. Good to know.


Chris Hanson writes about his open source frameworks BDControl, BDRuleEngine, and BDRuleEditor. I haven’t had a need to use these yet, but rule-based programming is fun.

Color Tool

Raena Armitage:

Need colours? Feeling lazy? Kohai Style’s QuickColor tool is effin’ awesome. Drag the sliders around to get an extremely nice bunch of harmonious colours. It’s based on ColorMatch, except in Flash.

Macworld on FTP

I don’t really agree with Macworld’s assessment of seven FTP clients. The interface section leads off mentioning Fetch’s Get and Put buttons, giving the impression that it doesn’t support drag and drop. It complains that people will find these names confusing, though I personally find them vastly clearer than Transmit’s notion of “your stuff” vs. “their stuff.” (Does it cease being my stuff when I put it on my server?) Teague says that “RBrowser is the most OS X–like of the FTP clients we reviewed”—which is either very generous or very cynical depending on your point of view—and then dings it for having a “complex interface.” He gives props to FTP Client for letting you save droplets that upload files to particular folders, but any scriptable client will be able to do that, and anyone serious about synchronization will use rsync or a similar tool rather than FTP. Teague assigns a lot of weight to previewing capabilities, but I’ve never cared about that feature. He doesn’t seem to care about Edit With BBEdit, manages to imply that Fetch doesn’t support that, and prefers RBrowser’s less elegant alternative. He doesn’t mention the Keychain, AppleScript, batch downloads, Internet Config, SSH, or Kerberos.

Which FTP client do I use? I started out with Fetch because it was good, free, and had some unique features for Dartmouth’s network. I then used Anarchie for many years and was a big fan of its multiple-window interface. I used Fetch when I needed Kerberos. Then Stairways changed Anarchie’s name and got the idea that I’d rather have a skinnable FTP client than security or batch features. I stuck with it through one upgrade because it was OS X–native, but the mirroring feature stopped working for me. This led me to rsync, and I stopped using FTP entirely. Recently, I’ve been doing work on a server that I don’t mirror locally, and so I’ve wanted to edit remote files securely with BBEdit. Teague claims that Fetch supports SFTP, but that’s not true from what I’ve seen, and so I’ve instead been using Transmit. Transmit is a nice, polished program, but I’m not a fan of its single-window interface or drawers, and I don’t understand the difference between its queue and batch download features.

Saturday, August 23, 2003


Today I learned something about distributed objects and NSConnection. When I have an object that I want to access from multiple threads (or that I want to receive messages in the main thread), I make it a DO server, and I give each thread a proxy. I’ve been creating the proxies like this:

NSConnection *clientConnection = [[[NSConnection alloc]
                           initWithReceivePort:[serverConnection sendPort]
                                      sendPort:[serverConnection receivePort]];
id proxy = [clientConnection rootProxy];

There is only one serverConnection per server, but that’s OK because I call [serverConnection enableMultipleThreads]. The problem was that I was inexplicably getting NSObjectInaccessibleExceptions saying “NSDistantObject access attempted from another thread” when two threads tried to create proxies for the same server.

The above code makes it look like there’s one clientConnection per thread/proxy. However, the documentation for the -initWithReceivePort:sendPort: method says:

If an NSConnection with the same ports already exists, releases the receiver, retains the existing NSConnection, and returns it.

This means that the connection will be shared among multiple threads and you have to call [clientConnection enableMultipleThreads] to avoid the NSObjectInaccessibleException. I’m not a big fan of this design, because I don’t think code using a given connection should have to know when some other code is using a connection with the same ports. But there you have it.

Friday, August 22, 2003

SQLite Database Browser 1.0

SQLite Database Browser is a public domain browser for SQLite databases. It’s written using QT, so it doesn’t feel like a real Mac application, but I can imagine it sometimes being more convenient than the shell tool.

Netflix Fanatic 1.0.1

Netflix Fanatic is a Watson-like utility for managing your Netflix queue. I was quite impressed (and a little worried) that it automatically extracted my Netflix login information from Safari’s preferences. Aside from interface flaws like a square filter box (on Jaguar) and metal, it seems nice. You can re-arrange your queue with drag and drop!


I’m not much of a baseball fan, but I’ve always enjoyed watching the Little League World Series. Of course, I want Saugus to win this year. Gotta love a team with the local accent built into its name.

Thursday, August 21, 2003


Peter Lindberg:

I can set myself to awake awfully early in the morning, and it very often makes me awake very shortly before the time I had decided, usually a minute or less—and if it has ever failed, it can only be once or twice.

Also, it seems I can get by with less sleep than when using an alarm clock. I don’t know if this really is because your sleep cycle adjusts itself, but I’m less tired sleeping, on average, six hours per night, than when I sleep eight hours but abort my sleep by external means.

Wednesday, August 20, 2003

Mailsmith 2.0.1 and SpamSieve

Mailsmith 2.0.1 is a nice little update that addresses two peeves of mine. You can now see a message’s label when it’s selected, and filters can test senders for membership in the address book and in groups. Additionally, every copy of Mailsmith now includes SpamSieve.

I was initially excited about Mailsmith’s increased control over its list fonts, but due to the way Mac OS X draws text it’s pretty hard to improve on the defaults without sacrificing readability or space. You can pick a screen font like Geneva or Verdana, but they just don’t look very good with anti-aliasing off.


Congrats to John Gruber on getting published in Macworld, but I must disagree with his assertion that “CVS is notoriously cryptic even by Unix standards.” If he were comparing it to a Mac program with a real interface, I’d agree. But compared to other Unix programs, no. Maybe CVS just happens to fit my brain, but I think its basic commands are straightforward and just about what you’d expect. I had thought that was a generally accepted view, just like most people agree that vi is hard to learn. (What they disagree about is whether it’s good once you know it.) There’s no denying that CVS has some dark corners, but those aren’t the areas that BBEdit deals with. BBEdit makes the easy stuff really easy and convenient. You’re on your own if you want to set up a repository, deal with branches or tags, do non-standard checkouts, control wrappers and ignored files, or set up hook scripts.

Tuesday, August 19, 2003

2003 MDJ Power 25

The MDJ Power 25, which tracks power and influence in the Mac world, was released today. There are also many sample issues of MDJ and MWJ online now.

Monday, August 18, 2003


Structure and Interpretation of Classical Mechanics is online.

IT Productivity

Robert X. Cringely:

Macs reduce IT head count while Linux probably increases IT head count, simple as that.


Cory Doctorow:

The marketing objective has been achieved, but just watch as the lawyers in the board room blanch at the thought that the name of the company is losing its capital letter and entering the public's unconscious lexicon of product-derived verbs.

Cruft-free URLs

Mark Pilgrim shows how to remove file extensions from URLs to avoid exposing implementation details in your permalinks.

Aligning Data

Jonathan ‘Wolf’ Rentzsch has posted a great paper:

Data alignment is an important issue for all programmers who directly use memory. Data alignment affects how well your software performs, and even if your software runs at all. By understanding the causes behind alignment, we also can explain some of the “weird” behaviors of some processors.

URL Regex Generator

This page presents a program that generates a massive regular expression, based on the RFC grammars, for matching URLs. However, since URLs in the wild don’t necessarily follow the RFCs, a simpler regex is probably more useful.

ARIANE 5 Failure

This report is the result of a collective effort by the Commission, assisted by the members of the Technical Advisory Committee. We have all worked hard to present a very precise explanation of the reasons for the failure and to make a contribution towards the improvement of Ariane 5 software. This improvement is necessary to ensure the success of the programme.


Here’s a new Cortland cartoon from Matt Johnson.

Hail to the Thief

Raena Armitage:

I’ve got an early birthday present from my auntie—it’s Radiohead’s lovely new album, Hail To The Thief. It’s ‘protected’ by the fabulous Copy Control technology, which caused my computer to skip, hang and eventually require a restart when I tried to play it. Oh dear.

Thursday, August 14, 2003

Today’s Shell Snippets

tower$ jot -w "%03u" -s " " 19 2
002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020
tower$ python -c "print ' '.join(['%03u' % i for i in xrange(2, 21)])"
002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020
tower$ perl -e 'print join(" ", map { sprintf("%03u", $_) } (2..20)), "\n"'
002 003 004 005 006 007 008 009 010 011 012 013 014 015 016 017 018 019 020

TeXShop PDF Dissection

Mac OS X Hints reports that TeXShop 1.30 can copy rectangular regions of any PDF to the clipboard (as PDF).

Wednesday, August 13, 2003


Kai von Fintel links to Beamer, a LaTeX presentation class that works better with PDF than Propser.

Google Calculator

Aaron Swartz points out that that the new Google calculator can do unit and base conversions.


Jeff Newbern has written a tutorial on monads (a way to think about state in functional programming languages).

BBAutoComplete 1.2

bbautocomplete-icon BBAutoComplete 1.2 is out. This release adds support for Script Debugger, Tex-Edit Plus, and TextWrangler, which exhausts the list of programs I know of that support the text suite. It also updates the interface to match my other applications, and adds an icon contributed by a BBAutoComplete user.

Tuesday, August 12, 2003

Hydra 1.1.2

In other text editor news, Hydra has been improving quickly. The current version supports crude syntax coloring of many languages as well as live Web previews. It also works with the amazing TextExtras.

TextWrangler 1.5

The initial version of TextWrangler lacked one of BBEdit’s greatest features: AppleScriptability. TextWrangler 1.5 is now scriptable (and recordable and attachable) and adds syntax coloring for non-C programming languages and TeX. Notable BBEdit features absent from TextWrangler are the HTML tools, the glossary, file filters, multi-file diffs, CVS integration, and the shell palettes and worksheet. TextWrangler is now an extremely attractive product for people who don’t deal with HTML. That said, I regularly use all of the above features, except the shell worksheet, even when not dealing with HTML, so I think the full BBEdit is worth it for non-Web developers.


Buzz Andersen:

I thought I’d post a few of the highlights of my odyssey here, so everyone can experience the wonderful sights of Interstate 80 without actually driving the damn thing!

Monday, August 11, 2003

Drives and Stuff

Nicholas Riley explains devices, partitions, volumes, and disk images.

GPL in Germany

InfoWorld (via Gary Robinson):

Regarding such legal principles as liability and warranty, the GPL clauses have absolutely no legal validity. Under the license, developers and distributors of open software are not liable for any problems with their products. The GPL avoids any wording that could imply liability. Such a license is simply unenforceable under German, or even European Union law for that matter.

What about other software licenses that disclaim liability?

Patterns of Software

Richard Gabriel’s Patterns of Software: Tales from the Software Community is now online (via Lambda).

Sunday, August 10, 2003

File Choosing Widgets

Michael McCracken has started a discussion about widgets for choosing files (and folders) and displaying the currently chosen item. Apple hasn’t provided any guidance in this matter and uses a variety of designs:

Third-party applications use a variety of designs, too:

Here’s my take:

Text field or pop-up menu?
Use a pop-up menu when space is scarce or when you want to provide preset choices, such as recent folders or a list of known Web browsers. Otherwise use a text field and a button.
Should the text field show just the filename, or its path?
I like to see the full path, starting at ~.
What if the path is too long to fit?
It should be ellipsed in the middle.
Should the text field accept drags?
Of course!
Should the text field be editable?
Some people don’t like this because the user shouldn’t have to deal with paths. On the other hand, it can be a nice time-saver for the user. One thorny issue is what to do about invalid paths. It’s easy to validate the text field after the user’s done typing, and to revert it if the path isn’t valid. However, I don’t like text fields that don’t commit until you press Return and that show invalid data in the interim. Since I haven’t seen how to do this right, I’ll say that the text field should be uneditable.

I’m sure there are many other issues to consider…

Tuesday, August 5, 2003

PowerPlant X

Metrowerks has posted some details on PowerPlant X, which looks to be a huge improvement. The new way of handling Carbon Events looks neat. It’s amazing what you can bend templates into doing.

Monday, August 4, 2003

Installing Windows XP

Mark Pilgrim:

My Windows XP installation has reached its half-life. (You do know that Windows has a half-life, don’t you? Every installation of Windows naturally degrades along a logarithmic curve until it becomes annoying, then unbearable, then unusable. Each successive revision of Windows has featured a slightly longer half-life.

Sunday, August 3, 2003

BitTorrent Design

Stephen Figgins discusses the design of BitTorrent and has some good links. Now if only Apple would use it to distribute its seeds…we’d get them faster, and they wouldn’t have to pay for the bandwidth.


MetaFilter has a great thread about optical illusions (via Matt Deatherage).

Types and Model Checking

Mayur Naik and Jens Palsberg:

Type systems and model checking are two approaches to finding bugs in software. Are they equally powerful? On the surface, they are quite different: type checking works on the program itself, often in a modular fashion, while model checking works on a model of the program. Type soundness ensures that all reachable program states satisfy a certain property provided the program is well typed, while model-checking soundness guarantees the same without any assumptions about types. Thus, model checking seems to be more powerful than type checking: Type soundness essentially says that type checking implies model checking, but there are not many cases where the converse holds.…In this paper, we present a type system that is equivalent to model checking.

More Internet

Monkey Food’s More Internet lets you set Internet protocol handlers via drag and drop.


Long-time Eudora user Matt Neuburg has switched to Mailsmith. Contrary to what he says, Mailsmith can display images, just not inline.


IdleWeb is a screen saver that uses Web Kit to do exactly what you’d expect. I’ve set it to, which makes me really wish there were a way to click the links that it displays. It’s a neat idea and a good freebie, though I’ve got to take points off for a rounded text field faux pas.


Dan Hon links to a page listing codenames for Macintosh products.


TidBITS mentions Disclabel, a Discus alternative from the makers of well regarded Page Sender.


Tim O’Reilly joins the crowd praising Michael Lewis’s Moneyball, a book about statistics, baseball, and business.

Tokenizing in Cocoa

I don’t have numbers, but I was somewhat surprised to discover that, for my use, it’s faster to convert a string to a UTF-8 buffer and feed it to PCRE than it is to use NSScanner and NSCharacterSet. If you do end up using NSScanner, be sure to use -scanUpToCharactersFromSet:intoString: rather than -scanCharactersFromSet:intoString:. The latter spends a lot of time inverting the character set.

WebDAV @ DreamHost

I’ve been very happy with DreamHost’s services, support, and prices. The only bad surprise so far is that the usernames for your mailboxes have to be server-unique strings like m1290123 rather than the names of the addresses they correspond to. Now DreamHost has added support for WebDAV, meaning that you can mount your server in the Finder.

If you’ll be opening an account with DreamHost, I’d appreciate your mentioning my referral id: mjtsai. By the way, I also recommend Pair, particularly for sites with lots of traffic.

ATPM 9.08

The August issue of ATPM is out.

Keychain Framework

Keychain Framework is an Objective C Foundation-based framework for accessing Keychain and Security services under MacOS X. It provides convenience wrappers around the CDSA library included with MacOS X, facilities for manipulating keychains, and more.”