Thursday, August 28, 2008

Obama v. McCain v. None-of-the-Above

You remember back in high school or college, taking those tests where at the end there was

E) None of the above

And that answer was almost always right (or maybe not - my grades were never that great)? It just seemed like usually if that was a possibility, that was the answer. Even after last night's rousing speech by Barack Obama, I still feel like I am sitting here waiting for that other candidate to come along. The 'none of the above' candidate.

I can't stand the Conservative penchant for inserting their morality into my life through political measures. Do we really need the government to tell us that we should be Christian, that people can't make fundamental decisions about their bodies and their health, and that gay people's feelings about each other are so illegitimate that we should not allow them to share the same rights that straight couples share? Why am I not a patriot because I don't support a needless war in Iraq. Doesn't anyone see the parallels with Vietnam? Surely McCain does, because - oh hasn't he mentioned this - he fought in that war, and was a POW! That means only he is qualified to posit an opinion on American involvement in any war, anywhere. While I by no means intend to minimize his struggle, did sitting in a prison for years really make him more qualified to be a Commander-in-Chief?

Conversely, I am really tired of the Liberals telling us about the evils of 'outsourcing', how the American dream is a factory job, how everyone should buy American made goods because that's the RIGHT THING TO DO. Why do I have to buy overpriced things just because they are made here. Oh by the way, let's tax the corporations more! How dare they try to create shareholder value! Where do you think those profits go? It couldn't POSSIBLY go toward job creation, increased shareholder value, dividends for investors who are very guessed it...AMERICANS. Sigh. Unions are bad - a relic of a time gone by when working in factories was dangerous and workers didn't have options. Now they do. Transportation, the internet, and the media have the legitimate mission of the Union obsolete. Oh, by the way - factory work is NOT the American dream. The American dream should be better than that, so stop pandering to people who want to work cushy jobs at Union wages, doing work that can be done for 20% the price by an uneducated third-world worker, or by a robot. The American Dream is to be the person who creates the f******g robot, people. While we are on the subject of moving forward, let's move forward on this message, Barack.

Where oh where is the candidate who comes in and says "You know what, let's be intelligent here. You want to go to church? Awesome. Do it. I don't care which one, because it's not my damned business. Oh, you're gay? And you want to live in a monogamous relationship? Go right ahead - it's not bothering me! Hey while we are at it, you know what I think - I think that the NRA is misusing an old statute that was put in place to keep the British army from overrunning their town! Let's come right out and call bullshit. Oh and the unions, we don't want their support, because they are NOT ACTING IN THE BEST INTEREST OF AMERICAN WORKERS. We aren't going to tax businesses more, but we will close the tax loopholes. You know what we are going to use that extra money for? Hmmmm. How about energy technology research, so that we can stop acting like we are really concerned about the middle east, and stop fighting wars! Maybe we should save our fight for things like fighting to keep our budgets in check. And on the topic of social security - why is it so bad that we would privatize it. We don't take care of the rest of your money for you. If you can take care of some of your money, why don't we let you take care of ALL OF YOUR MONEY."

I don't think that person exists, and if they did, they would probably only get votes from cranky opinionated jerks like me.

Anyway, that one has been building up for a while. I am tired of hearing about celebrities, and I am tired of hearing about people with too many houses. Let's talk about real things, real problems, and actual possible solutions. Thank goodness I will miss lots of this crap while I am in Italy next month.

Thursday, August 21, 2008

Groovy is the Only Way To Code

Well - any sort of awesome scripting language will do. I had a particularly nasty query that I was going to need to write today to see if there were people who had a value in a column in one table and no backing data in another table. This is an odd bit of legacy data model stuff that doesn't utilize any sort of foreign key constraints, and apparently there was a blip at some point more than 6 mos back that caused a bit of data corruption. Instead of figuring out this bizarre query, I thought, "Gee Kirk, you are always looking for a reason to use Groovy - here it is!"

Here's what I came up with:

import groovy.sql.Sql

sql = Sql.newInstance("jdbc:mysql://localhost:3306/mydb", "mydbuser",
"mydbpass", "com.mysql.jdbc.Driver" )

def badIdList = []
sql.eachRow( "select id, weird_col, active from table1 where active = 1 and weird_col is not null" ) {

myId =

checkCount =
sql.firstRow( "select count(*) as count from table2 where table1_id = ${myId} and is_right = 1").count

if ( checkCount == 0 )
println( "bad id: ${myId}")
badIdList.add( myId )


println( badIdList )

Now I guess I am just a really big nerd, but I felt oh so satisfied after writing that. For sh*!ts and grins, I wrote the same thing in java, and it was a lot of code, and it was annoying, and you had to do the while rs.hasNext thing, and get the current resultset, and then do the rs.getString() thing, and do the Statement = this that. It's a lot of code to do very little, and it kind of sucks. Now granted most people don't really do a ton of direct to db stuff anymore, with all the ORM solutions like Hibernate for Java and ActiveRecord for Ruby/Rails, but when you need something surgical like this, it just can't be beat. Man oh man it's awesome.

My name is Kirk, and I am a freakin nerd.

Tuesday, August 12, 2008

You Know It's Bad When...

You Know It's Bad When...

Your neighborhood isn't even good enough for dead people.

Seriously. Ouch. Detroit is such a sad case. Yes it is as scary as people describe it. Yes the economy there is only going to get worse before it gets better. As someone with family in Michigan, it makes me sad to see a great place go so far downhill. You have failing industry in the stranglehold of the greedy and shortsighted unions. You have inner cities with varying high school graduation rate estimates that all end up not on the sunny side of 50%. It's a perfect storm of people who are waiting to work unskilled jobs that aren't going to be there anymore. Not good. The mayor of Detroit can't fix it though, because he's too busy sitting in jail. It's a sad case, and there are no easy answers.

Until someone gets some bright ideas, you are going see a lot of this in 'the D':

Abandoned Train Station

One of thousands of abandoned houses

Tuesday, August 5, 2008

Yep. Awesome.