December 28, 2003

Vacation Time!

We're heading off to Cancun this afternoon!

Posted by Dave at 03:56 PM | TrackBack

December 26, 2003

Christmas

Our family celebrated Christmas at home for the first time EVER! We're normally in Mecca (aka Grand Rapids) for pretty much the whole week. It was nice. Good presents, good food, all that stuff. Even got to sleep in.

I hate feverish dreams. First, you're doing something dumb. Like becoming a square pinecone ornament. Well I think it was more like trying to become one with all the square pinecone ornaments on the tree all at once. Second, you can never do it, but keep trying again and again and again. It's really quite frustrating. And then you wake up shivering cold or sweating hot and can't fall asleep because you still have the headache you've had for days. poo.

Posted by Dave at 12:09 AM | TrackBack

December 22, 2003

sick and dying

So I got the flu. Slept 16+ hours last night. Feeling better now, and hopefully I'll be all well be tomorrow afternoon, when we leave for Grand Rapids for Nanninga family Christmas activities.

Posted by Dave at 08:43 PM | TrackBack

December 21, 2003

subversion

No, I didn't "destroy someone's (or some group's) honesty or loyalty" today. Subversion (SVN) is a file versioning system. It's intended to replace CVS which is old and ugly. SVN is fairly stable now, but I'd never really read about how awesome it is compared to CVS. A few big differences from CVS, such as version numbers and branching, but just the fact that it handles "copy" commands and directories is a enough of a Good Thing to make me want to try it. I've got it up and running (mostly) on my gentoo box. Haven't got permissions really worked out yet though. I'm going to use it to host some of my personal projects (e.g. websites).

Posted by Dave at 12:56 AM | TrackBack

December 20, 2003

perl module awesomeness

There's no such thing as a complete ISBN database. Some places, like the Library of Congress have really big databases, but not complete. I learned a lot about ISBN numbers tonight (trying to find some sort of database I could use); I ended up writing a perl script to search the LOC database; and I wrote a sweetly simple screen-scraping script.

The LOC database isn't international, and it's not complete either (some lack ISBNs for some reason). Somehow places like amazon.com compile nearly-complete ISBN databases though. You can't really access amazon's database however.

I wanted to programmatically access book information by ISBN. I thought I'd have to write a screen-scraper to simulate a search and parse out the information from the results page. But LOC supports a z39.50 search interface. And there's a perl module to use that. The search results are returned in MARC format. And there's a perl module to use that. It took a while to get it right, but I now have a very small perl script that takes an ISBN and prints the title, author, edition, and date! Awesome!

#!/usr/bin/perl -w use strict; use Net::Z3950; use MARC::File::USMARC; print "syntax: search.pl ISBN\n" and exit if !exists $ARGV[0]; my $isbn = $ARGV[0]; my $host = 'z3950.loc.gov'; my $port = 7090; my $db = 'Voyager'; my $conn = new Net::Z3950::Connection($host, $port, databaseName => $db) or die $!; my $rs = $conn->search("\@attr 1=7 $isbn") or die $conn->errmsg(); my $n = $rs->size(); $rs->option(elementSetName => "f"); $rs->option(preferredRecordSyntax => "USMARC"); foreach my $i (1..$n) { my $rec = $rs->record($i) or die $rs->errmsg(); my $m = MARC::Record->new_from_usmarc($rec->rawdata()); print $m->title(), "\n"; print $m->title_proper(), "\n"; print $m->author(), "\n"; print $m->edition(), "\n"; print $m->publication_date(), "\n"; print "\n"; } $conn->close();

I did write a screen-scaper tonight, too. But for a different reason. Using Template::Extract, I wrote some terribly simple templates to extract links and data from webpages. Looping through the returned data has a funky syntax, but I managed (with some help from Data::Dump):

foreach my $course (@{$data->{'courses'}}) { print $course->{'dept'}, "\t", $course->{'number'}, "\t",course->{'section'}, "\n"; }

Posted by Dave at 03:02 AM | TrackBack

December 19, 2003

Return of the King

Fantastic movie. I was going to finish reading the book first, but I got cajoled into going by some friends. Definitely have to finish it now.

Posted by Dave at 12:13 AM | TrackBack

December 17, 2003

perfection

A musing on the failures of perfection. Ah, the irony.

Some things should not be kept perfect. Things that have problems and troubles are improved and made better. If something keeps moving along perfectly, it gets weak and meaningless and when something does go awry it blows up big time and is irrecoverable. Of course sometimes when something goes wrong, you can't work through it and it's ruined. But when you do work through it, you're better and it's better. It's a good thing.

So what do you do when everything's seemingly perfect? Do you create some small problems, to keep everthing in balance, to make sure the whole is working all right and can handle a few problems? That would seem dumb wouldn't it. But if you're confident it can handle a few problems, it would be good to "stress-test" it wouldn't it? Factories do it for products, why shouldn't we do it for less tangible parts of our lives? So we'll do it.

How do we do it? Well most real-life stress tests keep bending one thing until it breaks. Do they have ones that push and prod all sides at once? Perhaps, but the former seems much more common. And certainly more useful as it can be used to measure the durability of the one part. So let's apply this to life. We have to pick one aspect of this "thing" we're testing. I dunno how we'd do that. I guess something not vital, so that when things break, nobody dies or gets permanently damaged. It's gotta be something that'll in the end make the whole better. So then we try to break it. This is the weird part. I would suppose it shouldn't be obvious, otherwise others involved will get suspicious and things might blow up then. (maybe that would be good, though :-)) But if we're not obvious about the problem we're creating, we're being manipulative and secretive. That alone could give us a problem to deal with, but I'm afraid it could be too drastic.

