Monday, July 28, 2008

Cuil - Google Has Not Lost Sleep

So I hear all the buzz about this awesome search engine called Cuil (pronounced "COOL"). I go try it out. 19 minutes later I check back on the window where I searched on my name. Still hanging. I try again. It doesn't work again. The fifth time or so, it goes through, but no mention of me until something like 15 pages down. Google has this blog second. I think to myself "I don't like this search engine, that claims to have indexed more of the web than Google, but can't find anything about me!". CNET seems to agree.

I think that it's great that people are trying to compete - that's healthy. That this search engine got so much press made me think it had a shot, but it's a long way off (not because I wasn't prominently displayed in the results).

In other awesome software news, the new version of Sportsvite is closer and closer to becoming a reality!

Saturday, July 26, 2008

George Bush on Victory

My fault - apparently victory has been defined! Check it out (this is rich):

From 2005 (National Strategy for Victory)

  • Victory in Iraq is Defined in Stages
    • Short term, Iraq is making steady progress in fighting terrorists, meeting political milestones, building democratic institutions, and standing up security forces.
    • Medium term, Iraq is in the lead defeating terrorists and providing its own security, with a fully constitutional government in place, and on its way to achieving its economic potential.
    • Longer term, Iraq is peaceful, united, stable, and secure, well integrated into the international community, and a full partner in the global war on terrorism.
  • Victory in Iraq is a Vital U.S. Interest
    • Iraq is the central front in the global war on terror. Failure in Iraq will embolden terrorists and expand their reach; success in Iraq will deal them a decisive and crippling blow.
    • The fate of the greater Middle East -- which will have a profound and lasting impact on American security -- hangs in the balance.
  • Failure is Not an Option
    • Iraq would become a safe haven from which terrorists could plan attacks against America, American interests abroad, and our allies.
    • Middle East reformers would never again fully trust American assurances of support for democracy and human rights in the region -- a historic opportunity lost.
    • The resultant tribal and sectarian chaos would have major consequences for American security and interests in the region.
My comments are:

1) How vague!
2) In the long term, everything is perfect!
3) Failure is not an option - but it is a possibility! Obviously you can't plan to fail, but you can plan what to do if you are not successful!
4) Iraq is not the central focal point in the war on terror. Not even close. Not even close to being close.
5) Does anyone think that if we win in Iraq, that terrorism will just stop, or even come close? Apparently Karl Rove does:

success in Iraq will deal (terrorists) a decisive and crippling blow

Do we perhaps need a new definition of victory, because none of these things are meaurable at all. Can we just call up the national terrorist council and ask them how they are doing on a scale of one to ten? Is there a 'sectarian violence index' we can look up?

I think that our leadership is responsible for a much more quantifiable measure of success in these endeavors. If we can hold children and public schools to very stringent measures of success versus failure, shoudn't we do the same with our military and foreign policy?

Victory? Victory? We talkin' bout Victory?

We have heard a lot this week about 'Victory'. We don't want to leave Iraq unless it's 'victorious'. What is victory? Has anyone actually enlightened us on what 'victory' is in the Iraq war? What makes it 'victorious'? What do we need to get? What's the end result?

Victory? We talkin bout Victory? Victory?

Victory is not derived from persistence alone. Think of a casino gambler, who has a lot of money, and really sucks at playing cards. Is he victorious, simply because he doesn't get up from the table, even if he continues to lose? No! Of course not, but at least he knows what victory is! It's making money. The American military is the gambler, the table is the Iraq war, but when we hit blackjack, do we get more chips? What's our reward?

I hate politics because there is so much empty rhetoric and so many buzz words. Victory. Freedom. Blah Blah Blah. I wish the media asked these tough questions. I wish they forced the candidates out of their comfort zones so we got REAL ANSWERS. Otherwise, what's the point?

International Drivers Permits Are Weird

I just went to get my 'International Driver's Permit'. It's important, because we want to rent a car in Italy for a couple legs of our trip. I just think it's kind of ridiculous, and I wonder where the money goes.

I go to AAA, they look at me, check my license, write some stuff in a booklet, paste my picture in, and BAM! I am a legit international driver. For their trouble, I give them $15. I wonder if there is someone whose job it is to provide international accreditation to the driver education programs thoughout the world, and that's where this $15 goes? Just have to wonder. It's definitely a curious program. If all it takes is a picture and my license, why do I have to get another document that has the same information? My drivers license already has my name, address, and picture, and signifies that I know how to drive.


