Sunday, November 20, 2005

Wrestling with computers

Days like this drive me crazy.

I spent the morning sulking because I gave Alex a synopsis rather than a story. I should be able to do better than that. He is driving me there, but I need to avoid frustration with myself. I do value most of the work he gives me.

I spent the morning finding new databases for JOUR 319's data-mining assignment. You'd be surprised how much work it is to find files to teach with. I've been using cutomized files from the FEC of political contributions and PACs the past four years, but these files come from the 1996 election year. It's time to update, to Canadian databases if possible.

The Canadian government is just too welcoming, however. Elections Canada maintains similar databases but lets you search them online. It pre-matches political donations and contributions so there's no work for the analyst - i.e. my students. And there are few other free databases available publicly to relate and analyze.

So I return to the FEC. The problem is that its database of contributions is 300-MB large. Even worse, the FEC only hands out the database as length-delimited files, meant for use in the crappiest database manager known to Earthlings, Microsoft Access. What I have to is first convert the FEC files to MS Access on the WIndows XP machine, export them as tab-delimited files, upload them to a FTP server, walk across the room, download them to my Mac, and open them in Filemaker Pro.

My wee Mac is only a 533 MHz G4, and takes 90 minutes to load the 300 MB database. Right now, it's sorting th erecords by state. In order to make these files a reasonable size for my students, I limit the data to New England states.

OK, so that's that, and it's a stressful, large chunk of day. On top of that, Alex asked me to solve a CSS problem for him. I did it - well, Elvi did it, mostly - and it took two hours, despite my l33t Web skillz and a copy of "Cascading Style Sheets: Designing for the Web".

The page had a number of defined styles, which finished up with:

.tag {
font-size: 9px;

The Technorati tag in the text was as follows:

<div class="tag">Tags:<a href="" rel="tag">screenwriting</a>

But the link inherited the style from other styles and would not appear white. I solved this with brute force:

<div class="tag">Tags:<a href="" class="tag" rel="tag">screenwriting</a>

Elvi had a more elegant solution:

#tag {
font-size: 9px;
#tag a {

and this in the body:

<div id="tag">Tags:<a href="" rel="tag">screenwriting</a>;

That worked for me on Safari (OS X) and worked for Elvi in Firefox (Win XP), but Alex couldn't get it to work. He's using my brute force method instead.

We know the problem has something to do with inheritance, but none of us know why the div class attribute won't penetrate the link in the first case? Anyone?


Post a Comment

<< Home