Tuesday, November 08, 2005

T.O.

The big news in football this week has been the suspension of Terrell Owens. The whole thing kind of reminds me of the steroid controversy in baseball. It's amazing how seriously people take sports. I love sports. I'm a huge football and baseball fan (just ask my wife.) But at the end of the day, sports is just entertainment to me.

That's why I think the T.O. controversy is totally ridiculous. The guy is obviously a ego-maniac who holds a certain amount of contempt for the rest of the world. Kind of reminds me of Bobby Fischer. Put a microphone in front of him and he's bound to say some things that are going to offend the rest of the world. So it wasn't too surprising to me when he ragged on Donovan McNabb (again) and the Eagles front office (again) last week.

But my question is: Who Cares? Sure maybe Donovan McNabb should be angry. Obviously the Eagles management have a right to be angry. But what did the guy really do at the end of the day? He made childish remarks about people. So what? Don't we all have co-workers who make the same kind of remarks on a daily basis?

If the Eagles want to suspend him, there's nothing wrong with that. If I criticized my boss I might get canned. Of course I think it's pretty stupid. They are a much better team with T.O. than without him. Still that's their mistake to be made. Obviously Donovan McNabb's comments about them being better without T.O. just shows that he can be almost as childish as Owens.

I think things would be a lot different if the Eagles were 8-0 right now. But they're not. It's obvious to everyone that their defense is not as good (especially without Corey Simon) and that Donovan McNabb is hurt. So they know they're not a contender this year, which makes it a lot easier to come down hard on Owens. T.O. is probably the best receiver in the league and there's no way a contending team would do what the Eagles have done. If I was an Eagles fan, I would be pissed that they were suspending T.O. because it just means that they're raising the white flag.

technorati tags: , , , ,

Special Election

This morning I voted in the California Special Election. It was a pleasant experience. There was a poll at the school next to my house, so I simply walked over there. I went around 9:30 AM, so there were no lines. This was the first time I had voted at the polls in California since 2000. There were no polls near my old house in Concord, so I had to vote by absentee ballot. I was surprised by the lack of security. What I mean is that all I had to do was give my name and address. I did not have to present any identification to verify who I was. Anyways, once I did that, they gave me a voting card for the touchscreen machines. It was very quick and easy.

So how did I vote? Well let's just say that I felt like I had changed sides and become a Republican. Here's a breakdown:

Prop 73 -- Parental Notification : Yes
I'm generally against any kind of restrictions on abortion, but not in this case. I really think that parents need to be held more responsible for their children, and so they have to be informed.

Prop 74 -- Public School Teachers Tenure : Yes
Tenure gives lots of guarantees to teachers that most workers do not have. My employer can lay me off anytime they want. They don't have to wait for two consecutive unsatisfactory performance evaluations. So why do teachers have extra protection? Unions of course.

Prop 75 -- Union Dues/Political Contributions : Yes
Speaking of unions... Actually this one was a little more difficult for me to decide. On one hand, why are we passing laws to regulate how unions spend their money? Shouldn't we stay out their business? On the other hand, unions get way too much special treatment. People are pretty much forced into joining unions, so at least this gives those people some power back. Of course what we really need is to remove the many laws the grant special protection of unions.

Prop 76 -- State Spending Limits : Yes
Again this one was a little difficult. I don't like the state minimum school funding requirements. However, I don't like the language of this proposition. It seems to embrace but modify Prop 98, when a total rejection is really needed. Of course, there's probably no way the governor could get a repeal of Prop 98, so I guess this is still some progress.

Prop 77 -- Redistricting : Yes
I've been very amused by the number of ads on this proposition. This one is a no-brainer to me.

Prop 78 -- Drugs Discounts : No
What's this, a new government program overseen by the state? Oh, and it's back by big business. Talk about a recipe for corruption and government enforced monopoly...

Prop 79 -- Drug Discounts : No
This one is equally bad as Prop 78, maybe worse because of more management by the government.

Prop 80 -- Electricity Regulation : No
From the ballot description: " Imposes restrictions on electricity customers' abiity to switch from private utilities to other electric providers." That's all I had to read to figure out how to vote on this one!

So there it is. I really do feel like a Republican suddenly. It's very unsettling.

Saturday, November 05, 2005

AJAX-MVC with Rico

     I recently re-did the PocoPay welcome page. It now shows an invoice, similar to a monthly statement like you would get with a credit card. It also has links to the invoices from past months. The past month functionality was a good candidate for some AJAX. After doing some AJAX with lots of custom JavaScript, I thought it was good time to try out an AJAX library.
     There are a ton of AJAX libraries out there, which is not surprising. It seems like one of the most common ones for Java apps is DWR. I considered using it, but I have some “philosophical” issues with it. I really hate scriptlets inside JSPs. I think this comes from bad experiences with such JSPs early on in my career. I’ve also had to deal with some really bad programmers who thought that the only way to program in Java was to do it in a scriptlet on a JSP page. So the idea of using DWR to directly invoke a business method just seems like a step backwards.
     So instead of using DWR, I chose to use Rico. I liked that it was built on Prototype, an object-oriented JavaScript library that is the basis for the excellent AJAX support in Ruby on Rails. In Rico, really allows for AJAX support similar to ROR’s with any server-side technology. Rico is also just a JavaScript library.
     Rico lets you register parts of your page that can be updated. It then makes the XMLHttpRequest for you, and when it gets the callback, it simply takes HTML from the response and uses it to replace the corresponding part of the page. That means that your response just needs to create some XHTML that is wrapped in a little XML. I really like this because the XML/XHTML response is really just another view in the application that happens to be consumed by a JavaScript callback function instead of a web-browser. PocoPay already had similar non-HTML views used by the VoiceXML scripts.
     For my app (PocoPay), I use Spring MVC. I basically created a new model (command,) controller (simple command controller,) and view (just a clean JSP that declares itself as XML.) All of the parts of the page I wanted to be updated I simply wrapped in <div> tags. I then registered these divs and my view returned the new HTML for them. That was it! No crazy JavaScript to learn. It was truly AJAX-MVC to boot.