Thursday, January 29, 2009

Clojure and MySQL

Here's the magical connection incantation to get Clojure and MySQL talking:

(def *db* {:classname "com.mysql.jdbc.Driver" :subprotocol "mysql" :subname "//your-server/your-db" :user "your-user" :password "your-password"})

Assumptions - you're using

  • Stephen C. Gilardi's clojure.contrib.sql library, and

  • MySQL's Connector/J JDBC driver, with mysql-connector-java-5.1.7-bin.jar in your Clojure classpath.

Clojure is elegant. It's from the future, with features like support for software transactional memory. Meantime, it's a close personal friend of Java, so it plays well with more mundane tools. I get a buzz when that happens. I've flirted with lisps before, but this one feels like a keeper.

Incidentally, the Connector/J license defaults to GPL, so it may contaminate your application like ice-nine. Hail Bokonon!


Thursday, January 22, 2009

I Accept Full Responsibility For This Post

Timothy Geithner is the latest government official to take (or "accept") full responsibility for a mess. So much courage in the public sector! But there's always an unspoken asterisk - full responsibility, as long as there are no consequences. As long as I don't lose my job. As long as it doesn't cost me anything.

In Geithner's case, the statement is especially absurd. Of course he's fully responsible - he did his own tax returns. Does he imagine that he's taking the heat off Intuit? Were fingers pointing their way because they left the "Do you work at the IMF?" question out of Turbotax's canned Q&A?

But even when the responsibility-taker sits atop an org chart and really is talking about the mistakes of people down below, the statement is meaningless. It's easy to take full responsibility when there are no consequences. How about "I accept full responsibility for my team's mistakes, and therefore I'm resigning"? That would mean something.

Saturday, January 10, 2009

See Ya, Dubyuh

Well, it's almost over. We're getting our country back. We rented it out to some lousy tenants, and they did a lot of damage to the place, but the eviction notice stuck this time. Soon we can start to repair things. (Except for the Supreme Court appointments. They'll be around for a long time, occasionally causing pain and embarrassment. Like herpes.)

Bush has had a chance to watch Obama in action for two months now. I wonder if he sees the difference, if he's picking up even a glimmer of how a real leader does things. Maybe he has a clue now about what went so wrong for the last eight years.

Probably not.