This is BrainLog, a blog by Dan Sanderson. Older entries, from October 1999 through September 2010, are preserved for posterity, but are no longer maintained. See the front page and newer entries.

April 2004 Archives

April 30, 2004

Small Pieces Loosely Joined— for Kids!

Dan Sugalski wrote a compiler for an ancient proprietary language his company uses that compiles to Parrot bytecode, and wrote an article about it. I should make up more reasons to use Parse::RecDescent.

Why MySQL grew so fast. I often wonder if it's worth building database abstraction into a web app I intend to distribute so multiple database platforms can be used, or if it's easier to just target MySQL and assume everyone has it. Because I write and distribute so many web apps these days, you know.

April 29, 2004

Dictionary of Algorithms and Data Structures.

Top 10 ways to crash PHP. The upshot is mostly to use a few basic PHP administration techniques when running untrusted code (such as when administering a hosting environment). Securing PHP is a broader topic than just crash prevention, but this is a start.

You Don't Know Jack 6: The Lost Gold. Buyable only through their website. For Windows only, alas, though I don't see why: seems like all the YDKJ games are done entirely in Flash. (Thanks Zannah.)

April 28, 2004

Yay! The 1982 Angela Lansbury/George Hearn stage production of Sweeney Todd is out on DVD. To date I've only been able to see this from a dub of a friend's original VHS tape recorded from television, so I'm looking forward to quality sound of Hearn and Lansbury together.

The 2001 Patti LuPone/George Hearn concert production has been out on DVD for a while.

Subscribe to The Onion's Premium service for $30/year. Access to complete archives, no ads, and Onion Radio News could easily be worth it.

BluePhoneMenu 1.0 adds a small menubar icon to Mac OS X that displays Caller ID data for incoming calls on your Bluetooth-enabled cell phone. It also displays signal strength, battery life, and other information.

April 21, 2004

The Thomas Jefferson Center for the Protection of Free Expression awards the 2004 Jefferson Muzzle Awards.

Ripped from Memepool: $14 Steadycam. Gallery of home-built stabilizers. A stabilizer made of Lego. How dynamic balance works [PDF]. Orange.

An Atom-Powered Wiki. If you're into that kind of thing.

I'm deeply saddened to hear that the Boise River Festival is no more. 2003 was the last one. I enjoy visiting my home town, but there's so damned little to do. Sounds like there will still be hot air balloons...

April 20, 2004

The Nintendo e-Reader is a sort of code scanning device for the GameBoy Advance that allows for data, and even software, to be distributed on paper cards and read into the GBA. Official uses of the reader have included interaction between collectible trading cards and Nintendo GameCube games (via another cable from the GBA to the Cube), and distribution of entire mini-games for the GBA on said cards.

The dot-code interface has finally been reverse engineered, resulting in the first hobbyist-created e-Reader game. Card data and video are available.

I feel so out of it to not have noticed the Roundabout Theatre Company finally produced Assassins. Their production was originally scheduled to open in late 2001, but was delayed for obvious reasons. I was jazzed enough to buy plane tickets at the time, but now it doesn't seem likely. I hope they film it. I like that Neil Patrick Harris is now Mr. Sondheim.

Roundabout will also produce Pacific Overtures later this year. Film that too, please.

April 14, 2004

Using Bloom Filters.

MacDevCenter compares a few keyboard-based launchers (like LaunchBar and Quicksilver).

More blogging for Google: I routinely have a particular problem installing Perl modules with CPAN for the first time on a host. When installing a module, it will fail on the first step, fetching "01mailrc.txt" via FTP from the mirrors I selected. It takes forever to time out on each host and tries a myriad of options, failing completely. The best solution I could find seems less than ideal, but it works: Reset your CPAN config and pick only http:// protocol mirrors. FTP appears to be to blame, though I'm not sure why. To re-initialize CPAN configuration after having done it once already:

perl -MCPAN -e 'o conf init;'

April 13, 2004

A new Mac OS X Trojan Horse exploits a vulnerability that lets applications masquerade as other file types to effectively hide "in" MP3 files. Especially interesting is the resulting files are still playable in iTunes, so it could spread itself to other MP3 files and go mostly unnoticed. (It isn't clear from the information available if Trojaned MP3 files are playable in other MP3 players; it doesn't sound like it.) MacFixIt has more details.

Update: Thanks to bda for pointing out that this story has since been recanted. Wired even replaced the article at the link above with an article criticizing the burgeoning anti-virus software company for overhyping a non-issue. The proof-of-concept they authored requires that the MP3 file be compressed for Mac OS 9 (not OS X) using misleading resource fork data to make the application look like a file. OS X is hardly affected, and this "Trojan" is not in use in the wild.

One of the cuter things to come out of this year's 4/1: IF Quake.

DragThing 5.1 has been released. "Dozens" of new features. I'm especially pleased to see better Exposé integration, including an option to prevent it from moving the Desktop Trash. (Desktop Trash is implemented as a borderless window, not an icon, so it gets pushed around like a window. I've never been that happy with the Desktop Trash option, I'm not sure why I keep it turned on. It doesn't behave like a desktop icon like in OS 9, and auto-arranged desktop icons will happily sit directly underneath the trash...)

April 7, 2004

What Ever Happened to Mary Ann Buckles? Mary Ann is credited with writing the first ever dissertation on a computer game, a 1985 thesis on the text adventure game Advent., a site dedicated to the academic study of computer game theory, asked aloud whatever happened to the author, and the author responded: "It's news to me that people still refer to that thing that ruined my life for a few years!"

Lawrence Lessig's new book, Free Culture, is available over the Internet at no cost, released under a Creative Commons license. The license chosen allows for attributed derivative works, and has already spawned several remixes, including an audio book version read by volunteers organized over the 'net.

