Randomsort

I often need to randomly sort a file. I’m not aware of any standard bash or GNU command that does this, so I just wrote this very short script. There may be an even shorter/faster/more efficient way to do this, but I thought I’d post this as it might be helpful to a Linux newbie trying to accomplish the same task. Just put this in a file—e.g., “randomsort”; make it executable; and then pipe whatever you want to randomize into it (cat file_to_be_randomized | randomsort or randomsort file_to_be_randomized), and voila, you’re done.

 #!/usr/bin/perl my @array = <>; while (@array) { my $element = int(rand(@array)); print $array[$element]; delete $array[$element]; } 

Feel free to comment if you’ve got an easier solution.

Spring 2005

Spring is here, with a vengeance. I hear it got over 80 degrees today, although I was in my office and couldn’t tell through the window.

These flowers appeared in our front yard overnight. Click for bigger versions.

My hope is to add more multimedia content to my blog. I don’t have a lot of time to write these days, but at least I can post images, audio, and eventually video.

Google Maps and Craigslist = Great

Hat tip to Steve: Some genius has integrated Craigslist and Google Maps. Better, even, than chocolate and peanut butter.

(especially if you’re allergic to peanut butter)

Origins of Bluetooth

Maybe I’m the last one to know, but I just discovered the origin of the name “Bluetooth.” According to CNet’s Quick Guide to Bluetooth Headsets:

What’s in a name?
In case you were wondering, Bluetooth gets its name from a 10th-century Danish king, Harald Blatand (or Bluetooth) who unified Denmark, Norway, and Sweden. According to legend, he had an affinity for teeth-staining blueberries. Oh, and the logo combines the runic alphabetic characters for H and B.

I thought that was pretty cool. I had always assumed it was just a fanciful made-up name.

(By the way, this entry obviously follows from the last few—with a newborn baby, the more hands-free and cordless appliances you have, the better!)

Esther Naomi Pagerank

Not only do I have a beautiful baby daughter—but she already has a number one Google PageRank! How great is that?

By the way, as a new father I think I’m going to need a three month “low frequency blogging” pass.

Esther Naomi

Esther Naomi Rosi-Kessel, born 4/6/05 at 4:13am, 8 lbs 9 oz, 20 inches.

Baby Now

We’re having a baby. Right now.

If you’d like to get announcements on the progress, drop me a note and I’ll add you to the list.

Over and out.

IM(usic)DB?

Why isn’t there an Internet Music Database analogous to the Internet Movie Database? That is, a collaborative/community-built resource filled with information about musicians and albums?

The closest thing we have is freedb, or the commercial-equivalent cddb, but these are very different from what I’m imagining. With freedb, you can look up artists, albums, tracks, and genres. That’s about it. No lists of the musicians/instruments playing on each track. No links to reviews, commentary, images of the musicians, etc.. No collaborative quality rating system. None of the other various resources that make IMDB the top result in Google for most movies (usually higher even than the studio’s own page for that movie).

So am I missing something? If not, anyone interested in starting the Internet Music Database?

Cable Not Found

I just spent about an hour-and-a-half trying to find a monitor cable. What I wanted was a 10-foot DB15 male to HDDB15 male cable. DB15 is the old “low density” (two rows) monitor connector used on old Mac monitors. HDDB15 is the newer “high density” (three rows) monitor connector used for PC VGA monitors. I found lots of adapters, but no cables that had the DB15M-HDDB15M ends.

I have this very old gigantic monitor (weighs about 70 pounds) that actually has both the HDDB15F and DB15F ports; however, the HDDB15F port doesn’t seem to work, so I’m stuck with the DB15F port. I was using an adapter/cable combination, but because the set screws in the back of the monitor are broken, it kept falling out and I couldn’t figure out a way to keep it in—I tried tape, string, etc.. So I thought a single cable would be easier to keep from falling out.

I’ve discovered in this experience is that, despite the huge variety of offerings from pricewatch and froogle, there really is only a small set of products out there, and everyone is offering the same thing, albeit at different prices. I suppose what I really need is a custom cable, since what I want doesn’t appear to exist.

In any case, I ended up settling for a monitor/adapter combination where the adapter would be on the computer end rather the monitor end, hopefully making it easier to get the cable to stay into the monitor.

This is the kind of thing the web is supposed to make easier (Radio Shack certainly doesn’t have this item!). But I couldn’t find any cable website where I could just type in the names of the two ends of the cable and the length I wanted. That would have saved me a couple of hours.