Skip to content

the blackberry just paid for itself

I just called Congressman Price’s office. The details of the Why of that call are for another blog post. The How is what I’m really interested in right now. I got an email blast from Lessig about H.R. 801, and in it there was a phone number for the Congressional switchboard. I was looking at that email in my phone and realized that the phone number was a link I could click, and suddenly I was making a call. I know this is something that people with blackberries have been doing for quite some time, but I had such a powerful AHA moment when I placed that call that I had to share it. What happens when everybody who has a phone can do this?

Carl Malamud for Public Printer

carl malamud poster

carl malamud poster

Inspired by this article via a tweet from Paul, I’d like to cast a vote (so to speak) for the the nomination of Carl Malamud for head of GPO. Yes We Scan.

Thanks to Mr. Malamud’s advocacy, government officials are starting to ask if the federal government is really doing all it is supposed to, to make government transparent. Last week, Senator Joe Lieberman sent a letter to the policy-making body of the Federal Court system “requesting proper compliance with the E-Government Act of 2002 on transparency and privacy issues as they relate to court documents,” addressing two problem Mr. Malamud had identified.

If we really do want change, it behooves us to push for Malamud.

Protégé tweak

I’m using Protégé for a class, and sadly the installer isn’t smart enough to install system-wide, which means I would have to cd to the install directory and issue ./run.sh to start protégé. Sub-optimal. Here’s the original run.sh:

#!/bin/sh

java ${CMD_OPTIONS} -Xmx200M -Dosgi.clean=true -DentityExpansionLimit=100000000 -Dfile.encoding=utf-8 -jar org.eclipse.osgi.jar

And my better one:

#!/bin/bash

pushd /home/<myuser>/Protege_4.0_beta
java ${CMD_OPTIONS} -Xmx200M -Dosgi.clean=true -DentityExpansionLimit=100000000 -Dfile.encoding=utf-8 -jar org.eclipse.osgi.jar
popd

This means that I can now go into my ~/bin and make a symlink to the run.sh as ‘protege’. Having done that, I can Alt-F2 and type ‘protege’ to start protege. Huzzah! Note that on some systems you may not have to replace sh with bash, but on Ubuntu sh is actually dash, which does not have pushd and popd.

Hopefully this will be useful to someone else installing Protégé on a Linux-based system.

a puppy for 2009

captain kazumiMy family has been going to various animal shelters about three days a week for some time. Today my parents got a puppy. I want to call him Captain Kazumi, but I’m not sure the name will stick. He’s 10 weeks old. Sorry for the awful cell phone pic, btw. Also, Happy New Year. :)

research!

My final project for my CMC class this Fall was a research proposal, and it looks like it was a good enough first draft that I’ll be meeting up with some folks to beat it into a form that I can talk about publicly with some confidence. Once I get to that point I can start dreading the IRB process. Yaaay!

bad math jokes

…from one of my logwatch fortunes. Just had to share:

Q:     An English mathematician (I forgot who) was asked by his very religious colleague: Do you believe in one God?
A:     Yes, up to isomorphism!

Q:     What is a compact city?
A:     It’s a city that can be guarded by finitely many near-sighted policemen!
– Peter Lax

musically, I’m a decade behind

I just had a funny conversation with a friend about why In the Aeroplane Over the Sea and Amnesiac are both great albums with several songs that don’t stand well on their own (at least not on the first listen), and their release dates (Aeroplane in 1998 and Amnesiac in 2001) meant that the former was loved and the latter… not so much. Once Napster and all the rest had sufficiently permeated the culture, people were first exposed to an album not as the assembled whole but through the individual song downloads, and some of the songs just didn’t seem worth downloading, so people came to the conclusion that the album, taken as a whole, was crap. Clearly there’s more going on here (expectations, packaging, etc.), but I think my point stands. What’s funny, though, is that my friend was simply SHOCKED that Aeroplane was released in 1998. She thought it was much, much more recent. This is an album she’s heard all the way through maybe four or five times. I think her words were, “I don’t think I could have appreciated Neutral Milk Hotel without first hearing a lot of Sufjan Stevens.”

It says a lot about Aeroplane that it doesn’t strike her as being a decade old. Come to think of it, last year I was totally stuck on OK Computer. I think I’ll continue my tradition of getting stuck on albums that are 10 years old. Anybody care to recommend some great albums from 1999?

depressing news is funny

Daily Show Shenanigans. Probably NSFW for you:

A couple of quick thoughts on the above video. Firstly, why is the death of the newspaper business as we’ve known it since the mid 1980s a bad thing? Secondly, <3 the Intarwebs.

predictably irrational

Tarus Balog lives just up the road and manages the team that maintains OpenNMS. He has a great post on his blog about the book Predictably Irrational. Check it out.

using schemaSpy with mysql

Perhaps you’ve inherited a database from a previous admin? Perhaps you have some database-backed software and you need a better understanding of the schema? You’re in luck! There’s a free Java-based tool called schemaSpy. You can grab schemaSpy from sourceforge. As of this writing the latest is 4.1.1. I’ll wait while you fetch it.

Great! Now that you have done so, please also grab the MySQL JDBC connector. You can find that here. As of this writing the latest is 5.1.7. Grab that, too.

I used that earlier today, pointing it at the database for Documenting the American South, but I’m not at liberty to share those pretty results. Instead let’s point schemaSpy at this very blog. First let’s make a directory for the output:

mkdir ~/blogschema

Now we can run schemaSpy and have it put some pretty diagrams and html there. That would look like this:

java -jar schemaSpy_4.1.1.jar -t mysql \
-dp mysql-connector-java-5.1.7/mysql-connector-java-5.1.7-bin.jar \
-hq -o ~/blogschema -host localhost -db WORDPRESSDB \
-u WORDPRESSUSER -p DBPASSWORD

Note that the stuff in caps would match what’s in the wp-config.php for the WordPress instance. Let’s unpack the rest of that a bit. The -t mysql tells schemaSpy we’re looking at a MySQL database, and will fail if you don’t have the matching -dp pointing to the .jar of the connector I had you download. The -hq means “high quality” output from graphviz (which schemaSpy uses to produce the diagrams). You really don’t want the default. Trust me; it’s ugly. After that we specify the output directory, the host that’s running the MySQL database, and the login info. NOTA BENE: you should NOT run this with the password on the command line like this on a shared system where you don’t trust the users or programs, since the password could be seen in the output of ps.

But what if (like me) your database is remote? SSH to the rescue! Open two terminal windows, and in the first, issue the following:

ssh -T -L 3306:localhost:3306 youruser@mysql.example.com

Where yourusername is your username and mysql.example.com is the host running the MySQL database. What if your login shell and the database are on different hosts? That would look like this instead:

ssh -T -L 3306:mysql.example.com:3306 youruser@login.example.com

The -T suppresses tty allocation and the -L says that the next part is the tunnel. The first 3306 means that the local port (local to you) entering the tunnel is 3306, and the second 3306 means that the remote port (the one connecting to mysql.example.com from login.example.com) of the tunnel is also 3306. Great! now this means that we can run the java -jar schemaSpy_4.1.1.jar blob as above on our local host in the other window you opened. Now let’s see what the results look like. Have a look here for that. It would be much more fun to show off the docsouth schema since it has foreign keys that make for pretty diagrams. Hopefully you have such a database you can diagram yourself. :)

Happy schemaSpy-ing! Leave a comment if anything is problematic or unclear.