[This site will look better in browsers that support web standards, but should be legible in all.]

Friday, 02/28/03

There's a new version of Philip Hazel's PCRE out, with more Unicode support. PCRE is a developer library for properly supporting regular expressions. Last summer I lost a week to a wretched bug that wrecked a large number of extended-syntax patterns, and apparently the fix Hazel sent me at the time wasn't rolled out to the public until just this last February 19.

I have need of regexes in a Cocoa context, and rather than polish up my PCRE-wrapper classes from last summer, I'm evaluating AGRegex. It's got documentation, and being based on PCRE it supports Perl syntax, which are more than can be said for any other Cocoa regex attempts. 04:46PM «

Most of the way down the left side of Mark Bernstein's weblog is a magnificently simple notation for the quality of movies he's seen lately. I intend to steal it at my earliest convenience. (Thanks, Kellan -- is that the same Mark Bernstein? Oh, wait, that was Herb Bernstein.) 12:08PM «

Wednesday, 02/26/03

Brent Simmons is reimplementing the XML-RPC stack in Mac OS X. Simmons, of course, is the author of NetNewsWire and while at Userland was the guy responsible for getting Radio operational on the Mac; his XML-RPC bona fides are all in order.

My own work with Apple's web services widgetry is limited to a tiny tool I use to download and review the decisions made by my server-side spam filter. It's trivially simple, and that's what's so bloody wonderful about web services: the easy things are easy and the hard things are possible. But I haven't undertaken any hard things with these tools, and in anticipation of doing so eventually, I'm grateful for the adventures of folks like Simmons, who act as the canaries in my coalmine.

With Simmons abandoning the OS' XML-RPC tools, the canary is effectively dead. The Web Services APIs introduced in 10.2 hasn't yet set the world on fire. Of course, they're only deployable on 10.2, though if you're comfortable targeting only OS X, targeting only 10.2 and up is becoming less of a stretch. It probably doesn't help that the APIs are firmly rooted in Carbon and CoreFoundation, and thus shunned by so many cootie-phobic Cocoa programmers. The question I've not yet had occasion to ask myself is whether the hard things are actually less possible than they ought to be.

Simmons talks about some problems that are clearly bugs, and need fixing: repeatable crashers in such high-profile software that have survived since July 2002 brings to mind the AppleScript 1.8.3 debacle, a six-month period in which Script Debugger couldn't launch without its users first being forced to download an AppleScript beta. That said, I'm more concerned about flaws in XML-RPC that may have more staying power than clear-cut bugs, like insisting on ASCII when the rest of the OS, and the world, is galumphing toward Unicode.

My point is this poses a problem for OS X's web services hackers. I have a lot to learn at this point, and I'm sort of playing catch-up. Got any insight? Please send me a note.

[The original version of this entry, written when I was in more dire need of a nap and/or a sandwich, bizarrely painted the subject as a bone of contention between Simmons and Steve Zellers. This was not rational; I apologize to both.] 01:05PM «

Matt Gemmell's brain dump of Rendezvous projects reminded me to write this up.

