The Value of Community, or Why I Love Perl

Saturday, March 31st, 2007

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.

What people really think when I talk

Monday, March 19th, 2007

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?

Heard in the office today

Monday, March 12th, 2007

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

A new unit of measurement: the “DreamHost”

Thursday, March 8th, 2007

After experiencing load averages over 50 on two DreamHost servers, gummi and hyperion, I would like to define a new unit of measurement: the “DreamHost.”

One DreamHost is defined as a server running with a one-minute load average of 8.

Hence, my server has been running at between 6 and 7 DreamHosts today. But I’m getting off easy, this guy ran into DreamHost servers running at 125 DreamHosts!

I’m done dreaming - I’m having nightmares now.

Scientific proof that students procrastinate

Monday, December 4th, 2006

SAG2 load average 03 Dec 2006

This graph, from our new release of SAGrader at work, is proof positive that students wait until the last possible moment to complete their assignments. This is the average load on the server for an assignment that was due at 11:00pm on Sunday, December 3. And, happily, we weathered the onslaught with nary a hiccup!

Reliable InnoDB hot backups

Friday, October 27th, 2006

There are number of blog posts out there that mention --lock-all-tables as a good option to backup MySQL tables with mysqldump - even InnoDB tables. Don’t do that! That option is for MyISAM tables that don’t do transactions. InnoDB has ooey-gooey transactional goodness that will take a consistant backup without locking all your tables and keeping your applications from running in the meantime. Just do your InnoDB hot backups like this:

mysqldump -u USERNAME -p --add-drop-table --add-locks --create-options --disable-keys --extended-insert --quick --set-charset –single-transaction –all-databases | gzip > OUTPUTFILE

Then viola! No nasty table locks!