Monday, May 12, 2008

Struts 2 Error Handling...How do I put it?

You could start with...

NOT THAT AWESOME.

There have been two things I have found now that are bizarre. Allow me to describe:

1) Let's say that you have a jsp mapped in your struts.xml, and it has an incorrect path somehow. Sure this is your fault, but what would you expect to happen:

A) An error on startup saying that the jsp can't be found?
B) An error when the action tries to forward to the nonexistent jsp?
C) A blank screen (even if the bad jsp call is inside a functioning jsp call by way of s:action?

Now, one would think that A or B would be good, normal ways for an error of this kind to be handled. You web application won't start if you have an invalid action class mapping, so why should it be different for a bad jsp mapping? But, even if we allow startup, (hey, maybe you will put the jsp in there later), shouldn't we throw some sort of error if we forward to a page that doesn't exist?

No, the answer is, C. A blank screen. No messages in the error logs. Awesome.

2) When you have properties on your form that don't map correctly to the variables or setters on your action class, should the framework:

A) Tell you that the action class call failed because the properties couldn't be mapped to an instance variable?
B) Be even more specific and catalog the properties that failed?
C) Tell you:

No result defined for action com.awesometown.SweetAction and result input - action - file: xxx
And fail without giving you any clue about what happened!

If you answered C, you'd be correct! Odd, but true, you should get an error message that tells you that your property can't map to the action class. What makes this particular situation even stranger is that when you have s:checkbox params that don't map to variables on the action, it warns you. So odd. Ah well. Other than that, Struts 2 is great and I think it's still a big improvement over Struts 1, even if you spend a bit of time banging your head on the wall. At least when you are done, you don't have to code an ActionForm.

Wednesday, May 7, 2008

Kirk 1, Verizon 0 (or maybe the other way around)

Well, the great verizon debacle finally came to an end yesterday after three more tries and denials. I got through to an incredibly unpleasant woman who told me that it would be $80 a month for DSL + one static IP. That seemed steep, especially considering I had just gotten off the phone with a pleasant fellow from RCN (on the first try no less) who had informed me that through RCN I could get Broadband for $20 and a static IP for $20. When asked what made Verizon's IP address twice as good as RCN's, the lady said "That's just what it costs. If you don't want it you don't have to get it." While I admire her honesty, one would think that they would want my money. Apparently not the case. I have to say that I don't look forward to the rigmarole that will be canceling Verizon DSL, but I will be happy to give them less money each month. And, I won't have to pay some incompetent hosting company for a sliver of a crappy server.

For the record, finding a decent hosting setup is incredibly painful. To get a decent heap on a server, you have to pay more than $80/month. How many servers can you buy for that over time?? And if you do the shared hosting options, it costs $20/mo and you get 96-160MB of dedicated heap. That's a pittance. Ridiculous. There has to be a better way. At any rate, hopefully configuring things on my server with a static IP address won't be a gigantic nightmare!

Tuesday, May 6, 2008

"We're sorry. The lines are full."

So I tried to get Java hosting for my little startup that I am working on. I found out that they didn't support JDK5. Wow. That was only released like 4 years ago. Anyway, they didn't remedy the problem in a timely fashion (I can install Java 5 on a server in about 10 min), so I canceled. I want to get business DSL and a static IP address at home. It's about the same price as my current account, and I can write most of it off. So, I have to call Verizon right? Except 5 times now (3 last night and 2 this morning), I have gotten this message that says they are too busy to help me. And not just to let me know that I should wait on the line. No - their automated person hangs up on me! WHAT THE HELL IS THAT? I am willing to wait! I would like to wait patiently on speakerphone until someone has the time to help me. But NO. I have to keep on calling. Kudos Verizon. I am going to try RCN now to see if they have human beings who won't hang up on me. I hate the internets sometimes. Scratch that, just Verizon's control of the internets' wires near my house.

Monday, May 5, 2008

Yippee! Awesome!

Got my new bike today. Trek 7.2 FX.
I love it. It's about what I wanted to spend, and it's much lighter/nimbler than my Marin was. Cool. I got a better lock too, so the crackheads can't deny me the pleasure of biking on a sunny day. In other news...Tigers suck, the Nats are better than the Pirates, the big release of Sportsvite nears, the weekend was beautiful, we are thisclose to booking our villa in Tuscany, and everything is generally good. It was nice to spend a weekend here. I even got to grill, which makes me happier. More later on some technical topics.

Wednesday, April 30, 2008

Things I Find To Be Awesome

There are a few things out there that I use or see or read about that I just plain think are awesome. In paying homage to my newfound effort not to complain, I will present things I find to be awesome here:

1) My Macbook Pro - it's really fast, and it goes to sleep and wakes up without complaining or grouchiness. It doesn't crash (well once but I was doing something absurd), and it looks nice.