Hey check it out, sells a Ms. Pac Man & Galaga Upright Arcade Game Machine (via Sports'R'Us). Also a cocktail version. Actually seems a little pricey, I'm not sure why; it seems arcade machines are usually cheaper. Maybe I'm thinking used. But I guess it's a new machine and has two games. It might be cheaper to just build a MAME cabinet.

April 6, 2004

Amazon World, a blog of funny user reviews.

Audion 3 claims to do most everything you'd want to do with MP3 files, including playing, streaming, ripping, encoding, burning, ID3 tag management, support for other formats (including Vorbis and mp3PRO), and iPod management. Features that catch my attention: copy music off of an iPod ("don't steal music"), and record any audio stream (ala Audio Hijack).

Cute Audion pictures. (Well I enjoyed them.)

The idea of a text-oriented mark-up scheme that renders as reasonably fancy HTML has easily spread from Wikis (and perhaps other early applications) to other low profile web content editors, such as blog software. Thankfully, it did so by going up a meta level. Textile and Markdown are two such schemes that are defined and implemented independent of blog/wiki/whatever software, and are easily integrated. I can't decide between the two, they both cover most of the bases. Textile gets extra points for justification (alignment) and HTML attribute (CSS classes, ID's) abilities. I like Markdown's link/image-by-reference syntax, though I don't know if I'd use it. Kudos to both for supporting multiple paragraphs and other things within a single list item, which drives me insane in most wiki formatters. (I often want to put code samples, such as steps to perform on a command line, in a numbered list, and many wikis will restart the numbering if I "leave" the list to enter code.) If anything, these systems will help put an end to the proliferation of reinvented hard-coded text-to-fancy syntaxes, and at least allow me to pick my favorite and use it everywhere.

Textile for MovableType, Textile for blosxom, Textile for MoinMoin Wiki. (Brad Choate supposedly integrated Textile and Kwiki, but I can't find a download.) Markdown's download package automatically provides MovableType integration, and Blosxom integration with very little effort.

See also Structured Text and reStructured Text, especially for co-mingling documentation and code.

April 5, 2004

I'm all anxious about Movable Type's upcoming 3.0 release. Now is a pretty good time, schedule-wise, for me to start rebuilding my personal website, and I'd love to ditch this cruddy blog software I wrote in the same afternoon I taught myself PHP (which I'm not all that interested in fixing). I'd gladly get on the MT bandwagon, though my first experiments were stymied by the amount of un-redistributable hackery I'd have to employ to build the extensions I want to build. (It's easy to change MT code and templates, not so easy to distribute those changes due to the MT license.) Early announcements for MT 3.0 indicate it will have just the plug-in API enhancements I've been wanting, and now I just wonder if it'll be out soon enough. Naturally, I considered building new software from the ground up with all the fancy engineering skills I picked up since I first built this site, but with far less time and interest than I had back then, it doesn't seem likely reinvention would get me the results I'm interested in.

At some point last year, while hacking on an existing (I didn't write it) medium-sized PHP application with a medium-sized codebase, I decided to swear off PHP. Not because it was a bad language, mind you: especially with v4 and beyond, PHP has all the nice features of other languages used for web applications. But that's exactly why I decided I didn't need it. When a web application gets anywhere close to medium-sized, the display logic needs to be separated from the rest of the code, and it's often best to do this with an isolated templating system (as opposed to, say, other PHP scripts). By that point, a PHP application pretty much resembles its Perl or Python equivalent, and continues to do so for the rest of its development lifetime. Since I use Perl much more often for other non-web-app purposes, if it really were all the same, I might as well stick to the one language.

Beyond Perl > PHP, PHP > Perl, PHP = Perl, and right-tool-for-the-job, I notice that of the dozens of other blog software packages out there, most are written in PHP. I'd considered the possibility that PHP makes for easier distribution and installation of web application software, but it seems regardless of language, every such app has to worry about file permissions, database table creation, and library dependencies (PHP perhaps less so, but only slightly). Perhaps people write their tiny apps in PHP and by the time they get to medium-large apps, it's simply a matter of personal preference what language they use. Since my main interest in something other than Movable Type is the ability to redistribute my extensions without licensing or patchfile difficulties, I'm wondering if there are Open Source PHP-based blog implementations worth extending.

I haven't actually looked at any of these yet, but: Textpattern, pLog, Pivot, WordPress, bBlog.

And so I don't forget to play with it more, just in case: Blosxom.

April 2, 2004

Fans of Launchbar for Mac OS X might want to note Quicksilver, which some seem to prefer. I have yet to work either into my OS X workflow, which is odd because I expected them to immediately jive with my personality. Ultimately, I just don't get to play with my Mac enough. There's very little time for personal computing in my life these days... *sigh*

Creating Online Help with Tinderbox includes discussion of some basic design ideas for Apple Help-style user documentation.

POVRay Short Code Contest, 3D images made from less than 256 bytes of POVRay source. (Thanks David.)

Program Matt's TiVo.

April 1, 2004

Orchestra Seattle / Seattle Chamber Singers will be performing The Passion According to St. Matthew by J. S. Bach at Benaroya Hall on Good Friday, April 9. "One of the landmarks of western culture, Bach's monumental meditation on Christ's suffering employs the combined forces of six soloists, three choirs, two orchestras and Benaroya Hall's mighty Watjen concert organ." has an entry about the work. is a beautifully written and informative FAQ that originated from the newsgroup. includes biographical information, a cross-index of J. S. Bach's complete works, and a nice list of recordings. Via the recording list: An customer review (on this not-so-favored recording of BWV 244) recommends the Hanssler/Bachakademie edition of the St. Matthew Passion conducted by Helmuth Rilling (Amazon link).