A Mystery Solved

Felix Leiter has appeared in 9 of the 20-some Bond movies. But he always looks different (except for Live and Let Die and License to Kill). He’s usually white, but was once black. Not only that, but in License to Kill, one of his legs was bitten off by a shark, but it was whole again in Casino Royale.

There is only one possible explanation: clearly the man is a Time Lord.

Further Thoughts on Musical Evo-Devo

I keep thinking off and on about writing a program to apply evo-devo to musical composition (part 2 ). There are tons of problems to solve, of course, but I may have made some progress.

Read More

How Not to Lose Disks

Have you ever upgraded a machine, only to find that during the upgrade, your device names got rearranged, so that your filesystems aren’t where they used to be, and you can’t mount anything?

This happened to us at work: we upgraded a fileserver with a hundred or so filesystems on a SAN. The driver software silently shuffled the devices around, so after the upgrade, nothing got mounted where it beloned. We had to ask the users to look through the filesystems and tell us where they should have been mounted.

To prevent this sort of thing in the future, we adopted a simple trick: on each filesystem, create a file called mountpoint that says where the filesystem ought to be mounted.

Yes, this is pretty much the same as labeling each partition, as some OSes allow you to do. Except that it’s arguably more robust, because you don’t need to rely on different versions of the OS being able to read the partition label. Besides, it’s simpler, and survives backups, replication, and so forth.

Automating all of this is left as an exercise for the student.

The Mainstream Media’s Fluff Bias

If you watch TV news, you may have found yourself wondering why they’re going on and on and on about Paris or Britney or Lindsey or whoever, instead of, like, news that you care about.

Russell Glasser, a student at U Texas at Austin, is currently writing a thesis on this subject. His basic approach was to data-mine both Google News and Digg, the idea being that the former gives a representative sample of what the news media are talking about, and the latter gives insight into what people are actually interested in. You can read more about this, as well as a draft of the thesis, here.

The basic idea is fairly simple: let’s say that in a given month, there are 99 news stories about Britney Spears and one about Tiger Woods; but on Digg, a lot of people recommend the one Tiger Woods story and ignore the 99 Britney Spears stories. It seems reasonable to conclude that the news-reading public cares a lot more about Tiger than about Britney.

And, in fact, his conclusion is that there’s a definite bias towards fluff in the media.

The whole thing is also an interesting exercise in teasing information out of noisy data: any given datum could easily be wrong: someone might Digg every story he reads; or a newspaper might run two Paris Hilton stories in one day because the news editor and entertainment editor didn’t realize that the other one was already covering the story. But if you have a lot of such noisy data (and nowadays, thanks to the Spew, we do), then you can still tease information out of it.

A Step Closer to Good Electronic Books

I got to play with a Sony PRS-505 digital reader at a bookstore today. Basically, it’s an electronic device about the size of a slim paperback, with a big screen on which to read electronic books. According to the signs, it allows you to read plain text (it found a README file on the SD card I stuck in it), PDF files, and whatever proprietary DRM-hobbled format Sony’s pushing this year.

I think I could stick it in my back pocket like a paperback, but at $300, I wouldn’t want to accidentally sit on it.

The most impressive thing about it, in my opinion, is the screen. It was hard to judge with uniform neon lights, but as far as I could tell, the screen was reflective, like paper; not light-emitting, like cell phone and PDA screens. If you’ve ever struggled to read a PDA screen in bright sunlight, and like reading at the beach, you’ll appreciate the difference. The screen is also nice and crisp, with good resolution. It’s not quite like reading a book, but it’s up beyond 8-pin-printer and into cheap-ass laser printer quality. In fact, for a moment I was fooled into thinking that instead of a working model, they’d displayed a mock-up with a printed sheet of paper to show what the display would look like.

The device doesn’t have a touch screen, but there’s a row of ten buttons down the side to allow you to quickly select one of ten menu items. There are also buttons in different locations that allow you to turn pages, depending on how you want to hold the book.

Either the controls or the display seemed sluggish, though. This may be a limitation of the technology used for the display.

All in all, it seems a reasonable device that I could see myself using to actually read books. Even if I don’t want to shell out for proprietary-format books, Project Gutenberg still has a ton of good stuff, and there are lots of things on the web that are easily convertible to PDF. To say nothing of possibilities like uploading RSS feeds and whatnot.

Stepping back for a moment, though, this device (and others like it) seems to suffer from the same problem as MP3s: you can take the attitude that what matters in a book is the text, just as what matters in an album is the music. So you don’t need the physical book any more than you need the physical CD and booklet.

But books and albums are still, well, physical objects. Back in the days of LPs, album covers were often intricate works of art. CDs don’t give artists as much room to work with, but there’s still a lot that can be done to make the physical album an interesting object (like the Lego-textured jewel case for Very). Books often have cutouts in the cover, or fold-out pages (like the maps in the back of Lord of the Rings), or bleeds, or textured paper, and other elements that don’t lend translate well to bits. So while I concede that what matters is the content (and boy do I sometimes wish my O’Reilly bookshelf were greppable), sometimes it’s nice to hold a cool object.

Embryology and Programming Languages

If you’ve never thought that the way molars develop in mammalian fetuses is way cool, you should read this article by PZ Mhieares at Pharyngula. It’s all about one substance in the environment of the developing jaw saying “you are going to become a bit of enamel”, and then that turns on another substance that tells neighboring cells, “cancel that: you don’t want to become enamel after all”, and stuff like that.

One fascinating thing about embryology is that the way living bodies develop is completely different from the way you’d build a house, or a credenza, or a sewing machine. It involves working in different media, with different tools, and that affects the way you do things, sometimes radically.

To me, the shift in thinking about building furniture to thinking about embryology is like learning a new programming language.

Read More

Pattern Substitution as Funky Iterator

I have a project in which I have a row of cells, and a number of segments of given lengths, and I need to try out all of the ways in which the segments can fit into the row. If you like, think of it as: how many ways can “eye”, “zygote”, and “is” be placed, in that order, on a row of a Scrabble board?

I’m doing this in Perl, so naturally I’d like to play to Perl’s strengths (pattern matching and substitution) rather than its weaknesses (arithmetic). And I’ve discovered a nifty little hack.

Read More

Another Law of System Administration

Let me propose this law, to see if it grabs anyone:

There is no task, software package, or piece of equipment so simple that it cannot be made to require a dedicated admin.

There are supercomputing centers with so many RAIDs that normal failure rates and ordinary statistics show that there will be several disk failures per day, so they have a person whose job it is to go around and replace the disks that died overnight.

And a friend just found a job opening for a Subversion admin.

Calculating My Tastes

One thing you can do in iTunes is to give songs a rating from 1 to 5 stars. It also has an option to play highly-rated songs more often during shuffle play, but frankly, I can’t be bothered to go through my collection rating songs by hand. And besides, the metadata that iTunes stores for each song includes things like the number of times it was played, the last time it was played, the number of times it was skipped, the last time it was skipped, and the time when it was added to the library. It seems that from this, it should be possible to figure out what I like and what I don’t like. Specifically, it should be possible to write an AppleScript script that goes through the library and computes ratings.

Read More

Fun With Playlists

One thing I like about iTunes is its “smart playlists”, which are not simply lists of songs, but are defined by certain criteria. For instance, I have one called “80s Music”, with the single rule

  • Year is in the range 1980 to 1898

which, obviously, contains all music from the 1980s, and is automatically updated when I add or remove songs.

Recent versions have added a number of other features and criteria, which make various interesting lists possible. Read More