On the other hand, AAA offices are crazy places! There is a lot going on there. I have been a member for years, and the only thing I ever used them for was towing when I blew a tire or had my radiator die. Who knew there was so much more. Call me crazy, but I think that trip planning is actually one of the fun parts of travel, so I wouldn't want to cede those responsibilities to someone else, anyway, but it's good to know there are options anyway...

Friday, July 25, 2008

Todd Jones Sucks


Last Lecture Ruminations

Having read the story of Randy Pausch, I have been thinking a lot today about things. I will admit, that despite my programming background, I was not up on this story before today - I never watched his 'Last Lecture' at Carnegie Mellon, and I wasn't aware of the book either. Despite this, I was definitely very interested in the story. As some of my faithful readers know, I lost my father a few years ago. We didn't know that we were going to lose him - he wasn't in the greatest of health, but there was no medical diagnosis giving up some sort of timeline. One Monday night, I got a call from my mom that my father was dead. That was it. I have often thought about this since then. Would I have rather known that this was coming so I could prepare? Would I want to be subjected to the drawn out process - watching a strong rock of a man fade away slowly? Would I want to go to doctors and hospitals with him? How would that effect me? My mom?

In the end, I think I decided that I had spent a lot of good time with my father. He met the person I wanted to marry, and he thought she was great. He raised me, and watched me become a successful young professional (this was not always a sure bet if you asked anyone but my father, mind you). He was proud of me, and we talked every day. I lost him that day, but I didn't lose all the years leading up to that day, and all the wisdom he lent me during our talks still lives on in my heart and in my mind.

What I decided I could not have handled was losing my father and feeling cheated, like I know so many people do when they lose someone before it's 'time'. Anyone out there who is in a situation with a loved one where things aren't good right now - I would say, no matter what's happening between you, just drop them a line, and tell them that even though things aren't great now, you love them and appreciate them.

So where I started to go on this rambling mess of a post is that this professor had young kids, kids who are never going to get the benefit of his fatherhood all their lives. And it just made me so sad for them, because while I didn't get as much time as I would have liked, I got a lot more than a lot of others and I felt lucky. At least they get the legacy he left behind as a model for how to approach life. It is important. Don't just blow through the days and end the day the same person you were when you woke up. Life's too short for that. I appreciate the message, but man, they are so young. It really sucks.

Anyway, when I get married in six weeks, I would have loved for my father to be there in person to celebrate, but in my heart I know he will be with us all in spirit, as cheesy as that sounds. The entire thing brought my mother and closer together, and Jena and I as well. I don't have to feel down. I guess I am trying to say that this whole thing made me realize that I am okay. Sorry for the babble. Just wanted to get that off my chest.

Thursday, July 24, 2008

The Suck of Sick

I have a cold. Natural Light has joined forces with Subversion to bring me down. I am feeling better thanks to an awesome nursing job by my wife-to-be, but I still don't feel 100%.

In other news: Tigers are only 5.5 back in the Central, despite their rather so-so efforts. Verlander is once again awesome, Maggs and Migs are raking, and their other pitchers are good enough (with the exception of Robertson, who really, really sucks this year).

Book News: Reading a couple of new books in between attempting to master Italian pronunciation and common travel phrases:

Under the Banner of Heaven
, by Jon Krakauer - A not so flattering view of the fundamentalist Mormon movements out west. Extremely relevant reading considering Warren Jeffs' latest trials and tribulations. I loved Into Thin Air, and the writing style here is similar. A great (if slightly biased view) of the history of the Church of Latter Day Saints, and how it resulted in a grisly murder. So far, so good.

1421 - The Year China Discovered America, by Gavin Menzies - This one talks about the what-if that says China discovered America long before Columbus. Interesting premise - it's still early, and I am not really sure if the book is conjecture, hard fact, or somewhere in between, but I have actively decided not to figure it out until after I have read it to give myself an open mind as I digest. Seems to be a reasonably light read and very interesting thus far.

Monday, July 21, 2008

Kirk vs Subversion

So we are merging the branch and trunk. This is kind of a normal thing to do. Why is it so hard? Once you get done, why do the conflicted files come out in such a mess? Because subversion hates me. I have file fragments scattered all across my screen, in such a fashion that I can't tell what belongs where. If I were a merge program, I think even if I were trying to mess up, I couldn't make it look that bad. I can get past that. That's fine. How about Subclipse taking like 2 hrs to show the commit dialog? Sweeeeet. How about random errors thrown when trying to take a file out of the list:
If a folder delete and a folder property change are both committed, then all files beneath the folder property change must also be committed
I don't think that's the case here, but whatever, I can remove that too. What's that? Subclipse doesn't show you when files are in conflict with an icon? Sweet. That would be an awesome feature, but I suppose that one wasn't in the cards. Another nice feature would be for Subclipse to actually tell me what is happening instead of my Mac just showing me the little pinwheel that makes me think nothing much is happening.