A couple of weeks ago I belatedly discovered Stuart Cheshire's amazing Rendezvous talk from last year's WWDC (available with a free account at Apple's developer site). Rendezvous, for those who don't follow such things, is a deeply clever way to make sure computer users never have to think about IP addresses for devices on their local networks, and to make sure devices can find each other without configuration -- so you can plug in a new printer, or fire up a new web server, and network-wide it just pops up in a picklist, without hassle.

I was already a fan of Rendezvous, and had a grasp of the fundamentals, but Cheshire's talk really sews up why they did things the way they did, and I came to understand at a deeper level why it's such gorgeous technology. Since then I've been thinking about ways to put it to use.

For a long time I've pondered ways to exchange data that won't easily swim in the filesystem, like sychronizing clipboards, or browser bookmarks, or keychains between OS X machines. Writing a pleasant synchronizer is manageable, but it can only do its work once it has the data from the "target" computer. The labor of exporting and transferring the remote data to be synchronized drags down the process, except in cases like the clipboard, where it effectively is the process.

That transport hassle is exactly the labor that Rendezvous whacks. So, duly inspired, I started picturing a Rendezvous-powered middleman app, with only enough UI to put itself out on the network, spot other copies of itself, and open point-to-point connections with the permission of the target machine.

I'm thinking that once a connection is established between two machines, it's placed at the disposal of any app that wants to talk to something on the remote end. Requests and replies are made to the middleman running on your own Mac with Apple Events, transferred to the remote middleman as XML, and turned back into AEs targeted by the sender. XML also encapsulates data unsuited for representation as an AE.

With the network code out of the way, my hypothetical Address Book synchronizer can just concern itself with synchronizing Address Book data. To speak across a network, it only has to learn a couple of AppleEvents: one to package up the local machine's Address Book data for transmission upon demand, and one to blindly query a middleman app: "You've got a connection? Good, ask the Address Book synchronizer on the other side to send me its data", from which it gets XML-formatted data to process.

Because middleman communication, on both sides, is performed with Apple Events, middleman client tools could even be written in AppleScript.

True, it's possible to send Apple Events across a network by themselves, which gets an application most of the way there without needing a middleman. Remote AEs are a security free-for-all, though, and unless you incorporate a lot of Rendezvous in each app, you'd wind up scrabbling around for the IP addresses of the remote machines. At this point, I'm still thinking my scheme sounds way better.

It felt right to keep refining the idea, and after not very long, I realized I'd refined it into something that already existed. And that's the story of how I invented Web Services, about ten days ago.

The lesson I draw from this is that it's still too hard to build SOAP/XML-RPC servers, especially if they have to work with Apache (and I say this as a qualified Apache tinkerer).

Rendezvous will yet have a role to play when that day comes, in allowing people to refer to computers on the local network by names instead of numbers. But its killer app is still hiding somewhere. The technology can survive, even thrive, as no more than a way to reduce configuration for printers and networked games, but it's too pretty for that to be all. I haven't figured it out. 12:20PM «

Saturday, 02/22/03

Matthew Brzezinski's NYT Magazine story about the social consequences of fighting terrorism is, of course, stupefyingly scary, and should with any luck spark another round of jovial revolutionary coffeeklatsches between the Maxine Waterses and Bob Barrs of modern American society. The article mixes plausible speculation with first-person reporting about the domestic security innovations we'll soon be importing from the Phillipines, Israel, Singapore, and other relaxed getaway locations.

Somehow, the single most unnerving piece of information I'm going to take away is the news that El Al operates a fleet of thirty planes. El Al, of course, is Israel's national airline and the gold standard for preventing aviational terror attacks, albeit by methods that would be unconstitutional in the US. I had the impression they were a real airline.

To put this thirty-planes number in some perspective, wee little American carrier JetBlue, in the midst of a killer industry slump, is buying two more planes from Airbus, for a total fleet of 52.

Airlines you've never heard of run more jets than El Al. Delta's "Song" carrier (designed to compete with the likes of Southwest and Jetblue) is starting with 36 planes. And the big boys? United, with 526 jets, is planning to cut 32 planes from its fleet to get profitable, while American, currently at 695, last year cut 40.

Brzezinski's article uses the El Al factoid to shift its focus to the fiscal and practical problems with perfect security, but the number does his job for him. My back-of-the-envelope calculations for the cost of "protecting" American airlines like El Al protects theirs shot up by an order of magnitude, and we're talking about an industry that already can't afford a tasty sandwich.

What do Americans hate even more than living in fear for their lives? Paying for stuff. Forward-thinking CEOs seem like the logical next guests at the Waters-Barr strategy session. 07:48PM «

Friday, 02/21/03

Roger Ebert has a new crop of reviews out most every Friday, which I read by the close of business. Every two weeks on Sunday he adds another expanded, in-depth appraisal to his "Great Movies" series, which last week was "The Right Stuff". Like more than one news anchor the morning of the Columbia disaster, Ebert makes accidental reference to the Challenger, twice, in fact. The article's been up for five days now. I wonder if they're going to fix it, or befuddle future generations of film students with the idea of a 1983 film "in the shadow of the Challenger disaster". 03:31PM «

Thursday, 02/20/03

I burned up much of today, not on necessary jobhunting or software, but on the rapacious consumption of BEEP: the Definitive Guide. I started it more or less on a lark, never having exhibited even a passing interest in protocol design, and was startled to find myself engaged in the best read from O'Reilly since Jon Udell's groupware book.

BEEP is a toolkit for building application protocols on top of TCP. The main idea is in RFC 3080, and the standards-track implementations are housed at beepcore.org. The book is tiny, barely 200 pages including the index, so I was most of the way through it before I even thought to doublecheck that the code runs on Mac OS X.

Oh, the horror. There's a Java version further along than C, but the C effort is where I was pinning my hopes, and it seems to have been derailed by a rival implementation with a less friendly license than beepcore's BSD terms. It's a sad day. BEEP would have been a blast, but it's appealing specifically because I'm not interested in becoming the sort of programmer who likes to spend time tinkering at or below the protocol layer. Back to SOAP and HTTP. 11:31PM «

Tuesday, 02/18/03

Over at Daring Fireball I just noticed a charming Safari detail -- the HTML title attribute (hover over that link) is rendered in the status bar at the bottom of the screen, prepended to the target URL. Most other browsers either replace the target URL with the title, or make you wait a second or three for a tooltip to pop around. This is way better, assuming you've overridden the Safari default that leaves the status bar hidden. 12:22PM «

This morning I got it licked. No puppies were injured.

Apple events consist of long sentences made up of four-character codes which are sometimes, just for variety, substituted for ostensibly more expressive C constants. On one hand, the constants are a help, because they provide human context, but on the other they are an immortal pain, because they add another level of indirection. Disassembled code (like Apple events caught in the wild by debuggers) bears little overt resemblance to much documentation.

Often the four-character codes try to pack in some human-accessible meaning, but with only the four characters to pick from, eventually you run into abominations like the ubiquitous "direct object specifier", which appears in most AEs you're likely to see, and looks like four dashes. My whole problem was that I was neglecting to quote them, or use the "keyDirectObject" constant, which would have amounted to the same thing.

I found myself referring to Apple's infuriatingly terse Carbon AE reference, the more verbose but long-pre-Carbon Inside Macintosh IAC reference (featuring code samples in Pascal), the AEGizmo technote, the Cocoa programmer's AppleScript terminology glossary, various AE.framework header files, Jens Alfke's AEGizmo sample code, the invaluable Script Debugger demo, and Matt Neuburg's first-edition REALbasic: The Definitive Guide, which contains the best-written treatise on Apple events of my acquaintance, notwithstanding code samples in a language I like even less than Pascal. To get where I am now, I needed the last day and at least one critical piece of information from each of the above, plus several nuggets of Google spelunkery like this macosx-dev thread, containing a fully formed AEPrintDesc to AEBuildAppleEvent translation.

Developer usability aside, Apple Events and AppleScript are two of the more profoundly useful technologies Apple's ever disgorged, and it drives me nuts to see Mac apps that neglect them. With a taste of what they went through, I have a deeper appreciation of developers who do the work to get it right. 11:46AM «

Monday, 02/17/03

I'd like to state for the record that working with Apple events makes me want to kick puppies. I have a job interview in a couple of days for a PHP contract lasting a couple of months. Ordinarily I find PHP a little limited, a little parochial, but at this moment, the chance to focus on a Perl-descended syntax instead of this tortuous nonsense is about as appealing as free ice cream for life. 11:46PM «

Saturday, 02/08/03

I think I've previously pointed to Paul Krugman's bare-bones blog, and I mention it again to remind myself to check in more often. For example, see this perfectly wonderful entry on the heretofore unknown to me Professor Pollkatz's Pool of Polls:

I started this site in Spring 2001 after growing frustrated with the news coverage of various presidential approval polls: on Monday, Fox would say 58%, on Tuesday, Zogby would say 51%, on Wednesday, CBS would say 56%, and so on, and the reporters would report all this as actual zigzagging. The purpose of the syntheses on this site is to reduce the poll data from all the different pollsters into a form where the information can be compared and pooled. This enables us to recognize trends that would otherwise be obscured.

It's brilliant! I'm fascinated by the green diamonds in the disapproval scatterplot. 09:45PM «

Friday, 02/07/03

Today I learned how Marvin Gaye died. 05:36PM «

Thursday, 02/06/03

It took an unconscionably long time for US news sources to pick up the Guardian's coverage of North Korea's cheerful threat to "pre-empt" the US with a first strike while we're all occupied with Iraq. Google News indicates that the first US story on the subject, from the AP, appeared less than ten minutes ago.

Speaking of news pushed off the front page, didja hear the one about John Ashcroft overruling plea agreements struck by US Attorneys? This is the AG insisting on seeking the death penalty, and reneging on deals to provide information or testimony in exchange for life sentences. It's like having Mullah Omar as our chief law-enforcement officer.

There was a time when reading Molly Ivins didn't feel like work. She's as sharp as ever, but she's suffering from a surfeit of material. Salt Lake Tribune links for her recent SEC coverage, or State Of The Union reaction will stick around a little longer than the contents of her Creators Syndicate page. The latter piece in particular, just juxtaposing rhetoric with reality, could have been composed by anyone who gets a newspaper and learned to read before 2001, but somehow she's still the only one writing it down. 12:23PM «

Tuesday, 02/04/03

Thom turned me on to William Gibson's month-old blog a few days ago, just in time for me to learn the man was coming to town for a reading of Pattern Recognition, his new book. He was too tall, or the lectern was too short, for the microphone to adequately amplify his voice, so the audience of a few hundred was forced into rapt silence in order to hear anything.

The book's protagonist's name is Cayce, which the Seattle Times suggests is a reference to Edgar Cayce, but which said aloud is also the name of Gibson's protagonist from Neuromancer. This shouldn't cause a problem for a reader, but for a listener, it just feels self-referential, like George Foreman claiming one of his sons named George was named after someone else. I suspect this problem will never be more pronounced than at a book reading, and may go otherwise undetected.

During Q&A someone asked a question about "mumble mumble weblog mumble", which I presume to have been "How do you feel about this brave technocratic new weblog medium in which you take part?". Gibson characterized his own blogging experience as "ludic", and somewhat at odds with the definition as I looked it up later, described his blog as feeling neither like work nor recreation, yet almost certainly incompatible with the mindset required to write a book. 12:44PM «

Sunday, 02/02/03

What happened to CDNow? The Bertelsmann-owned CD retailer seems to have gone under in all but name to one of those Amazon "partnerships" in which Amazon takes over all aspects of the public presentation. Usually this amounts to an improvement, but CDNow's defunct site offered a good deal of information integrated from AMG's far clunkier web operation, including performer listings, and occasionally useful criticism. AMG's site has been around for years, and they still haven't figured out the point of an ALT tag. 06:32PM «


Bits pushed by Movable Type