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.

July 2004 Archives

July 30, 2004

This Mac OS X FAQ article explains how to run programs at start up, including GUI applications, Unix applications, and starting up Unix applications as "root." Running a MySQL server is explicitly listed as an example.

Top 10 Online Investing Hacks Tips. O'Reilly publishes a financial advice book, and gives free samples.

Library of Congress: American Memory Collections: Sheet Music.

July 28, 2004

Slashdot has Hitchhiker's Guide links to the teaser trailer for the movie, and a juicy MP3 preview of the radio series sequel.

The Onion: White House Declares War On DSL Provider.

The Economist on Dr. Dennis Ritchie, Bell Labs, C and Unix.

Results of the 2004 Bulwer-Lytton Fiction Contest. Dark and stormy, indeed. (Thanks Girlhacker.)

July 27, 2004

The Complete Guide to Isometric Pixel Art, a tutorial.

Newbie Linux/Mac OS X tip: I finally found a page that explains the Linux backspace/delete terminfo stuff well enough that I was able to fix backspace behavior on my Linux box when I used Mac OS X Terminal. Terminal uses "xterm-color" as its TERM, which, in my Debian 3.0r2 installation, had the undesired (but common) values for kbs (backspace) and kdch1 (delete). I was able to fix it with:

  1. Log in to the affected Linux box.
  2. echo $TERM to confirm the terminfo setting. (Mac OS X Terminal should be using xterm-color.)
  3. infocmp >xterm-color
  4. Edit xterm-color, find kbs and make sure it reads kbs=\177, and find kdch1 and make sure it reads kdch1=\E[3~. Save.
  5. mkdir -p ~/.terminfo/x
  6. Temporarily set the TERMINFO environment variable to ~/.terminfo. In bash/zsh: export TERMINFO=~/.terminfo
  7. Test-compile the new terminfo file: tic xterm-color If successful, ~/.terminfo/x/xterm-color will be the compiled terminfo file.
  8. unset TERMINFO
  9. If desired, back up the original compiled terminfo file. Look for it as /etc/terminfo/x/xterm-color or /usr/lib/terminfo/x/xterm-color.
  10. Run tic xterm-color again as root (using su or sudo) to compile and install the new version in the official location.

Sean Stewart on The Beast, the submersive scavenger hunt real life puzzle game experience creature written and built in secret by Sean and his team at Microsoft to promote the movie A.I. in 2001.

There was no time for careful on the Beast. Good, yes. I still tried really hard for good, I wrote and rewrote and re rewrote until I was happy with what I was doing. But careful went out the window.

As a writer, I have always had an unruly talent for pastiche. Frankly, it hasn't served me all that well in novels. Novels require unity and a consistent narrative voice. My urge to jump around from style to style, and character to character, without paying enough attention to the transitions, was something I tried to fight against.

But the Game! What a gift. I didn't have to put in the connective tissue. It was better if I didn't--because the audience would do the dot-connecting for me.

Sadly, cloudmakers.org and all subdomains—pretty much all of the game's material with analysis built by players and fans—appears to have been taken down by their ISP.

Lots of Star Wars-related DVD news, and the official Star Wars 3 title.

July 26, 2004

Copyright Office on INDUCE Act: It Isn't Strong Enough. Marybeth Peters, U.S. Register of Copyrights since 1994, believes there is "no question" that providers of services and mechanisms that could potentially be used to infringe copyrights should be liable for infringing use, regardless of the lack of control over users or the substantiality of non-infringing uses, to the point of rolling back the Betamax decision.

L suggests that all we have to do to convince senators that time shifting is fair use is to buy them TiVos. We're guessing that senators are not allowed to accept such gifts, or they'd already have TiVos by now and we wouldn't be having this discussion.

Newbie HTML/CSS tip: An old bane of the web developer is how many browsers move to the next line when they encounter a closing form tag. The inconsistency of this behavior causes many to resort to opening forms as high as possible and closing them as low as possible, or wrapping forms in tables, or whatever. CSS to the rescue! To inline a form:

<form action="..." style="display: inline;">...</form>

July 23, 2004

Movable Type Developers Contest Results

The Movable Type Devleoper's Contest winners have been announced. Jay Allen's MTBlacklist took the top prize, and considering comment spam is a serious problem that affects every MT user and MTBlacklist is the best known solution, it deserves it. I got my first piece of MT comment spam just yesterday, and now eagerly await MTBlacklist for MT 3. The two second prizes went to Tim Appnel for MT-XSearch, and Andrew Sutherland for KoalaRainbow. The three third prizes went to John Gruber for Markdown, Chad Everett for Notifier, and David Raynes for MultiBlog.

It'd be terribly presumptuous and whiny of me to speculate why my entry didn't get a prize. Naturally, I will do so anyway, but please don't take it as sore loserdom: I knew I had lost weeks ago.

continue reading...

Nick Balaban and Mike Rubin compose and perform the utterly fantastic music on Blue's Clues. Nick and Mike used to be (are?) members of New York R & B band Uncle Hoy. The web site looks pretty old, so I assume it was a previous venture.

More recently, Nick is a member of Klezska!, a klezmer/ska/reggae/jazz band, with free tracks available at Download.com. If anyone has information on the extra-Blue adventures of Michael Rubin, please let me know.

Obligatory link to Steven Burns' web page.

Hypertext marks in LaTeX: a manual for hyperref.

Building a solid-state mini-ITX Linux recording studio.

July 22, 2004

Last year I complained that Cubase SX for Mac was very buggy. Since then, Steinberg has released several patches. As of this writing, Cubase SX is up to version 2.2.0 "b35". This FTP site is recommended instead of their web site, which sent me to a registration page that had nothing to do with Cubase when I clicked on the SX link. Get both "Cubase_SX_220" and "Cubase_SX_220b35" if you're upgrading from the 2.0 retail version from last year.

Toon In, Washington Monthly on Adult Swim and innovation in cartoons.


The Living Room Candidate has presidential campaign television commercials from 1952 to 2004. (Thanks Dad.)

July 21, 2004

Battlestar Galactica, a new series based on the popular mini-series, premieres on the Sci-Fi channel next January.

perl.com: Building Testing Libraries.

Software That Lasts 200 Years.

RooSpell

It occurred to me yesterday that the only way to add functionality to the Movable Type entry preview screen is via a text filter. Normally, this would be rather useless, since plain old MT only allows one text filter to be used, and you usually want that to be something that prepares entry text for publication. With Builderoo, however, multiple text filters can be applied. And there's no reason why a text filter has to filter text for the purposes of public display.

Two hours later: RooSpell, a Movable Type spelling checker that highlights misspelled words during entry preview. Spelling suggestions can be viewed by moving the mouse pointer over the misspelled word. Misspellings are only highlighted during preview, not in the published entry.

RooSpell in action

RooSpell can be found in the Builderoo distribution. It requires that Ispell be installed on your web server, and it usually is on Unix-based systems. It also requires Builderoo.

(Contrast MTSpeling, which spell-checks sections in a template using template tags, and renders the spelling suggestions directly on the web page.)

July 20, 2004

Apache Performance Notes.

Old HotWired article on Apache tuning.

This old article on tuning Apache and PHP does a decent job of linking to other relevant (old) articles on the subject.

Web Services Theory and Practice.

Newbie HTML/CSS tip: It's common practice to have links change in appearance when the mouse pointer is over them, indicating that they are clickable. This is often accomplished using CSS, such as:

  A { color: #0000CC; }
  A:hover { color: #CC00CC; }

This idiom has the unfortunate side-effect that other uses of the <A> tag, particularly "name" anchors, also have the hover effect in some browsers. Internet Explorer does not apply the hover effect to A's that aren't links, so this mistake is often overlooked. Prior to CSS2, there hasn't been a good solution.

To apply the hover effect to links only:

  A:link:hover { color: #CC00CC; }

Of course, <a name="..."> is now deprecated. In most newer browsers, any section with an "id" can have the ID used as the anchor:

  <a href="#section1">
  ...
  <h3 id="section1">

Support for older browsers may require continued use of <a name="section1">, but only a few of those browsers would honor CSS anyway.

July 19, 2004

Vertigo... Then and Now. Modern day photos of San Francisco locations used in Hitchcock's Vertigo, matched to shots from the movie.

Periodic Table of the Operators.

MTPluralize

An example of a tiny MovableType plugin: On this site, the number of comments displayed at the bottom of an entry on the front page says "0 comments" if there are no comments. If there is one comment, it ought to read "1 comment", but the following template code would display "1 comments":

  <$MTEntryCommentCount$> comments

The following is one way to get the desired result.

continue reading...

July 16, 2004

The Onion: Nation's Liberals Suffering From Outrage Fatigue. "I'm like, 'Yes, we all hate Cheney. He's an evil puppet-master. Yes, Bush is dumb. This is obvious. How many times can we say it? Now, excuse me, will you let me through so I can microwave my burrito?'"

The final release of PHP 5 is available! Is it time to get back into PHP?

Why PHP 5 Rocks.

Other Movable Type Developer's Contest Entries

Eager to see other people's Movable Type developer contest entries, I asked the mt-dev list and the #mt-plugins IRC channel for volunteers to share. Understandably, some want more time to polish their plugins before releasing them to the general public. Here are some that volunteered announcements, in no particular order.

continue reading...

July 15, 2004

Introducing Builderoo

My MovableType plugin contest entry: Builderoo.

Builderoo is a text formatting system that removes some of the constraints normally placed on text filters. With Builderoo, you can switch filters in the middle of an entry, disable filters for a section of an entry, or apply multiple filters in any order to a section or the entire entry. Builderoo can cache the output of a filter for a section so the filter is not run again the next time the section is rendered (if the contents have not changed). Builderoo also includes a pre-filter macro facility, so macros can evaluate to text that is subsequently passed to filters, and can even change filters themselves. Builderoo has its own plugin API, so filters can interface with the Builderoo Console for web-adjustable configuration, or interface with the caching mechanism for cleaning up unused resources (e.g. generated images).

So text filters can do things like this:

That image was created by a MovableType plugin (included with Builderoo) from LaTeX mark-up embedded directly in the entry, like this:

<% Roo:latex %>
\begin{displaymath}
\int H(x,x')\psi(x')dx' = -\frac{\hbar^2}{2m}\frac{d^2}{dx^2}
                          \psi(x)+V(x)\psi(x)
\end{displaymath}
</% Roo %>

continue reading...

July 14, 2004

Cool Tools. (Thanks Rebecca.)

Web Testing with HTTP::Recorder.

Building a PHP Front Controller.

Via Boing Boing, a couple of links about one of my baritone heroes, Thurl Ravenscroft: For the next day or so, Basic Hip has MP3s of every track from one of his few solo albums, Great Hymns In Story and Song. UbuWeb has a short article and an MP3 of "Wing Ding Ding" and "You Wanna Talk Aobut Texas" by Roberta Lee and Thurl (scroll down to the bottom). Both sites have a bunch of MP3s of great, old, odd music.

All Things Thurl has a bunch of nice info.

July 13, 2004

On the New Site

Hammer in the loose nails, a bit of paint here and there... Done! Whew.

It's like cleaning out a closet. You find a bunch of stuff you haven't seen in a long time, organize a few things, discard a few things, and when you're done, most everything is back in the closet, but you're better off for it. It takes a while to get around to it; in my case, I've had a design similar to this one sitting around for three years, with no time to install it. And as with the closet, now that it's done, I am left with a feeling of peace, energy, and inspiration, for about a day.

continue reading...

July 12, 2004

Breaking in the New Site

I completely rebuilt this place over the weekend. I'm still working through a list of known bugs, but I decided to launch it anyway.

If you are seeing a broken-looking page with a white background, reload the page, close and re-open your browser, or clear your browser's cache. (Some browsers make special effort to hang on to old copies of stylesheets, even during a reload.)

More later.

July 9, 2004

The 2004 Google U.S. Puzzle Championship has ended. The winner correctly solved 22 out of 25 puzzles within the 2-1/2 hour time limit. The complete text of the test is available, as password-protected PDFs. Past years' puzzles are available in books.

By now you're probably heard of the short-lived but widely acclaimed BBC series The Office. You may have bought the DVDs, and maybe even the scripts. If you looked through the episode guide, you noticed there is one episode missing from the DVDs: the two-part Christmas special.

UK'ers and those lucky enough to have a DVD player that can play region 2 discs will be able to enjoy The Office Christmas Special on DVD on October 25. I'm tempted to download me one of them peer-to-peer file sharing thingies to get ahold of it sooner (not that I know where to find it)...

Orpheus Music Search is an example of the beginnings of my dream to have a giant music database with fuzzy searching capabilities. The full dream includes an intuitive interface, so I'll keep on dreaming, but if you can figure this out, it might be fun.

(Click the checkbox next to a melody, scroll down and find the "Calculate/Search" button, then click on it to find other melodies in the database close to that one. You can also upload a MIDI file for comparison, compare two melodies, or tweak the fuzzy factors of the search. P.S. It's slow, give it a minute.)

July 8, 2004

Tunes create context like language: why tonal music seems to make more sense than atonal music. The full article "discusses the extension of the notion of context from linguistics to the domain of music."

They Might Be Giants have opened an artist owned and operated Internet music store selling DRM-free MP3s. $0.99 a song, $9.99 an album. Plus web exclusives, and of course the usual assortment of free downloads. Only two albums offered so far, and no ability to preview a track yet, but a neat idea.

As of today, the iTunes music store has eight TMBG albums, with similar prices and the ability to preview. When you buy, you get AAC files, which include copy protection. Randall Stross of the New York Times wonders if iTunes files are worth collecting.

The Mudcat Cafe maintains the Digital Tradition Folk Song Database, an electronic collection of over 8,900 folk songs, with sheet music and lyrics, all searchable. If it's not there, the forums connect you with hundreds of other folk music enthusiasts that may be able to post information, which may eventually become part of the permanent database.

The site is organized oddly, so if you get lost, try Erich Rickheit's personal search engine for the collection, with automatically generated GIFs and PostScript scores.

Guitar players, see also Erich's chord voicings calculator and modal chord progression calculator.

July 7, 2004

The Onion presents: Good-Citizenship Tips (an Onion classic).

It can be cumbersome to enter your password every time you scp a file, or open a remote shell. If you use SSH between two hosts frequently, you can cut down on the number of times you enter your password by setting up public key authentication. There are dozens of tutorials on the subject, some of them lucid, so I won't repeat the steps here. Instead, linkage: 1, 2, 3.

In short, the steps are: Generate a private/public pair of keys using a password. Copy the public key to the destination computer. Set up your environment to run with the OpenSSH "keychain" utility, ssh-agent. Use ssh-add to tell ssh-agent to use the private key, prompting you for the password. From then on, ssh connections from the origin to the destination in that environment will not require a password.

The last bit is getting ssh-agent/ssh-add to run conveniently. With Linux and X, it's a simple matter of using ssh-agent startx to start up the X environment (or something similar), followed by a graphical prompt for a password on start-up.

For Mac OS X, SSHKeychain will manage passwords and keys across the system, using a nice interface. You still have to generate your own keys, but once they're set up, you only have to tell SSHKeychain your passphrase once, and every app that uses SSH can use the connection. Make sure to see the FAQ's description of turning on "Manage global environment variables" so all SSH processes will use SSHKeychain for authentication.

SSH Agent is another similar app for Mac OS X.

July 1, 2004

At the Apple Worldwide Developers Conference on Monday, Steve Jobs introduced a preview of a few features of the upcoming new version of the Mac OS X operating system, Mac OS X 10.4 "Tiger". The Dashboard feature lets you keep little mini-applications called Widgets on your desktop, and call them up to the front using a function key, Exposé-style. Such applications include a clock, a calculator, a calendar, a stock ticker, and an iTunes remote control. And it's easy to create new Widgets, because they're written in JavaScript.

Many noticed that this new feature sounds, looks and acts a lot like Konfabulator, a long-time popular shareware application for Mac OS X. The authors are appropriately upset, and claim they were never contacted by Apple. Konfabulator uses JavaScript as the basis for similar applications, and even calls the mini-applications "Widgets." The authors noted that the OS X 10.4 promotional material uses the phrase, "Redmond, start your photocopiers." The Konfabulator web site has their response.

According to the article, Apple has acknowledged the similarities between Dashboard and Konfabulator, but claims the idea is not unique and the implementation is entirely their own. Jerry found the blog of a Dashboard developer that notes Dashboard widgets are just web pages, which is a distinct design difference from—and likely an improvement over—Konfabulator's XML widget definition format.

Another OS X 10.4 feature, Spotlight, also resembles an idea actively developed in the shareware community. LaunchBar, Quicksilver, and Butler are all keyboard-activated launchers that pro-actively search your harddrive for applications, documents, music and address book entries to make them available with a few keystrokes. Given the existing competition in the launcher arena, it is difficult to accuse Apple of "stealing" the idea from a particular product—though it's still appropriate to criticize Apple for undercutting the shareware development community by introducing a competing product bundled with the operating system.

I can't say whether the "widget" idea is obvious enough to not conclude that Apple "stole" the idea of Dashboard from Konfabulator. But shareware authors and small software companies cannot afford the software patents the big guys use to lock out competition. I suppose Apple could be sued for monopolistic practices, as bundling applications with an operating system is increasingly considered to be, but I get so conflicted about antitrust issues that I don't want to think about it.

Regardless, so much value is added to Mac OS X by shareware developers that the effect of poaching the best ideas for the OS from the shareware community is worth considering.

Tim O'Reilly's paper on "The Open Source Paradigm Shift".

The Unemployed Philosophers Guild sells toys for humanities majors. Plush dolls of famous thinkers such as Oscar Wilde, Emily Dickinson, Frida Kahlo, and Gandhi. Sets of finger puppets of artists, philosophers and more to host your own heated arguments. Interactive pillows with famous artwork, including a Birth of Venus pillow that winds up and plays "Pretty Woman." Freudian Slippers. Poetry ties. After-therapy mints, after-Shakespeare mints, others. Nietzsche's Will To Power Bar. Watches, mugs, pill boxes, and more. And several anti-Bush items, as well. I'm ruining dozens of great gift ideas for friends and family that read my blog.