This process has made us realize that we need to buy Perforce - even though it has its warts as well, this stuff is A LOT EASIER using Perforce.

In other news, I survived my bachelor party. We can't drink as much as we used to, but we gave it a pretty good run for a couple days, and we only drank Natural Light, which is the way life should be. Thanks to all my awesome friends for giving me a great few days that I'll always have to look back on and smile about.

Had a great time guys. But I was ready to get back to Jena and work. But I didn't miss you, Subversion.

Wednesday, July 16, 2008

Vegas, Baby

That's where I would be if I still worked at Blackboard. In a ridiculous attempt to kill all its employees' virtue (and livers), my former employer is holding its annual convention in Vegas. Ridiculous. I went to the one in Boston last year. Not quite as awesome, though I was able to go to Australia in 2006, so all in all I think I made out pretty good! I hope all my former compadres are enjoying their time there in Sin City. I am off to my bachelor party today. 3-4 days of ridiculousness, Natural Light, reminiscing, and pretending I am 19 years old will culminate in a week-long hangover, I am sure. Should be awesome.

This weekend, Jena and I went out to San Francisco. Her friend Zeena got married. It was a beautiful ceremony in Hillsborough at her parents very nice house, overlooking the bay. The weather was beautiful and breezy. It was also a pretty interesting ceremony - a combined Hindu/Zoroastrian celebration. We sandwiched the wedding with a couple days of R&R, spending Friday exploring Santa Cruz and Capitola, and then Sunday we headed up to Wine Country in Sonoma, drinking and eating until we couldn't anymore. A great time. Monday was a long day of travel, but we made it back and now I am off again...

As usual, travel time afforded me the ability to polish off a couple of the books I have been working on. I polished off the book I was reading about the first crusade, aptly titled "The First Crusade". I found it to be an incredibly interesting and easy read. I was not at all informed on the subject so it was pretty fascinating, although the attack and occupation of Jerusalem seemed to receive short shrift, whle the siege of Antioch got about 75 pages. Still, a great introduction to the First Crusade. I also finally finished The World Without Us. I thought it was a bit unfocused, but still quite entertaining. It was not as doom and gloom as it could have been given the title - it was mostly a broad swath picture of different man-made things that would not persist if man didn't. It was also a rather uplifting picture of how our planet could, if given the chance, bounce back and recuperate. Interesting book - I'd recommend it as a quick read that could get you interested in a few different topics.

Wednesday, July 9, 2008

Requiem for a Hulu

Inspired by a colleague of mine, I checked out a couple of weeks ago, and was really delighted by the selection of movies and television there, and have been telling everyone I know how cool it is. I should be a paid huluvangelist. Anyway, I am sitting around today, and decided to watch Requiem for a Dream. Jesus, what a mistake. I can remember watching it for the first time after a lot of beers, and feeling sick to my stomach, and sick to my soul. The way the film was shot, in concert with the haunting score just evoke desperation and loss of control, and it's a scary film. I think rehab centers should just make people watch that movie in a loop. That would be way more effective than any 12-step deal. As someone who has seen friends and family go through crap like the characters in this movie, it makes me so thankful that those people snapped out of it before it progressed as far as the poor folks in this film. Yikes. I feel unsettled.

On a lighter note, my buddy Eric sent this a week or two ago:

Requiem for a Day Off

Anyone who has seen both Ferris Bueller's Day Off and Requiem for a Dream will truly appreciate this.

Man The Nats Are Hard To Watch

I am sitting here watch the Nats, and they have 1 run in the last 2 games or so now - the guys are discussing how wild the opposing pitcher is, but interestingly, the hitters just keep on coming up and swinging at the first pitch. Man, if I did that in high school, my coach would have berated me in front of the whole crowd, then taken me out of the game. These guys just continue to do it over and over and over and no repercussions. Oh by the way, can Austin Kearns please do something so someone will be dumb enough to trade for him???

Tuesday, July 8, 2008

Eclipse Ganymede Revisited

Well, I continue to greatly enjoy the new features of Eclipse 3.4, especially as I toil through a rather painful refactoring process, but I must admit, there are a few gotchas:

1) Subclipse is not good in the new version - it really seems to have devolved (new update came out today and hopefully this will change my mind.

2) The software is still kind of buggy (odd NPEs, and other weird dialogs that come up to tell me something happened). As far as I can tell they are all pretty harmless, but it's still annoying.