2) Yapta - anyone who travels frequently and hasn't seen this site is crazy. You can tag flights for tracking (currently a large subset of carriers are yapta-friendly), and you get emails telling you when prices go up and down on your flights. Awesome.

2a) Kayak - People probably know about this one, but it's the best travel searching tool out there. So great. Get all my flights through it now.

3) Amazon - duh, but as an avid reader, there can be no finer website. Seriously.

4) My New Job - anyone who has ever worked at a job where they felt stifled and surrounded by negativity who then goes to a place where everything is the exact opposite would have to understand. Also, see #1.

5) The Nationals new stadium - anyone who slogged through the last three years at RFK has to agree that this new stadium is awesome. I have season tickets near the top of the stands near the end in left field, and my seats are great. I ate a hot dog, and it was hot! I had a nice draft beer that I didn't have to search intently for. Huzzah!

6) Guajillo - This little restaurant between Court House and Rosslyn on Wilson Boulevard is awesome. It's some of the best authentic Mexican fare I have tasted, this side of...well...Mexico. Everyone who hasn't eaten there and is interested in DC-area Mexican food needs to go there right away.

This is merely a subset of things I find to be awesome. Others on this list are my fiancee, open source software, and baseball, but those are all sort of 'automatic' and didn't require specific mention.

Monday, April 28, 2008

Monday, Rainy Monday

Mondays aren't usually the best days no matter what the weather is like, but they are especially lame when it's pouring, dark, and you forgot your rowboat.

The weekend was great. My grandparents had a great time - it's not often that you can get together with your family and help your grandparents celebrate 92nd and 90th birthdays on the same weekend. It's great to have them both still around, and I appreciate all the great times we spent together when I was younger, and the great times we continue to share. It was also great to see all my cousins/uncles/aunts, and even better to find out that they will all be making the trek to D.C. to attend our wedding. Very good news indeed!

What else is new? I slammed through Bringing Down The House on the flights this weekend. Jena had just read it and loved it so I brought it with me. In case anyone doesn't know it's the book upon which the recent film "21" is based. Pretty awesome book - just imagining someone playing 8 hands of blackjack at once with $50K on the table is cool. Vegas is fun. I am on to the Complaint-Free world book, having completed the early baseball history book on the train. So far it's pretty interesting, and the source of some pretty awesome quotes like this one:

We are all self-made, but only the successful will admit it.

That's a good one. I am a big proponent for not whining about things you aren't willing to change, so hopefully this will help me practice what I preach.

In other new, we booked our hotel room in Sardinia for the honeymoon - looks awesome. I doubt we'll want to leave.

Wednesday, April 23, 2008

Latest Books, Frustrations, and Awesome Weather

Well it's been a few since I've written. Since we last checked in, I have completely given up on reading Midnight in Sicily. Life is too short to read books that suck. I have finished The Last Kabbalist of Lisbon, which was excellent. The author, Richard Zimler, seems to have a few other books out, so I will definitely be checking those out. Also, in celebration of the Tigers ability to finally string together a few wins, I have decided to read A History Of Early Baseball, which is a short, easy ride about baseball's rise in the middle of the 19th century. So far so good. Reading about baseball is not as fun as watching, and watching isn't as fun as playing, but it's better than slogging through Midnight in Sicily! I also finished The Wisdom of Crowds, which was an interesting read, but probably could have been about 100 Linkpages long. So many of those types of books seem to be centered around a crystallized but very simple premise, then proceed to spend 200-300 pages to 'prove the hypothesis' using (hopefully) entertaining and enlightening real-world stories. Wisdom of Crowds was well written, and was a good follow up to Made To Stick.

I recently ordered 7 more books from Amazon. It's not my fault - their recommendation system works so well that I just HAVE to do these things. As Jena says, if my worse vice is to buy too many books, we can work with it. I am especially excited about one of the books - A Complaint Free World: How to Stop Complaining and Start Enjoying the Life You Always Wanted. As someone who tends to be put off by what I see as the increasing incompetence and apathy in our world, I would love to see how to transcend that and focus on what I can control. Hopefully it won't be a bunch of self-help mumbo-jumbo. I'll let you know what I figure out.

In other news, I am frustrated by web applications. I think that there are too many frameworks, not enough examples, and that JavaScript is terrible. That said, I am definitely learning a hell of a lot right now - being at a small company like Sportsvite definitely allows you to be a jack-of-all-trades, and we really are doing a lot of interesting stuff right now that I think will really improve the site. That's the end of my little techno-driven rant.

The weather outside is beautiful. And I am sitting here programming and blogging. Anyone know of a world where I can sit outside every day and make money programming? Sign me up. Headed to Indiana this weekend for my grandmother's 90th birthday party. It'll be great to see the family! Hopefully I'll have some great pictures.