The Value of Community, or Why I Love Perl

A Tech article with View Comments posted 31 March 2007.
Tags: , , ,

I’ve been asked a number of times recently why I chose to use Perl to develop SAGrader, my company’s flagship essay grading product. I’ll be the first to admit that Perl tends to permit bad (unreadable, unmaintainable, overly terse) code in more ways then, say, Java. I think that those problems are mitigated by keeping to modern best practices in Perl and adhering to a coding standard, but that’s not why I love Perl. I love Perl because of the community.

SAGrader, for example, is only implemented in about 40,000 lines of code, split between actual application code, unit and acceptance tests, and HTML templates. That’s all! But if you ruthlessly reuse code from CPAN, the hub of the Perl community, you can implement computationally intelligent essay grading, a complete website to handle thousands of students, and everything else that goes on behind the scenes to make a website like SAGrader work in very little code and time. While SAGrader may only be 40,000 lines of code, we reuse almost a million lines of Perl from CPAN.

The downside of this much code reuse is that it increases the resident size of your program in memory. Frankly, memory is cheap, and programmer time, effort, and happiness is not. Perl might not be the best tool for every job, but for this job, it’s saved us (without exaggerating) man-years of time and effort.

NetIdentity aren’t smart

A Tech article with View Comments posted 28 March 2007.
Tags: ,

Up until recently, I was a customer of NetIdentity for my old email address (ted@carnahan.com). I left their service, because for $60 a year I was getting a 1G email inbox and really lousy webhosting. Contrast that with Dreamhost, which offers 20G of storage, unlimited domains, IMAP access, and a bunch of other features for a little over $100 per year. Here’s their business model:

  1. buy a bunch of name-based domains (like carnahan.com)
  2. sell (expensive!) email addresses and subdomains
  3. profit until people wise up and get their own domains
  4. send threatening-sounding emails when they cancel their accounts

Keep in mind that I was a loyal customer, for values of loyal that include being with the same email provider for 9 years. On the Internet’s timescale, that’s geologic.

It all came to an end when I got fed up paying good money for a mere subdomain lacking even PHP. So I left them. We’re seeing other people. I’m seeing a webhost that stinks less, they’re seeing the gullible people who still don’t know any better. I didn’t let things linger – I told them it was the end. But now, the relationship takes a sinister twist – they’re stalking me! I’ve received several emails entitled “Your NetIdentity account will be locked!”

Hi folks! I know that my account expired last month. I know that you’re going to turn off access to my accounts. I told you to do it. Stop sending me email acting like I just made an oversight or a mistake. We’re finished.

Miscellany Abounds

A Tech article with View Comments posted 27 March 2007.
Tags: , ,

Now hear this:

I got news from Wartburg Theological Seminary that, provided that my last recommendation form and a stray college transcript get turned in soon, I will get my provisional acceptance to the seminary. I also found out that I will have to take Summer Greek, so I can expect to start the third week in July. Less than 4 months to go!

My website was offline for about a day. Sorry about that – Nightmarehost’s one-click installer picked the wrong database hostname (but the right database, fortunately) for my WordPress installation, and when I deleted that hostname, it took my site down (but not my data). Either that, or I picked wrong – but I’d rather blame them.

Merl Ledford III is my new personal hero. I read a terrific letter from this attorney whose “middle-aged, conservative clients” are accused by the RIAA of downloading gangsta-rap. He’s taking the fight to them. In his words: “It is no fun becoming a litigation target as the result of your clients’ widely-discredited tactics.”

That is all.

What people really think when I talk

A Family article with View Comments posted 19 March 2007.
Tags: , ,

Blah blah blah

My friend and co-worker Nate drew me a picture today with the Mouse Gestures extension for Firefox. He says that when I talk, this picture shows what it’s like for him.

For what it’s worth, I don’t wear glasses anymore, and I don’t have a receding hair line – at least not yet. But who am I to question his artistic creativity?

NetworkManager problems in Ubuntu Dapper/Edgy

A Tech article with View Comments posted 19 March 2007.
Tags: ,

Both Jennifer and I have had a problem with our laptops for a long time where wireless does not always get reinitialized when our computers come back from standby. On Friday, we ran into this same problem with a work laptop. All three are Dells, but they are very different machines: a 3-year-old Inspiron 5150, a new-ish Inspiron 9400 (my baby), and a brand new Latitude D620. In every case, this little script helps:

#!/bin/bash

# Pick the right kernel module for the hardware here
sudo rmmod ipw3945
sudo modprobe ipw3945 ieee80211
killall nm-applet
nohup nm-applet 2>&1 > /dev/null &

This solves two different problems. First, sometimes the wireless fails to show up as wireless – that’s what removing and reinstalling the kernel module does. Secondly, even when the wireless interface is available, sometimes the NetworkManager applet drops the ball and won’t recognize it. A restart of the applet fixes that problem. Hopefully someone else will find this little script useful too.