3) How can I setup full-text searching to ignore certain directories (I would love to have my build directory in my directory tree, but not to see the jsps and xml files that live there)? I get an error on every search about out-of-date files in build, which is going to happen since they change every time I build, which I do from a shell, and not in Eclipse.

AND, last but not least, this morning, I completely fried my instance of Eclipse. This was your basic Catch 22:

I fire up my IDE, and I am notified that there are Subclipse updates available. Because of my aforementioned lack of satisfaction with Ganymede's Subversion interface, I was excited - maybe they listened to me! I installed the updates, and restarted Eclipse. This is what greeted me:

Hmmm. That log file had a bunch of gobbledygook, and as far as I can tell there is no way to rollback. Starting Eclipse with the clean option had no effect. I have a lot of work to do, so I just figured that Eclipse instance was dead, and I would go back to Eclipse 3.3. I fire it up, and thank goodness it starts, no problem, but then I go to update my project thru Subclipse, and it tells me that I can't update because I have an out-of-date SVN client. I figured, hmm, I guess I will try to update this Eclipse subclipse plugin. So I try, and guess what! It fails with a mysterious network connection error - the same one that forced me to move up to Eclipse 3.4 in the first place. Fortunately the mirror at Virginia Tech is nearby and fast - I have reinstalled Eclipse 3.4 with the new Subclipse plugin and I am back online.

Just wanted to note that my immediate positive response to Eclipse Ganymede has been tempered somewhat by my frustrations...sigh. Still amazing free stuff!

Monday, July 7, 2008

Holy Ruby Deliciousness!

So I am mucking about with Ruby, Rails, Groovy, Grails, and whatnot. I find them all pretty incredible and the more I use scripting languages, the more I decide that unless you really NEED a precompiled piece of code, this is the only way to fly. I just took results from a database and did some string replaces and wrote a new file in Ruby. It went a little like this:

file ="/awesomedirectory/mylist.TXT", "r")
out_file ="/awesomedirectory/mylist-formatted.TXT","w")
while (line = file.gets)
newline = line.gsub(/ /, '')
out_file.puts( newline )

Now that is silly easy. Anyone who has used Java IO knows it's cumbersome and kinda annoying - not hard - but definitely kinda annoying. This is sweet. I am going to do more with this. When you spend 7-10 hrs a day programming, even a 10% increase in productivity that can be gained from the faster feedback loop and the terseness of the scripting syntax can really add up, and let's face it, much of what we do doesn't REALLY need to be precompiled code - it's okay if it compiles on the fly!

Thursday, July 3, 2008

Software is Weird

So we recently upgraded from Hibernate 2.1 to Hibernate 3.2. It was a good exercise in understanding how the code in this incredible ORM library really works. In fact, I had to actually make a chance to the Hibernate source code to support an odd case of a left outer join with multiple join criteria, so I had to step through an entire query's lifecycle in Eclipse (what did people do before debuggers?!!), and figure it out. I saw that there is a lot of automagical stuff happening throughout the code. Most of this is okay. We as users of these libraries, open source and proprietary, just take for granted the behavior, because it's right, about 99.5% of the time. Good work Hibernate developers. You are true champions of software. Here's a weird one though. Pretend for a moment that you ran a program like this:

Session s = openSession();

User u = UserManager.loadUser( 1 );

u.setName ( "fakeName" );


This is the equivalent of opening a hibernate session, loading an object, updating it but not saving it, and then closing it. I think the intuitive interpretation of this is that when you flush and close, nothing CRUD-related would happen, since I never called save or update on that User object. To the contrary, that object did get updated - flush() actually took that change and automagically formed an update statement like

update user set name = 'fakeName' where id = 1

for us, and executed and committed the query. That's weird to me, but it is what it is.

As some background, we use the "Session in View" pattern, which has been great. Most of the recommended settings on the interwebs recommend FlushMode.AUTO to be used in the ServletFilter that sets up the session. We figured that the wisdom of crowds was good here, so we rolled with that. We deployed to production and started seeing bizarre data corruption, that was traced the problem to an instance like the one above.

So when you want to avoid this sort of unexpected data modification, you have a couple choices:

1) Use FlushMode.AUTO, and

a) Write the app from scratch and make sure you never update a hibernate-managed object with data you don't want to be persisted to the database.

b) Scour the app to make sure you don't do anything silly like change an object and not persist it yourself

2) Use FlushMode.COMMIT, and wrap all your CRUD calls with

Transaction t = session.beginTransaction();

DAO.saveStuff( object );


We went with option two, and since we have a pretty clean DAO layer, there was minimal work involved, and so far it has worked like a charm. This may be pretty self-evident to many of you, but it was weird to me, so I thought I'd write about it.