Thus... thus, thus. A bit of a dead end. Taking this into our own hands is far too dangerous. What shall we do then? Pray for a problem? Plant a problem seed and let it do the work? Sit idly by and let this "thing" become a routine, invisibly fragile, unimportant part of us? Maybe so.

Posted by Dave at 08:44 PM | TrackBack

December 16, 2003

Let it snow!

I said, "Let it snow!"

S-N-O-W, not rain.

Posted by Dave at 12:42 PM | TrackBack

December 15, 2003

trackback

Since this blog is powered by movabletype, it has a cool feature called "trackback" to interact with other blogs. Unfortunately it doesn't work if you don't use MT, or you use MT but with trackback disabled. However, some people are smart enough to do it.

So this entry is technically in response to http://www.kyleandkelly.com/scribbles/archives/000123.shtml I don't have much to say about it except.. let's see if trackback works. And what's up with the "Hi Everybody!" reference?

Posted by Dave at 10:05 PM | TrackBack

exams

Exams have been fairly easy so far. One incredibly busy day last week included my CAS night class final. My first real two were today. Database and History. Finished each in about 40 minutes. None tomorrow, but I'm working. Still have to write a Spanish linguistics analysis and study for my Spanish Linguistics final. All this is relatively easy but unpleasant so I've been perfecting my skills of procrastination. I suppose I really should start doing Spanish stuff. or at least my database final project, which should be a little less unpleasant. blergk

Posted by Dave at 09:47 PM | TrackBack

December 14, 2003

procrastinating

three entries in one day! i'm off to a great start. or i'm procrastinating because i don't want to study for my history or database finals tomorrow. but i really should because failing is bad. and i need to work on a spanish linguistics analysis and study for that exam; and i'm working all day tuesday. i wonder if in can bilingually post here.. spanish & english. i mean of course i can just type in english & spanish but can i have a spanish version correspond to an each english version? i doubt it. stupid programmers. if i wrote programmed this blog, it'd be able to do that... but of course i didn't. and i won't because it would take a long time and suck in many ways that it doesn't suck now.

Posted by Dave at 11:08 PM

GFS Annual Meeting

So last night was awesome. GFS has an Annual Meeting every year at Christmas time. I'm an intern there, so I got to go. First was a dept meeting where they announced awards and stuff; kinda boring, especially in comparison to the rest of the night.

It was at the new DeVos Place and the entertainment was a whole fair, inside the building. Clean, indoors, and all free! Ferris wheel, DDR, mechanical bull (awesome), Segways (very awesome), buffet dinner, fancy desserts upstairs, other fair rides, giant twister, elephant ears, bungee runs, etc, etc. I went with Cherith and we met up with Kyle and Kelly Adams, and hung out with Keen and Randy & Dana for a while.

I forgot to bring my camera, but fortunately all my friends there are Comp Sci people like me, so they had their digital cameras. Once I get pics from them I'll steal them and put them in my photo gallery.

Posted by Dave at 11:02 PM

blog

Well.. I've got a blog set up now. We'll see how it works out.

Mad props to Kevin DeGraaf, the server sysadmin, for a quick response in getting some required software installed.

Posted by Dave at 10:28 PM