Migrating from Dreamhost email to Google Apps

A Tech article with View Comments posted 18 March 2007.
Tags: ,

Moving 7000+ messages to GMail

After moving my church to Google Apps, I have decided that I like the GMail interface so much that I want to use it for my own personal email address. I want to move my copious existing email archives to Google, and that’s where the complications kick in:

First, my mail archives are in a Dreamhost IMAP account, and GMail can only retrieve POP3 mail.

Second, if I change my DNS, I may not be able to tell Google where to find my mail at all.

After pondering it for a bit, here are some informal, probably incomplete notes about what I did (in brief):

  1. Download a local backup copy of the Dreamhost IMAP mail. You can never be too careful.
  2. Copy all mail from all folders into your Inbox. This includes your Sent Mail, so copy that into your Inbox as well. GMail will handle the threading (mostly) correctly when it downloads your mail.
  3. Change the MX records in your Dreamhost panel to point to Google. Check the box for Dreamhost to keep accepting mail for your domain.
  4. Tell your GMail account to check mail for your Dreamhost account using POP3. Point it at mail.YOURDOMAIN.com, which isn’t affected by the MX record change (because you told them to keep accepting mail) and tell it not to delete mail off the server.
  5. Wait for GMail to grab all of your mail. It’ll take a while. (It took about 24 hours to move 7000 messages. You can check the progress in Settings:Accounts)
  6. If you copied your sent mail to your Inbox (recommended), you’ll notice a lot of conversations that only have mail from you. Just archive these in GMail and they will end up in Sent Mail where they belong.
  7. After Google has retrieved all of your POP3 mail, check your Dreamhost account one last time to pick up any mail that got delivered there while the MX record was changing.
  8. Log back into Dreamhost and tell them to stop accepting mail for your domain (and just use the custom MX entry).
  9. Viola! Now you use GMail!

I’m pretty happy with the results – all of my mail moved over, properly threaded, easily accessible. Life is good! Of course there are some things that aren’t so good. Right now I am afflicted / bothered / annoyed by these issues:

  1. The Google Apps personalized home page is not as fully featured or good looking as the one that comes with a normal Google Account. For example, you can’t add the shiny widgets (like Google Reader).
  2. If you already were signed up for a Google Account with the email address you are now using with Google Apps, some things are going to break. For example, Google Calendar won’t accept invitations to use new calendars until you disambiguate which account uses that email address. You can only do that by changing the email address associated with the Google Account.
  3. Nothing will get pulled across from your regular Google Account. For example, you start fresh with a new Calendar.

As of now I’ve moved my calendar and mail over, and I have a separate Google Account for using Google Reader, and it’s working pretty well for me. By the way, I’ve added a link to my Google Reader Shared Items in the sidebar on my homepage.

Restoring from backups with F-Spot

A Tech article with View Comments posted 17 March 2007.
Tags: ,

I recently had to restore from backups on my laptop, and fortunately all of my pictures were backed up. When I went to import them into F-Spot, I noticed (to my dismay) that the dates on at least a third of the pictures were set to the current date instead of the date they were taken. No EXIF data?! Aghast, I set off in search of a solution.

F-Spot stores your photos in a %YYYY/%MM/%DD directory structure, which makes things easy. I wrote picture-toucher.pl, a perl script that uses File::Touch and DateTime to change the modification time on every picture file.

All of those files now have “noon” as their modification time, but it’s better than nothing. Because F-Spot uses the EXIF data when it’s available, nothing changes for files that have EXIF data.

Netflix RSS feeds in Liferea

A Tech article with View Comments posted 14 March 2007.
Tags: , ,

Liferea, a good Linux RSS feed reader, has been my feed reader of choice until recently, when I switched to the excellent Google Reader. Unfortunately, Liferea sorts posts with the same date alphabetically (in a computery way) so that Netflix RSS feeds, which help you keep track of your queues, don’t sort properly in the application. That is to say, “10 – Movie A” comes before “2 – Movie B.”

My workaround is a small Liferea/Snownews extension to add leading zeros to the queue position. Simple, and it Just Works.

Odometer == 1000 0000 0000 0000 (base 2)

A Family article with View Comments posted 13 March 2007.
Tags: ,

This evening, a major milestone was reached in the life of my Ford Taurus:

Car Odometer at 65536

Our odometer just rolled over to 216 = 65536 miles. Rolling over to 1000 0000 0000 0000 (base 2) miles is much more exciting than reaching a mere 100,000 (base 10) miles.

Heard in the office today

A Tech article with View Comments posted 12 March 2007.
Tags: , ,

“I have a comment. In my code. That says ‘Uh oh.’ And I don’t know why.”