Tuesday, November 07, 2006

Election 2006 -- Propositions

I didn't get to post this before I voted this morning. So here's how I voted on the many state propositions.

1A -- Yes. It's amazing this is even needed.
1B -- Yes. More roads are badly needed.
1C -- No. I don't need the state to support urban development.
1D -- Yes. This was a hard one for me. Public education is a disaster, thus it is easy for me to say no on this. However, a vote either way on this will not make it more/less likely for education to be privatized. So the positives outweigh the negatives.
1E -- Yes.
83 -- No. It doesn't make sense to me that the GPS monitoring of citizens can be constitutional. Right now it might just be "sex offenders" (which can include an 18 yr old boy who has consensual sex with a 17 yr old girl,) but maybe tomorrow it's speeders or whatever.
84 -- Yes.
85 -- Yes. As a parent, I would expect my consent to be needed for my child to have any kind of operation. Parents need to be responsible for their children.
86 -- No. A classic case of trying to use a tax to impose one group's opinion ("smoking is bad") on another.
87 -- No. I could actually stomach a big tax that made gasoline cost more. However, I can't stomach the money going to some new state bureaucracy.
88 -- No. Property tax is already ridiculous, especially given the housing market in California. Maybe my no vote here cancels my yes vote on 1D.
89 -- No. Tax payers should not pay for political campaigns, and citizens should not be prevented from making their opinion ("I want to vote for Mr. Smith") heard.
90 -- Yes. The anti-Kelo measure. Eminent domain has always been abused, but maybe this can decrease the number of instances of its abuse.

Saturday, November 04, 2006

Election 2006 -- California State Races

Next up on my look at who/what I will be voting for on Tuesday are the state elections. Might as well start off with the big one.

Governor
Back in May I voted for Steve Westly over Phil Angelides in the Democratic Primary. I probably would have voted for Westly over Schwarzenegger, but there is no way I would for Angelides over Arnold. Honetly it would have been a tough call between Arnold and Westly, and I may have voted for Arnold anyways. I've agreed with most everything he's done the past couple of years. As for the Libertarian candidate, Art Oliver ... His stance on immigration is too extreme. Plus he likes to quote "think tanks" such as Cato and Reason way too much. Think for yourself, or at least pretend to. He strikes me as somebody who embraces the Libertarian philosophy simply as a means to an end. That's the exact kind of Libertarian I dislike, and the kind that is willing to support the massacre in Iraq all in the name of lower taxes.

Lt. Governor
Does this position matter? Anyways... First the usual Dem. v. Rep. ... In this case it's John Garamendi vs. Tom McClintock. I really don't like McClintock from the recall of Gray Davis. I agree with him on a few things, but there are too many things that I completely disagree with him on. Garamendi isn't that great either, but he'll probably get my vote. What about third party candidates? Well, the Libertarian candidate, Lynette Shaw, is interesting to say the least. Her major issues are medical marijuana and amnesty for illegal immigrants. I actually agree with both of these stances. However, she seems very ... out there. Her website rambles quite a bit, and it's just hard to take her serious. American Independent candidate Jim King wants to do away with the state income tax. That sounds good. However, he's also all about the family-unit. That smells like bigotry. All in all, no good choices. So I'll probably vote against McClintock, thus vote for Garamendi.

Secretary of State
This is an interesting race just because its a position that emphasizes the regulation of elections. In general I favor electronic voting. I don't have the paranoia about this that most Democrats do. Embrace technology. We should know who wins an election within minutes of the polls closing. I don't favor requiring photo ID to vote. I think that would just lower the number of voters in some demographics, and I don't see how that can be viewed as a good thing. Finally, I don't favor public financing of elections. If I want to run for office, I should be able to spend as much money as I want to get the word out. Similarly, if my friend is running, I should be able to spend as much as I want to get the word out. That's freedom of speech. So the candidate closest to my positions is probably the incumbent, Bruce McPherson. I guess my stance is actually pretty close to "status quo."

Attorney General
One last interesting position. There are a lot of candidates with interesting stances. Green Party candidate Michael Wyman and Peace and Freedom candidate Jack Harrison both oppose the death penalty, as do I. However, they both want to "prosecute corporate thieves" and I hate that kind of demagoguery. Ken Weissman has a degree in math and is a Libertarian. He's against victimless crimes like prostitution and drugs. However, he's pro-death penalty, and it's hard for me to accept a Libertarian who is pro-death penalty. Next up are the "major" candidates. First there's Jerry Brown, Democrat. He puts "controlling greenhouse emissions" and "protecting a women's right to choose" as high on his list of priorities. Should those be priorities for Attorney General? Just seems like party line BS. Finally there's Republican Chuck Poochigian. His priorities include sex offenders, gangs, and the three strikes law. There's no way I'd vote for this guy. I'm especially opposed to the three strikes law. So, I think I'll vote for Weissman.

Monday, October 30, 2006

Election 2006 -- Local Races

It's election time again. The election is just over a week away, and I have a lot of candidates and propositions to read up on and make some decisions. I've been using SmartVoter to start my research on some of the lesser known candidates and issues. Here's my take on a few of the things I've read so far...

State Board of Equalization, District 1

Reading through the list of candidates, first I came to the incumbent, Betty Yee, Democrat. She sounded OK. She is endorsed by teachers. That's a red flag to me. After all, teachers have a huge vested interest in a regulatory position such as this one. Next was David Neighbors, Republican. He looked interesting. He's from San Jose and is very much in favor of tax and government reduction. Finally, I came to Kennita Watson, Libertarian. Now here's somebody to get excited over. She's went to MIT. I liked her position on some of the propositions that are being voted on. She wants to use technology to make paying taxes/regulations easier and the tax-collecting bureaucracies more transparent. She does seem a little naive, but what the heck, she's getting my vote.

State Assembly, District 24

Jim Beall, Democrat is the incumbent. He's big on funding education, a big negative in my book. His ideas for universal health care don't sound nearly as terrible as most such proposals. Kind of a wash overall. His website has issues, and that makes me think he's a little sure he's going to get re-elected. If there's one place where a candidate's website matters, it's Silicon Valley. Lionel Silva, is the Libertarian candidate. Unlike Ms. Watson, he doesn't seem like a libertarian I can agree with as much. He's against the Kelo eminent domain abuse, which is good. He's also in favor of "neutral" redistricting. That's one of those classic red herrings to me. Finally, there's Lawrence Hileman, Republican. He's a programmer, and wants to lower taxes. Those are good. But he's too caught up in immigration reform for me to vote for him. I think I will go with Beall, mostly for lack of a better alternative.

Mayor of San Jose

Ah yes, Chuck Reed vs. Cindy Chavez. This has been a pretty nasty campaign here in San Jose. Basically Reed played the "you're a buddy of Ron Gonzales" with great effectiveness, until Chavez found records of Reed making very questionable expenses as a city councilman. Reed re-paid the questionable expenses, but he had lost the moral high ground. So it comes down to issues. Reed is pro-business and development to combat housing prices. Chavez is big on law-enforcement and education. Not all of her education ideas are terrible (corporate sponsored scholarships sounds ok), but they are not great. Reed definitely seems like the smarter candidate as well, so he gets my vote.

Measure A

This is a local measure to place extra restrictions on "rural" lands. Reading the for/against arguments still leave this as a confusing issue. For me, extra regulation on land use is generally bad. Plus, it tries to make a county regulation to override municipal ones. I'd rather leave things up to the municipalities. So I will vote against Measure A.

Next I will look at some of the state races.

Thursday, October 26, 2006

More on Firefox 2.0

I upgraded my home computer with Firefox 2.0 when it became GA this week. The other critical factory in the upgrade was that the del.icio.us extension was upgraded to work with FF2. My wife and I both use this extension, so this was necessary if I was going to upgrade our home computer. That's when the trouble started.

The del.icio.us extension does indeed work with FF2. However, I immediately began having issues with it in combination with the Google Toolbar. My wife also uses the Google Toolbar, and she had the same problem. Disabling either one of the extensions seemed to solve the problem. We both chose to disable del.icio.us, as we both found the Google Toolbar more useful. She likes it's autofill for forms (I like this too) and I use its site search a lot. That's an invaluable tool for searching for things on open source forums. Those forums often provide their own search, but just using Google to search their site is almost always more effective.

Anyways, things didn't stop there. I was buying some stuff from Amazon, and FF2 froze up. This really annoyed me, especially since I had already entered in a credit card number in the order process. Of course Amazon is good at dealing with this kind of problem. I killed FF2, launched Flock (it's still FF 1.5 thankfully) and went back to Amazon. All was well, as my order was in my cart, and all I could pick up the checkout process right where I had left off.

So at this point I went ahead and disabled all my other extensions: Google Toolbar, Google Browser Sync, FireBug, and FireFTP. Maybe I'll try re-enabling them one at a time, to try and determine what was causing the instability. Hopefully the answer won't be "don't blame the extensions, blame FF2."

Friday, October 20, 2006

Hibernate Tools for Eclipse

There are a lot of Hibernate/Eclipse plugins out there. One that I used recently was the Hibernate Tools plugin that is part of the JBoss IDE. I'm paranoid about installing plugins in Eclipse, since I've used some that caused a lot of instability (XMLSpy comes to mind,) so I only installed the Hibernate Tools plugin, not all of the JBoss IDE plugins.

It seems to be very good for maintaining/upgrading Hibernate artifacts. It was very easy to configure a Hibernate console by using an existing Hibernate configuration file. This file specified annotated classes. I had made some changes to the database, but I was easily able to connect to the DB and generate new artifacts (new annotated classes, i.e. EJB3 Entity Beans.) This served my purposes perfectly.

I could also load a separate Hibernate configuration file, this one that specified classes mapped with good 'ol HBM XML files. I could easily generate Entity Beans for these classes as well (or new HBMs, etc.)

I also gave it a try at reverse engineering from an existing schema. This worked very well. I still like Middlegen's interface for this, since it allows you to easily customize data types (like specifying java.util.Date instead of java.sql.Timestamp) and relationships (removing inverses, etc.) Still, this seems to be a great all-around tool.

IE7 Released To The Masses

I got a "critical" Windows Update today to install: IE7. Yep, Microsoft has not only released it to the masses, but as expected, is pushing it as a critical update for all XP users. I had been using it on my work computer for awhile now, though I had kept IE6 on my home computer. I have been mostly pleased with IE7, so I will go ahead and upgrade it on my home computer as well.

Now that IE7 is out, I figured it was time to test its performance. I read this bit about how it performed a lot better than IE6 on sites heavy with JavaScript and DHTML. So I treid it against my favorite JS benchmark, BenchJS. I decided to pit it against the other "modern" browsers, Firefox 2.0 RC3 and Opera 9.0.

First I ran IE7. I stripped it down by disabling all add-ons and by stripping down all the XP chrome and effects. The last time I had ran IE6, it had taken around 19-20 seconds for BenchJS. IE7 did it in 9.3 seconds. This seemed similar to what the Zimbra blogger had said, that it was about twice as fast IE6.

Next I ran Firefox 2.0 RC3. Why FF 2.0, and not 1.5? Mostly because 2.0 is what I have installed on my work computer. Second, it seemed more fair to compare Mozilla's latest against Microsoft's latest. My old numbers on FF 1.5, had it clocking BenchJS at around 12-13 seconds. FF 2.0 did it in 6.4 seconds. It looks like Mozilla has also doubled up their speed.

Finally, I brought in the ringer: Opera 9. Opera always kills the compettition on BenchJS. This time it turned out BenchJS in 5.5 seconds. That was actually a little bit slower than last time I had ran Opera, but only by a couple of tenths of a second.

So Opera still holds the speed crown, but Firefox is suddenly only about 1 second behind. IE7 is a nice improvement over IE6, but FF 2.0 is also a nice improvement over FF 1.5! I'm sure the Mozilla devs were feeling a lot of pressure to stay ahead of IE and keep their momentum going. Looks like they've done just that. Microsoft will have to hope that IE's new UI is viewed as an improvement over Firefox. Otherwise, it is still behind the Fox.


technorati tags:, ,

Blogged with Flock

Wednesday, October 18, 2006

Random Bits

A few random things I came across while eating my lunch today.

First, there's this hilarious video about a guy and his struggles with his Mac.

As a former Mac user, I knew exactly what this guy was talking about. I'd still say that OSX crashes less often than XP (though still more often than Linux,) but definitely hangs just as often if not more. I definitely did a "Force Quit" on my old G5 on a regular basis. It definitely seemed to have extended (greater than 5 seconds) hangs that it would recover from as well. I often mused that the reason Apple pushed multi-CPU machines was because it was easier than fixing pre-emptive scheduling in OSX.

Next, there's this little nugget from Cato. It's not surprising to me to see that public schools spend more per student than private ones. Government run businesses are notoriously inefficient. Can a government run business ever be efficient? The USSR never seemed to have any luck, and our school system seems to be striking out as well. Of course there's more to the story than Cato or the Goldwater Institute would like to admit. Public schools include lots of "special need" students that may not be as common in private schools (maybe even non-existent?) It seems likely that per-student spending on such kids is much higher than on other kids. In general, having to support diverse groups of children is going to cause a lot of inefficiencies. Of course you can argue that's just more proof that public schools should be discarded.

Finally, Monday night I watched the MNF game, Chicago at Arizona. A lot of people were blown away by how Arizona "found a way" to lose a game where they had a big lead. That wasn't the most memorable thing to me though. I came away from that game thinking "ESPN has to get rid of Tony Kornheiser."

Now a lot of people have really liked him on MNF. This was easily the mos interesting game of the year so far on MNF, and it showed the problems with a guy like Kornheiser. He is obvious and unoriginal. He does not have insights, and simply looks to contradict the other commentators.

For example, there were a couple of times late in the second quarter where Chicago made bad turnovers. Arizona had chances to really build their lead. It could have been 35-0, but instead it was 20-0. That's a big difference. Theismann and the visiting Charles Barkley tried to raise the possibility of this being a potential turning point in the game. Arizona did not have the killer instinct to put away Chicago, and this was going to lead to a Chicago comeback. You can argue if that was insightful of them or not, but all Kornheiser could say was "Hey look at the scoreboard! Arizona is up by 20! There is no turning point!"

Later, Theismann first wanted Arizona to let Matt Leinart throw the ball more, since that was the only way they had success. Then after some incomplete passes, Theismann warned about how incomplete passes were stopping the clock and leaving Chicago with time to make a comeback. Of course Kornheiser had to point out the contradiction by Theismann, but that's all he did. He had nothing more insightful like "Just run the ball, even if you get 0 yards and go three-and-out" or "Don't worry about stopping the clock just stay aggressive, and have confidence in your defense." Theismann wanting to have it both ways is annoying, but Kornheiser just being "hey you screwed up, nyah nyah" is much worse.

Kornheiser is like the guy you watch an action movie with who is always pointing out how such and such stunt is impossible. Eventually you stop inviting that guy to watch movies with you. ESPN probably can't make that call, yet, but they will have to. He's OK in games that are blow-outs, where ragging on the team being blown out is one of the only wayts to keep it interesting. He just doesn't work in a game where the game itself is interesting. His negativity is just annoying.

Tuesday, October 10, 2006

GoogleTube

The big news in the Valley is Google's acquisition of YouTube for $1.65B. I gotta say that I was pretty surprised, like most people.  YouTube certainly has its share of naysayers. Mark Cuban thought only a moron would buy YouTube because of the possible copyright lawsuits that could erupt. Actually he has a lot of negative blogs on YouTube. Many other people point YouTube's lack of a business model.

So are they all wrong and Google right? Maybe. One would guess that Google has some ideas on how to monetize YouTube while maintaining its huge user base. Google is the king of non-invasive but effective online ads. So the question becomes, will Google get sued like crazy for all the copyright material on YouTube? Is YouTube really just the new Napster?

That's the million dollar question, or I should say the $1.65B question. What's interesting is that Napster got slammed by lawsuits before they had made much (any?) money. The music industry was more concerned that they were losing money because of Napster than they were with making money from Napster.

Thus can we say that YouTube is not viewed as having a negative effect on the TV and movie industries? Those mediums have certainly suffered in recent years. So one would think that if they thought that YouTube was hurting them, they would have sued already and shut them down. Of course, it may be a question of timing. Maybe YouTube just hasn't been around long enough. Maybe those kind of lawsuits would have happened next year.

Or maybe not. Maybe YouTube has little effect on movies. Most of its effect is probably on TV. I would guess that any effect it has on TV is insignificant compared to the effects of DVRs and audience fragmentation caused by the proliferation of cable content. Killing YouTube would not have helped the major networks.

That doesn't mean they won't go after Google/YouTube, given Google's deep pockets. But it would hardly be an easy fight. You must assume that Google would not have made the YouTube purchase if it was not prepared to fight. It would be a costly fight for the TV networks, and time is on Google's side.

No, even as Mark Cuban admits, Google would have more to fear from small content creators than from the major networks. He even thinks lawyers would upload content to YouTube just to build a case against them. Maybe he is right. The RIAA has shown that a big company taking on lots of people is not effective, even if they win most of the lawsuits.

Still, it seems like Google could prepare for this and try to make it as difficult as possible for these people. Setup some kind of system for taking down the content, thus forcing plaintiffs to jump through all kinds of hoops. As most customer service departments know, if you make it difficult enough, most people will give up.

On another note, Terry points out that Google's acquisition seems like an admission of failure for Google Video. I think that's right on. Google Video was a pain for personal content, unlike YouTube. Of course it also tried to double as a paid video service, competing with iTunes Video. I think that's the real story here. Google couldn't do amateur video as good as YouTube, and they couldn't do "professional"(paid) video as good as iTunes. Apple is winning the video download market, just as they've won the audio download market.

technorati tags:, ,

Blogged with Flock

Sunday, October 08, 2006

The Yankees and A-Rod

I was surprised as anyone to see the Yankees go down in four games to Detroit. I knew that New York's pitching was very suspect, but I thought that Detroit's pitching was hurting a little and that the best offense in baseball would get to it. Boy, was I wrong. Sure the Yanks got to them in game 1, but that was because Detroit's rotation was not setup for the playoffs. Detroit had battled Minnesota for the AL Central crown and had gone to extra-innings on the last day of the season trying to hold off the Twins. Once their big three starters got into the series in game 2, things changed.

Detroit was lead all year by Justin Verlander, Kenny Rogers, and Jeremy Bonderman. Verlander and Bonderman looked tired at the end of the season, Verlander sported a 5.82 ERA in August and September, while Bonderman had a 4.98 ERA. Meanwhile Rogers had struggled against the Yankees in the past. It didn't look good for the Tigers.

But you know the saying, that's why they play the game. The big three were 2-0 with a 2.10 ERA, 1.125 WHIP, and 17K in 21.1 IP in the ALDS. That's dominant. That was the story of the ALDS. The Yankees offense was silenced by the Tigers pitching.

So now things get interesting. Not just because we get a very interesting ALCS between Oakland and Detroit (though I'm guessing Fox is wishing New York was still in there,) but because we get the ultimate soap opera. Once the Yankees have fallen short and we get the soap opera of Steinbrenner trying to fix his team. Already we're hearing that Joe Torre is out, which is pretty shocking. But the big drama is around Alex Rodriguez.

A-Rod's 1-14 ALDS punctuated a season where Yankee fans have been furious with A-Rod. That despite A-Rod putting up huge numbers once again, and just a year after he won the AL MVP. All A-Rod has heard has been boos because "he doesn't come through in the clutch." This is only going to get an order of magnitude worse with A-Rod's 1-14 in the Yankees' ALDS loss.

So what should the Yankees do about A-Rod? Of course the whole thing is ridiculous. A-Rod is one the best offensive players in the game. He's going to challenge many career records for home runs, RBIs, etc. However, it is quite possible that because of all the negative feelings towards him, he may have an even harder time playing to his ability in New York. This is the fault of the Yankee fans and of Joe Torre. Torre should have left A-Rod in the cleanup spot no matter what this year. Playing him the 8th spot against Detroit is unacceptable.

Thus the Yankees may have to trade A-Rod, even though it is a stupid thing to do. Obvously they need pitching. Any team with a promising young pitcher would be fools NOT to trade for A-Rod -- if they can afford him. That's the rub. There aren't many teams that can take on 25M/year salary. So the Yankees will probably have to take on part of A-Rod's salary in order to trade him. I think a Matt Cain for A-Rod trade would be interesting. Maybe the Cubs can convince them to take Mark Prior for him.

A Roy Oswalt for A-Rod trade would be pretty interesting too. A-Rod's stats have suffered in Yankee Stadium (as was predicted by many when he was traded there) because it is a tough place for a right-handed power hitter. His numbers would explode at Minute Maid Park in Houston. Lance Berkman and A-Rod would make for the most lethal 3-4 combo in baseball. Oswalt would not only be the ace of the staff for the Yankees, he would put up huge numbers because he would suddenly have run support. Plus, he's thought of as a "clutch" pitcher who has performed well in the postseason. Again, the Yankees would have to pay part of A-Rod's salary, since there's no way Houston could afford to pay him.

That's only part of the story for the Yankees. They need to figure out if Jason Giambi can play 1st base or not. If not, they need a 1st basemen and they need to trade either Gary Sheffiled or Hideki Matsui (or Bobby Abreu, but I doubt that one.) Sheffield looked terrible at 1st base. That's another strike against Joe Torre.

They also need to move Randy Johnson out of the starting rotation. He cannot hold up for a full season at his age. He could be a terrific relief pitcher, though obviously Mariano Rivera is going to close games as long as his health allows. Mussina and Wang are the only two pitchers that should be in the rotation next year. They should throw some money at Jason Schmidt. That could be a nice rotatoion: Oswalt-Schmidt-Mussina-Wang-whatever.

Blogged with Flock

Thursday, October 05, 2006

My Experience with Vonage (and Comcast)

I saw this article recently on Slashdot. A similar thing happened to my wife, too. We are Vonage and Comast customers. Comcast called our house trying to get us to switch to Comcast VOIP. She made the same retort mentioned in the /. article, saying Vonage is cheaper. They tried to throw the same FUD at her. It didn't work.

We've been very happy with Vonage. Our call quality is excellent. It helps to have a high bandwidth connection (4 megabit.) We have our VOIP box configured to get max quality, even if that means slower connection speed on the computers in our home network. It's never been an issue. Voice quality is always good, and our internet connection is always fast.

VOIP is sometimes looked as a disruptive technology, but it doesn't even qualify I think. Usually disruptive techs are not as good as the techs they are disrupting. They're "almost" as good, and a lot cheaper. In a lot of ways, VOIP is better. It's nice being able to get email notifications that you got voicemail, and then be able to listen to the voicemail online. It's nice being able to re-direct calls automatically to a cell phone when we are away from home (particularly on vacation.)

We switched to Vonage a couple of years ago, when we lived in Concord. We moved to San Jose at the beginning of last year, but because of VOIP, we were able to keep the same number (a 925 area code, even though 408 is the area code in San Jose.)

There are a few things I'd like to see from Vonage. I would like them to setup service in Bakersfield and Panama City, FL -- where our families are. Then we could have virutal numbers in each of those cities, allowing our families to make local calls to us. Again this is something that convential telephone services can't provide. The only thing stopping it from happening is that Vonage doesn't have service in those two cities. I'd also like call blocking on blocked caller IDs, but that's a minor thing.

Oh the big thing that Comcast tried to claim over Vonage was all about 911 service. As long as you make sure that your home address is accurate in Vonage, then you can dial 911 and the police/fire/ambulance/whatever will show up at your door.

technorati tags:, ,

Blogged with Flock

Ruby Time

I started a small project using Ruby recently. It is indeed a Rails project, though the code I am writing for it has little to do with Rails. I like Ruby, but I think that's because I like Java and Perl. I think of Ruby as Perl for Java. Of course there's Groovy now (which I am also a fan of) which is kind of like Ruby for Java (oh wait, isn't that JRuby?)

Anyways, since I think of Ruby in much the way I think of Perl, I figured I would write my code in a simple text editor (notepad2 to be exact) and do everything comman line with Rake. Then I realized there are some great tools out there for doing Ruby development. Ruby on Windows ships with FreeRIDE, a nice little IDE for Ruby. Well actually, the developers are quick to say that it "cannot yet be called a real IDE" but it's pretty close.

But wait, there's more. There are a couple of nice Ruby plugins for Eclipse. Yes, Eclipse. It is my theory that many Ruby developers come from Java, as opposed to other dynamic web languages like PHP and Python. Thus it's not surprising there would be Ruby plugins for Eclipse. All those Java devs wanting to experiment with Ruby can't live without Eclipse!

First there is the Ruby Development Tool or RDT. This is very similar to FreeRIDE, but with some extra features that Eclipse using Java devs have come to expect. Its debugger is just like the Java debugger that is one of the strengths of Eclipse. It also has built-in support for JUnit-like unit testing (Test::Unit.) For Java devs, they will find some limitations. Code completion and error catching are not as good, but that is simply because Ruby is dynamic.

RDT is a lot like the standard Java tooling that is core to Eclipse. For Java web development, there's the Eclipse sister project, Web Tools Platform (WTP.) Similarly RDT has a web development platform called RadRails. This is for Rails, of course, since that seems to be the only web development option for Ruby developers.

As I mentioned, I'm not doing a whole lot of Rails development on this project (yet.) So I haven't played around with RadRails too much. It looks very straightforward, with wizards for creating new Rails projects, target web servers, and databases, etc.

One of the big strengths of Ruby is that it is a fun language to program in. RDT (and presumably RadRails) make this even more enjoyable.

Finally, one last Ruby note. Spring 2.0 was finally released this week. One of the cool features it has is support for Groovy, BeanShell, and Ruby (via JRuby.) It seems a little odd to write a Java interface and then implement it in Ruby, but I can already think of scenarios where it could be useful.


technorati tags:, , , , ,

Blogged with Flock

Tuesday, October 03, 2006

Apple Software Update and iTunes 7.0.1 (Rant)

Recently I installed iTunes 7.0. One of the options it included was to install Apple Software Update. At first I thought, great just what I need, more garbage on my hard drive and eating up memory. Then I thought about how annoying it was to do updates of iTunes. Sure iTunes tells you there is an update available, but all it does is direct you to a web page on Apple's site. From there you have to download the file and run it manually, making sure to shut down iTunes (which is probably running since it was what prompted you to do the update) so that the installer can proceed. Then afterwards I always have to delete QuickTime links it puts all over the place (no option in the installer to not drop these links) and remove QuickTime from my system tray (the installer does not look at the preferences from the old version of QT, or just chooses to reset them.) It's definitely the worst user experience from an Apple product, and it's the most popular Apple product by far (since every iPod owner has iTunes.)

So I decided to install Apple's Software Update, in hopes that it would make this process better. What should a software update program do? Well it would be nice if it could do incremental updates, particularly when the software package is pretty big (and iTunes clocks in as a 35+ MB download these days.) That's pretty hard, though, and few programs pull this off. Next it should be able to download/process the update in a transparent manner to the end user. If it needs to shutdown the program being updated, then it should allow you to do this from within the software update program. If it is going to require a restart after it is done, it should warn you this ahead of time.

So today I load up iTunes and get a warning telling me I need to update iTunes to 7.0.1. This is exactly the same kind of warning I got pre iTunes 7.0. So why did I install this Apple Software Update program? I actually decided to launch it, and it claimed my software was up-to-date.

So of course I had to go through the above painful process, one more time. But wait, it gets worse. When I ran the installer for 7.0.1, it tried to install iTunes in a different place than where it was currently installed. I didn't remember previous versions screwing that up. Next, it asked me if I wanted to install the Apple Software Update program! Of course that program is already installed... Finally, once I got done it told me I needed to reboot Windows. Great, thanks for warning me ahead of time.

All in all, a very disappointing experience. It seems that iTunes is taking steps backwards, not forwards. Maybe Apple should concentrate more on basic software functionality instead of re-designing their UI to compete with Vista... (I know Vista copied OSX, but does that mean you have to change things?)

MLB Playoff Picks

National League

It's a shame that the Mets and Dodgers meet in the NLDS. The Mets were clearly the class of the NL this year, but statistically the Dodgers are right behind them. Their offense scored only 14 less runs than the heralded Mets offense. That's especially impressive since Dodger Stadium is the usually one of the toughest ballparks for hitters. The Dodgers are the pick here. They were a hot team down the stretch. The Mets pitching is going to hurt without Pedro Martinez. The Mets are more of a long-ball team than the Dodgers. Such teams often struggle in the postseason. Dodgers in four games.

If only the Mets could play either San Diego or St. Louis. They would dominate either team. St. Louis limped into the postseason, but they sport arguably the league's best hitter (Albert Pujols) and best pitcher (Chris Carpenter.) They are a much better offensive team than the Padres, who relied on having the best pitching in the league. It's tempting to say "great pitchig beats great hitting." That's garbage though. The Padres will struggle to score against the Cardinals, and that will be their undoing. They will suffer if they pitch around Pujols too much (you just can't put one hitter on base 2-3 times a game, every game, and not give up some runs.) So St. Louis in four games.

So if I'm right so far, we'll have a Los Angeles vs. St. Louis NLCS. I won't go into too much analysis of such a speculative matchup, but I would pick Los Angeles in five games.

American League

What a great season it's been for Detroit. It's probably about to come to a crashing halt though, as they play the Yankees in the ALDS. Detroit struggled against teams with good hitting all year, and the Yankees have the most potent offense in baseball by far. They scored 60 more runs than anybody else.  It's tempting to look at Detroit and see shades of the world champion Florida Marlins from a couple of years ago. Y'know, the team that beat the Yankess in the World Series. The Tigers are coached by Jim Leyland, have the great Ivan Rodriguez catching, and have some great young pitching, all things in common with the Marlins. The Marlins had a better offense (Miguel Cabrera, Derek Lee, Mike Lowell, Juan Pierre, etc)  and Detroit's young pitching has struggled down the stretch (tired arms?) Their bullpen is probably better than Florida's, but it won't be enough. Yankess in four games.

Oakland and Minnesota always seem to lose to the Yankees in the ALDS. This year, they get each other. They are the two hottest teams in the AL. I was leaning towards picking Oakland, especially after seeing Rich Harden crush pitchers in two starts recently after coming off the DL all year. However, Harden struggled in the last game. Still, it's going to be a tough battle. The A's will not be able to touch Santana, and that will be the difference. Twins in five games.

In the theoretical Yankess vs. Twins... I'd like to say it's time for the Twins to kill the witch... but the Yankees were effective against Santana this year, just as they've always been. Without two wins from Santana, the Twins have little chance. So the Yankees in six games.

A Yankees-Dodgers World Series is every TV exec's dream. The Yankees are the better team on paper. If Randy Johnson is back and pitching effectively (two very big IFs) then they should definitely win. Otherwise, the bombers may find it very hard hitting homers in Dodger Stadium. S o I will go with the Dodgers in a six shocking games.


technorati tags:

Blogged with Flock

Monday, October 02, 2006

MLB '06 -- Awards and Postseason Picks

Today was a sad day. No baseball. The regular season ended yesterday, and the postseason starts tomorrow. This postseason is bitter sweet, as it is the first time in more than a decade that my favorite team, Atlanta, is not taking part. So time to look back at the regular season. Here are my picks for the various regular season awards.

MVP

First off, the National League. It is a clear race between Albert Pujols and Ryan Howard. Pujols was spectacular all season. He was the best overall hitter in the NL, as measured by OPS . However, he missed several weeks early in the season. This helped Howard put up greater cumulative numbers with 58 home runs to 49 and 149 RBIs to 137. Pujols still managed 119 runs to Howard's 104, despite Howard having nearly the same OBP as Pujols (.425 for Howard vs. .431 for Pujols) and actually getting on base 21 more times than Pujols. This just shows that Howard had weaker hitters behind him than Pujols. Overall, Howard also racked up 155.5 runs created vs. 141 for Pujols, and even had a slightly better RC/27 outs of 10.19 vs. 9.94. In my opinion RC/27 is just as good as OPS for measuring production. So with a wash on the "average" categories, you have to give the MVP to Ryan Howard with his overall better numbers. He certainly carried his team back into contention, and only a tremendous finish by the Dodgers kept the Phillies out of the playoffs.

Honorable Mention: Lance Berkman. Clearly overshadowed by the other two first basemen, Berkman had a huge season (.315-45-136.) He was definitely behind the other two guys in every category, but he was also easily above everybody else.

Now for the American League. It's kind of a similar story over there. Travis Hafner and Manny Ramirez had great average numbers (OPS and RC27,) but David Ortiz put up much better cumulative numbers, particulary total runs created. Like Howard, he lead the league in home runs and RBIs. In addition, Ortiz was probably the most feaured hitter, especially late in the game. This lead to him leading the league in walks as well. Ortiz is a clear choice over Hafner and Ramirez. The White Sox's 1-2 punch of Jim Thome and Jermaine also had huge numbers, but clearly below Ortiz as well.

No, the only hitter who could challenge Ortiz for MVP is Derek Jeter. Jeter had a great season, finishing second in batting to Joe Mauer. He had a great OBP (.417) which lead to him scoring 118 runs. Obviously his power numbers are nowhere near Ortiz's. In addition, Ortiz's OBP (.413) and runs scored (115) were nearly equal to Jeter's. It's hard to make a statistical argument for Jeter. Really Jeter was only the third best hitter on his team, behind Jason Giambi and Alex Rodriguez. Still, I wouldn't be surprised if there is a Jeter over Ortiz pick, kind of like Terry Pendleton beating out Barry Bonds back in the early 90's.

Cy Young

Let's do the easy one first, the AL. Johan Santana put togther a triple crown season, leading the league in ERA, wins, and strikeouts. Actually, he lead all of the majors in all three categories. Nobody is even close to Santana in the AL. In fact, you can make a strong case for him as an MVP candidate.

Honorable Mention -- Roy Halladay. He put together a great season (16-8, 3.19 ERA) for Toronto. Just nowhere near as good as Santana.

Now for the more contentious NL. Nobody had more than 16 wins in the NL, which is really unusual. Still, three pitchers had significantly better ERAs thant he rest of the league: Roy Oswalt, Chris Carpenter, and Brandon Webb. Oswalt and Carpenter won 15 games, trailing Webb's 16 games. Overall, Carpenter was harder to hit than the other two (.643 Opp. OPS, leading the league) and had more strikeouts. He also played on a playoff team, though Oswalt helped Houston make a run for the NL Central title. Seems like enough of an edge to hand him another Cy Young.

There are two NL relievers worth mentioning. Trevor Hoffman lead the league with 46 saves and had a 2.14 ERA. Billy Wagner was just behind with 40 saves and a 2.24 ERA. Both of these guys helped their teams win their divisions. Both guys also had 5 blown saves. Those are good percentages, but not good enough to pick them over a starting pitcher.

So to summarize:

NL MVP -- Ryan Howard

NL Cy Young -- Chris Carpenter

AL MVP -- David Ortiz

AL Cy Young -- Johan Santana

Next time, I'll put together some playoff analysis and picks.

technorati tags:

Blogged with Flock

Friday, September 29, 2006

Bye Bye Bonds?

I was reading this article from the San Jose Mercury suggesting that the San Francisco Giants should not re-sign Barry Bonds for next year. I was driving to San Francisco on Sunday morning, listening to talk radio, and many of the callers were saying the same thing. The crux of the arguments is that the Giants will have to pay Bonds a lot of money, and if they do so, then they will not be able to make the many upgrades they need to change the team into a contender. The pundits go on to say that if they spend the Bonds money on free agents, then the team will be back in the playoffs. However, the pundits fret that the Giants ownership will be afraid that ticket sales will fall if the Bonds is breaking the home run record for another team. Of course, these guys are all wrong.

First off, the Giants are not going to contend next year anymore than they contended this year. They are 11th in the NL in runs scored, 11th in OPS, 9th in runs allowed, and 11th in ERA. They are not good at anything. The Giants are not an Alfonso Soriano away from contending.

But it gets worse. If the Giants add Soriano, they are letting go of Bonds. Now Soriano ranks third in the NL in runs created, just behind Ryan Howard and Albert Pujols. However, if you look at runs created per 27 outs, then he falls to 13th. That's still pretty good. Bonds is 24th in the NL in runs created, but is 4th in runs created per 27 outs. So when Bonds plays, he is a much better offensive player than Alfonso Soriano. Obviously he doesn't play as much because of his age, thus Soriano winds up creating more runs over the course of a season.

Now will Soriano be a much cheaper player to sign than Bonds? That seems unlikely. Of course he will be around longer, so one could say the Giants will be better in 2008 with Soriano on the team. However, it's hard to argue that they would be better in 2007. They won't be able to improve in other areas if they had Soriano instead of Bonds, because they'll spend as much money on Soriano as they would Bonds. Soriano will play in more games, but will probably not be as productive as Bonds on a per game basis.

The fact is that Bonds is the best player on the Giants. Yes, he's (finally) starting to show his age and is not as good as he was a couple of years ago. But he's still an elite player when he plays. It takes a lot of money to replace an elite player.

Now of course the Giants could sign some other players instead of Soriano, I just picked on him because that's the guy that is being targeted by a lot of the anti-Bonds crowd. So maybe several other players together could more than compensate for Bonds. It's still not going to be cheap.

Once you realize that Bonds is still the best player on the Giants, then you realize that the decision to sign or not sign is not just about him breaking the home run record. The reason the Giants have struggled is they have not produced any quality players from their farm system in recent years. There is Matt Cain, who looks like he's on the brink of becoming an elite pitcher. That's it though. Their best everyday players are all free agent signings, thus they are mostly very old: Ray Durham, Moises Alou, Omar Vizquel.

You can't buy good young players, you must produce them. Look at the NL's top run producing teams: Philadelphia, Atlanta, and New York. Philly has Ryan Howard and Chase Utley, both home-grown. Atlanta's old vets of Chipper/Andruw Jones happen to also be homegrown, but they also have several young homegrown hitters: Brian McCann, Adam LaRoche, and Jeff Francouer. The Mets are in some ways the exception, with highly paid free agent pickups like Carlos Beltran and Carlos Delgado, but they also have homegrown talent David Wright.

Blogged with Flock

Thursday, September 28, 2006

Bill Clinton: Linux Enthusiast?

According to former president Bill Clinton: all you need is ubuntu. I actually installed the latest version of Ubuntu on my home PC this week. It was probably the least painful Linux install I've ever done on that computer. Only weird things I had to do was install a Nvidia driver (apt get nvidia-glx) and then reconfigure X. I only had to do that so I could my monitor's native 1280x1024 resolution instead of the 1024x768 Ubuntu came up with at first. Maybe I should try it on my laptop, since there appears to be a lot of other people installing on the same laptop I have. Of course the volume of info on this subject also suggests that there are a lot of problems with doing it!

Monday, September 25, 2006

Vista RC1

For about a week I've been running Windows Vista RC1 on my laptop. I had used the Beta 2 on my desktop machine. I was unable to use the Aero theme on it, because my graphics card (GeForce4 TI 4400) does not support DirectX 9. However, my laptop's modest Intel 945GM integrated graphics does support DirectX 9, thus my laptop can run Aero quite nicely.

Aero is some nice eye candy. I remember the first time I saw the XP graphics, and I thought "ok that's just silly." Aero is a more impressive evolution.

Overall RC1 is much, much faster than Beta 2. It has some bugs. For example, I can't seem to use my mouse to scroll through contextual menus in Explorer (arrow keys work fine though.) There still seems to be issues around long filenames/paths and with compressed folders. Also, Windows Defender keeps trying to tell me that it is blocking some startup program, but when I open the list of startup programs, all of them are active.

Now will an upgrade be worth it? Probably not really at first, but it will become necesarry eventually. XP was a bigger upgrade in terms of stability, at least when compared to Windows 98 or ME. A Windows 2000 user could get by without XP for a long time, at least until they needed some specialized hardware driver. Seems like Vista will be a tougher sell for XP users.

As for me, I have decided to finally upgrade my desktop's graphics card. The GeForce TI 4400 has been an awesome card. I bought it back when I played games (before I had kids basically.) It was great on games like Medal of Honor and Unreal Tournament. I don't play games anymore, so I will be happy with a cheap, Aero-capable card.


Blogged with Flock

Saturday, September 16, 2006

The Beast

I decided this week that it was time to buy new running shoes. Most folks say buy new shoes every six months or every 500 miles, which ever comes first. My six month mark was last month, but I had a couple of weeks where I could not run for health reasons. So I waited. This past week, I could really tell my shoes had lost their effectiveness. There were allowing me to pronate way too much, especially late in my run and on my right foot. So time for new shoes.

I went to my favorite running store, The Runner's Factory in Los Gatos. This is where I had bought my previous shoes. They had spent a lot of time with me trying on different shoes, running in them, and watching how my feet and ankles reacted to the shoes. My old shoes were Brooks Addiction 6. They had really worked well for me, and I thought I would probably get the same kind today. Not surprisingly, Brooks has replaced the Addiction 6 with (what else) the Addiction 7.

I was going to try out the new Addiction 7, but unfortunately The Runner's Factory did not have any in my size (11EE.) They offered to order them for me. I figured I would give some other ones a try, and if nothing else seemed good, then I would order the Addiction 7.

When I bought the Addiction 6, I had also tried Brooks top shoe for overpronators like me, The Beast. I didn't like how heavy it felt on my feet. Today I tried on the newer version of The Beast. It felt a lot lighter than the old Beast. Even better, it seemed to have a lot more cushioning than either the old Beast or the Addiction 6. So I decided to go with The Beast.

I gave them a good run on my usual route, later this afternoon. I was very pleased with them. They definitely prevent overpronation, and the extra cushioning made me feel like I had some extra spring in my step. They still feel a little heavier than the Addiction 6, but I think it's a good trade-off.

Wednesday, September 13, 2006

New Shiny Software

I've installed a couple of updates to widely used programs: Internet Explorer 7 RC1, and iTunes 7.0.

IE7 RC1

I don't use IE6 much, I mostly use Firefox and Flock. I'm not religious about it, though, so I've been trying out the various revisions of IE7. RC1 is definitely a huge improvement over beta 1 and 2. It is much faster and smoother. It's still slow on my favorite JavaScript test, mostly because it is very slow with opening new windows. The UI has continued to be tweaked, and I think it looks pretty nice. I would not be surprised to see open source competitors adopt some of the UI paradigms seen in IE7.

Now would I use it instead of Firefox/Flock? Probably not. The extensions offered by Firefox still make it a better browser for me. Plus there are still some issues with IE7. For example, it still seems to screw up CSS -- probably because of their incorrect box model. It is horribly slow on scrolling on Slashdot, and has rendering problems on it. Again this is probably because of poor CSS implementation by Microsoft.

iTunes 7.0

I could talk about the new menus, UI tweaks, etc. but it's the album artwork-flipping view that is the coolest. Of course this requires artwork, and Apple is kind enough to provide this for free. I tried to perform this operation on my entire library and had mixed results. iTunes requires an exact match on both artist name and album name. Many of my CDs were ripped using EAC+Lame or CDex, so these names don't always exactly match with iTunes. For example, I had "On and On" by Joe Johnson, and iTunes could not come up with any artwork for it. I changed the title fo the CD to "On And On" and then iTunes found the artwork.

So it's a little buggy with the find artwork. It also seems a little bit slower, maybe because of the extra amount of metadata it's dealing with. I like the menus re-org, and don't mind the other UI changes. I've seen some people comment that it looks more like a Java Swing application, which I find amusing.

Of course iTunes was only a small part of the big announcements from Apple. Yes, my Nano is now officially "old" as it has been replaced by smaller, metallic Nanos. It's nice that they have a 8GB option, and I think it is cool that it only comes in black -- a little extra icing on the iPod status symbol. I was most impressed with its extended battery life and quicker charge time. Those are actually compelling features to me, but definitely not enough for me to replace my nano. I was a little interested by the lower priced, better performing iPods.

The really big news was the widely anticipated iTunes movies for sale. Yeah, they only have Disney (and Disney subsidiary) movies, but you know that will change. They used to only have ABC and Disney TV shows, and look how that has evolved. The pricing seems pretty good, and it's good that they've gone to near DVD quality.

But the real kick is the so-called "iTV." It is unheard of Apple to show a product that is not finished yet. Which makes me assume that it actually is finished, and will be available for the holiday season. Forget the "Q1 2007" -- Jobs is just toying with us.

The idea is great by the way. Forget putting a whole computer in your living room. Nobody wants to surf the web and read email on their TV. They do want to listen to music on their home theater sound system, watch videos and look at their huge photo collection. This little box is going to do all that perfectly. And... with $10 movie downloads off iTunes, it could become a very popular way to buy movies. Pre-order your movie for $10 and it downloads while you're asleep one night. Wake up, and watch it on your home theater system, or copy it to your iPod to watch on the plane or whatever.

Monday, September 11, 2006

Using Annotations to Build Object Representations

One of my co-workers came to me with a familiar problem. He had class that was being rendered as XML. The class itself could have different renderings, so the XML creation was done using a classic builder pattern. This was good, but he still fretted about how his class would probably change (new features, imagine that) and he would have to change the XML builders so they would output the new properties.

It's a classic model-view coupling problem. I had suggested the builder architecture, in part because I remembered a classic article by Holub on this kind of problem. I started thinking and came up with a possible solution. This solution may have its own design flaws, but it was interesting.

My idea was to use Java's annotations to decide what parts of an object need to be present in its representation. Thus the annotation was a clue to the builder saying "show me." A reusable builder could this be built to simply obey the hints provided by the object it was building a representation for. In this case, everything was XML.

So I built a simple annotation class:


import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;

@Documented
@Target({ElementType.METHOD,ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface XmlView {
XmlViewType value();
}

I created this XmlViewType as an Enum. Basically there could be one value in the Enum for each representation needed. Actually value() should really return an array of XmlViewTypes, since you will often want to show the same data in different representations. Or for maximum reusability, just have it return an array of strings. You can pass in the value to match against later.

Now to create a reusable builder.




import java.lang.reflect.Array;
import java.lang.reflect.Method;
import java.lang.reflect.Type;

import org.apache.commons.lang.StringUtils;
import org.dom4j.DocumentHelper;
import org.dom4j.Element;

public class AnnotationXmlBuilder{

public static Element buildXml(Object obj, XmlViewType type){
String objName = obj.getClass().getSimpleName();
return buildXml(obj, objName, type);
}
public static Element buildXml(Object object, String elementName, XmlViewType type){

if (isPrimitive(object.getClass())){
Element e = DocumentHelper.createElement(elementName);
e.addText(String.valueOf(object));
return e;
} else if (object instanceof Iterable){
Iterable iter = (Iterable) object;
String pluralName = "";
String singularName = "";
if (elementName.endsWith("s")){
pluralName = elementName;
singularName = elementName.substring(0, elementName.length()-1);
} else {
pluralName = elementName + 's';
singularName = elementName;
}
Element e = DocumentHelper.createElement(pluralName);
for (Object obj : iter){
e.add(buildXml(obj, singularName, type));
}
return e;
} else if (object.getClass().isArray()){
String pluralName = "";
String singularName = "";
if (elementName.endsWith("s")){
pluralName = elementName;
singularName = elementName.substring(0, elementName.length()-1);
} else {
pluralName = elementName + 's';
singularName = elementName;
}
Element e = DocumentHelper.createElement(pluralName);
int length = Array.getLength(object);
for (int i=0;i<length;i++){
Object obj = Array.get(object, i);
e.add(buildXml(obj, singularName, type));
}
return e;
} else {
// go through its methods
Element e = DocumentHelper.createElement(elementName);
e.addAttribute("kind", object.getClass().getSimpleName());
for (Method method : object.getClass().getMethods()){
XmlViewType xvt = getAnnotation(method);
boolean showMethod = ((type == null) ||
(xvt != null && xvt.equals(type))) &&
isProperty(method);
if (showMethod){
String propertyName = StringUtils.uncapitalize(method.getName().substring(3));
try {
Object val = method.invoke(object, (Object[])null);
e.add(buildXml(val, propertyName, null));
} catch (Exception exc) {
// eat it for now
}
}
}
return e;
}
}

private static boolean isPrimitive(Type type){
return (type.equals(String.class)) || (type.equals(Integer.class)) || (type.equals(Long.class))
|| (type.equals(Double.class)) || (type.equals(Float.class)) || (type.equals(Byte.class)) ||
(type.equals(Boolean.class)) || (type.equals(Short.class)) || (type.equals(Character.class))
|| (type.equals(Character[].class));
}

private static XmlViewType getAnnotation(Method method){
if (!method.isAnnotationPresent(XmlView.class)){
return null;
}
return method.getAnnotation(XmlView.class).value();
}

private static boolean isProperty(Method method){
return method.getName().startsWith("get") && !method.getName().startsWith("getClass");
}
}

This class returns a dom4j Element, but one could easily switch XML technologies for this. It would not be too hard to do it with just pure DOM. Anyways, what does this code do? It takes in a class and view type. It iterates over all methods in the class, looking for getters. If it finds a getter, then it looks to see if it has been annotated with the XmlView annotation. If so, it compares the value to the value passed into the method. If they match, then it uses the name of the property and invokes the getter. If the return type is a primitive or a String, then it crates a corresponding node for it. If it is a list or array, it creates a surrounding element, then creates a child element for each item in the array or list. If the return type is some other kind of object, then it descends the object graph using recursion. So if your class had a getFirstName method and an instance of this class happened to return "Michael" for this, then you would get something like <FirstName>Michael</FirstName> in your XML. If you object had a getCar() method that returned a Vehicel object, and Vehicle had a getMake() method you might get something like: <car><make>Volkswagen</make></car> Pretty straightforward.


Vista in the End

I read this interesting article about Windows Vista. Vista may well be more significant than the author realizes. It may well be the greatest piece of shrink wrapped software ever produced, and perhaps the final hurrah for shrink wrapped software.

For years people have talked about moving applications online. Proponents of on-demand applications tried to argue that they would win out for a variety of reasons, such as portability, ease of maintenance, lower cost, etc. The truth is that maybe they will win out just because it will become too hard to do things any other way.

It still probably seems absurd to suggest that it is easier to write something like MS Word or Adobe Photoshop as a web application than as a desktop application, but the initial creation of the software is only part of the cost. The history of Windows may prove prophetic for other desktop applications. They grow and grow, and have all kinds of "baggage" (working with other apps, backwards compatibility, OS compatibility, etc.) Perhaps this weight is even worse for an OS, especially one that offers so many integrated applications with it. But maybe it will prove to be true for lots of other software too.

So why are web applications any different? For one, there is no such thing as backwards compatibility. There is no such thing as "upgrade" for a web application. Thus you never have to support multiple versions and worry about upgrade rates. The use of web standards also makes many of the other issues easier to deal with. Releases can be much smaller, and incremental for a web application, and thus also more frequent.

All of these things may make desktop applications, especially complex ones, just too expensive to build and maintain. It may only make sense to do them online. Desktops may become the realm of small, simpler applications that don't change much (think notepad.)

Sunday, September 10, 2006

Better Late Than Never? NFL Predictions

So I guess I should've posted this before the start of the regular season... but today's action did not change any of my predictions.

  • AFC East -- Miami
  • AFC South -- Indianapolis
  • AFC Central -- Pittsburgh
  • AFC West -- San Diego
  • AFC Wildcard -- New England
  • AFC Wildcard -- Cincinnati
  • NFC East -- Philadelphia
  • NFC South -- Carolina
  • NFC Central -- Chicago
  • NFC West -- St. Louis
  • NFC Wildcard -- Atlanta
  • NFC WIldcard -- Dallas
  • AFC Champ -- Indianapolis
  • NFC Champ -- Chicago
  • Superbowl -- Indianapolis

I would love to pick Miami, but I think they will need one more year. I almost picked Arizona to make the playoffs, and I think Cincinnati will barely make it in.

technorati tags:

Blogged with Flock

Thursday, September 07, 2006

All In The Family

My wife started her own blog today. Apparently I wasn't doing a good enough job of blogging pictures of our kids, so she's going to do it herself! Add it to your favorite personal homepage today!

Blogged with Flock

SMS

I've been doing some research lately on SMS. At PocoPay, we had technology for sending SMS to our customers. For example, if you signed up online you werre sent a pin to verify your cell phone via SMS.

For sending SMS, we paid for a service from Clickatell. We would send them an email and they would then generate an SMS based on the contents of the email. Kind of primitive, but very cheap. PocoPay never made any money so cheap was important!

My latest research has been on receiving SMS. If you're a cell phone user, it is free to receive an SMS, though you must pay to send them. However, for an application provider, receiving SMS is a lot trickier.

SMS is very fragmented, especially in the United States. In the U.S., people like to use short codes for sending SMS. Thus if you want to receive SMS, you need a short code. Only problem is that short codes belong to service providers. So you must pay for the short code from each provider.

Next you still need to receive the SMS. Various service providers will relay the SMS to you either by email or by HTTP POST. Other providers give acess to SMPP networks where you can poll for your messages.

A more primtive route is to do things like cell phone users. This involves hooking your application directly to either a cell phone or a cell modem. Then you can simply receive the SMS on your phone, like an end user would, and then download the SMS to your server. This seems like a good "getting started" option. It's not as expensive, but it does not scale (that's ok for getting started.) Of course you have to connect your phone to a server and need code for interfacing with it, but there are lots of options for this, including some open source ones.


technorati tags:,

Blogged with Flock

Friday, September 01, 2006

XSD

My last post reminded me of a comment a former colleague of mine once made. He accused me of being "anti-XSD." I found this an unusual statement since I have written dozens of XML schemas, maybe more than a hundred. I have made good use of JAXB for generating parsing/binding code based on an XSD from when it was still a proposal up until the present annontation-based versions. So I don't think it's that I'm anti-XSD. It's that I'm anti-XSD proponents, or at least some of them.

You see when I meet somebody who is a huge XSD fan and want to use it to describe the world, I think to myself "I know who you are." These are the same people who used to want to describe the world using relational database schemas. They used to say "build all the data validation into the database, it is faster and better and it has to be right anyways." When they realized that SQL schema definitions were unable to properly describe all real-world data, they turned to stored procedures.

I see the same thing happening with XSD. It was obvious that DTDs were insufficient to describe everything, so XSD was born. It is several orders of magnitude more complex than DTDs, but it still cannot describe everything. It does not allow for dependencies between data. Thus the datatype of one element or attribute cannot depend on the value of another element or attribute (or on the values of four elements and two attributes, etc.)

I've long mused that the existence of the "xs:any" data type was partially because of this shortcoming. I've just picked on of XSD's shortcomings, but that's enough to see that at the end of the day neither XSD and SQL can actually describe the whole world.

So how oh how can we write software for real-world problems when these data modeling languages cannot describe all real-world data? Ahh, that's why we have programming languages. That's why the database guys started pushing stored procedures with their own languages like PL/SQL. Heck, Oracle eventually even put a JVM inside their database so you could write Java for your stored procedures. I wouldn't be shocked to see some kind of language added to XSD.

The truth is you don't need it. There are plenty of programming languages already out there. They can even be used to allow for a declarative approach to data definition. Maybe one of these declarative approaches could become "standardized" or somehow baked into XSD. Maybe one day web browsers (and databases, etc.) will become smart enough to understand "super-XSD" and "middleware", and the programming languages used to build it, will shrink away. I have my doubts though. Those database guys never really pulled it off, and they've been trying since the 80's.

Thursday, August 31, 2006

JSON vs. XML

I recently was dragged into a JSON vs. XML debate. There are definitely some people out there with strong opinions on this matter. I'm not really one of them. However, most web developers I've worked with like how easy JSON is to work with. That's good enough for me. Plus, some of the typical pro-XML arguments are particularly disturbing to me:

  1. XML has strong typing. That's great if you're doing some kind of B2B data/document exchange. Is it really well-suited for the web? Do you want to run a schema-validating XML parser inside a browser? If your server dishes up an XML doc, do you really want your browser to reject it?
  2. XML is extensible. Being able to extend a schema and thus add to a document is great, but do you really want data objects that have a lot more information than is needed by your browser? Perhaps you'll want to wait until the net neutrality debate is over before you answer that...
  3. XML allows your client and server to use the same data model. Again this sounds great, but there are big problems. First, it implies your server is storing everything (or a lot of things) as XML. You better have some really good reasons for doing this, as either your neglecting the considerable strengths of relational data storage or you're probably misusing it. Second, you're creating a strong coupling between the Models and Views in your system. I know this has become more popular as it is viewed as a tenet of "lightweight" development, but it is a design flaw. That doesn't mean you should never do it, just that it must be weighed against the positives that it would bring. In my experience, even when such tightly coupled systems work well at first, they become a nightmare on versions 1.1+

Again, it's not that I'm against XML on the browser... I'm just wary of some of the arguments for it. I think it is often a wash between the two technologies, which is why I say "so be it" when a web dev tells me they prefer JSON because it makes some of the programming easier.

Tuesday, August 29, 2006

Spring MVC and Servlets

I've been using Spring MVC for a variety of web applications. It really does have a lot of nice advantages over Struts making it one of the better request-based frameworks (as opposed to the component based frameworks like Seam.) I came across an interesting use case that doesn't seem to be covered by Spring MVC.

I had a URL mapped to a controller. The URL needed to work for a variety of devices, not just
"full" web browsers like IE and Firefox. In particular it needed to work with a J2ME application. The controller needed to inspect the user agent of the HTTP request, build a model based on this information, and then forward to a view. The view would be different for different devices.

The wrinkle came when the developer working on the J2ME application told me he wanted the view to output a binary data stream. This could be done in a JSP, but is more suited to using a servlet. So I needed to configure a view in Spring MVC that was a servlet.

Spring MVC includes many view implementations. Several JSP-variants, and many other specialized views for working with various technologies such as Jasper Reports, Free Market, POI, PDF, etc. But nothing for a user built servlet like the one I needed to forward to. Seems like kind of a hole in Spring MVC.

Turns out it is not too hard to work around. The key is using the "forward:" prefix. Simply append this to the URL path specified in your servlet mapping, and it will short-circuit the Spring view lookup and forward directly to the desired servlet. So for example, if in your web.xml you had specified "/myServlet" as the mapping to your servlet, then having your controller return something like new ModelAndView("forward:/myServlet", "myModel", model) would forward to your servlet, and allow you to retrieve the model you had built in your controller using a simple request.getAttribute("myModel").

So it was easy to work around, but it still seems like Spring should have a servlet view. Maybe I will try to submit one to them...



technorati tags:,



Blogged with Flock

Saturday, August 26, 2006

Stoned

I've been away for awhile, sidelines for medical reasons. I had a kidney stone that wound up requiring surgery. The surgery was laser lithotripsy. It was the first surgery I've ever had, and the first time I've experienced general anathesia. Recovery from the surgery was actually much more painful than the actual kidney stone, but I was fully recovered in just a couple of days after the surgery. I had suffered with the kidney stone for over a week, and there was no end in sight.

Anywyas, my urologist is running a couple of tests on me in a couple of weeks to analyze my metabolism. This was my second kidney stone in two years, so he wants to see if there's anything in my diet that needs to be changed to prevent me from having another one anytime soon. I'm certainly hoping for as many stone-free years as possible.

Tuesday, August 08, 2006

ESPN FFL and Java Web Start

I've been playing fantasy football for more than ten years. I started playing with friends from college. In fact our fantasy football league was the very first web site I developed. I maintained and enhanced it for a couple of years, passed it on to some of my other friends to run awhile, before we eventually started using a hosted site through CBS Sportsline. I've also played fantasy sports on ESPN for many years. In 1998, one of my fantasy basketball teams finished third overall out of all teams on ESPN. I would've won a leather jacket, if I didn't live in Florida where it was not allowed because it was too valuable a prize and would cause the game to be classified as gambling... I digress.

In short, I've been playing fantasy sports online for a decade. I decided to play on ESPN this year, and had my first draft on Sunday. I was surprised to see that ESPN was now using Java Web Start for their draft application. This mostly made sense as for years they used a Java Applet for it. Actually for several years their applet used Microsoft's Java "extensions" (the ones that caused Sun to sue Microsoft and force Microsoft to stop making their own Windows-integrates JVM) and would only work with Internet Explorer. ESPN has Flash more and more in recent years, so I expected them to switch to that for their draft application.

Instead they've gone to a more powerful Java application requiring the latest JVM from Sun, and used Web Start as a platform for distributing and launching the application from a browser. It's a great use of the technology and I am happy to report it was a very smooth draft. I've had many, many ESPN drafts that were plagued with all kinds of problems, especially in the late 90's. They've seemed to solve all the old problems, and I'm guessing using a more robust application via Web Start was a big part of that solution. Kudos to them.

Not to diss Flash. It has come a long way towards being a powerful application platform. I don't know enough about it to say if ESPN could have pulled off the same thing with Flash instead of using JWS, but JWS was surely a more straightforward upgrade path since their old drafting app was a Java applet.

technorati tags:, , ,

Blogged with Flock

Tuesday, August 01, 2006

Church and State

Here's a great blog about a NY Times article on an amazing preacher. He refused to use his position as a religious leader to endorse politicians or political ideologies. Of course historically religion and politics have gone hand-in-hand. The idea of separating church and state, while not new (see The Greeks) was one of the most revolutionary concepts of The Enlightenment. After all, government that claimed its authority from a god could not be questioned. Thus a separation of church and state was needed so that government would have to derive its authority from the people -- and thus be responsible to the people.

Still, in many governments today we still see religious leaders with tremendous political power. Most people would say "oh that's only the case in backwards, third world countries." Enter Exhibit A: George W. Bush.

Bush was elected (though not without great controversy) but has repeatedly invoked the name of god as an integral part of his administration. He's made statements that he thinks he's on a mission from god. He's used his personal religion to discourage scientific research. He's tried to influence the education system to promote religion over science. His tactic of claiming "treason" when somebody disagrees with his wars is not unique to him or to religious leaders. Still it's no different than claiming "heretic" when confronted with criticism.

There's a huge difference between Bush and the ayatollahs in Iran. Despite his fondness and pride in his religion, Bush is not a religious leader. He has not spent his life devoted to a religious following. No, he is a politician. He simply uses religion. These churches with their American flags and "no gay marriage" banners are just puppets of the GOP.

Saturday, July 29, 2006

Calero Reservoir

Today I cycled the most challenging route I've attempted so far. I cycle out to the Calero Reservoir. This was the longest route (20 miles) I've done, but only by a little. What made it the most challenging is that it's highest elevation I've cycled to, at around 560 feet. My house is around 160 feet, so it's only 400 feet of rise. That rise is over a long distance, though the last 250 feet or so comes in about a 2 mile stretch. Not much by Tour de France standards, but excruciating for me!

Here's a picture I took with my phone of the reservoir:

Nice port-a-potties... And here's the entrance to the park at the reservoir:

It was a fun ride that I will definitely do again soon.

technorati tags:

Blogged with Flock

Friday, July 28, 2006

Fixing Iraq

I have a decent number of news/blog feeds that I read. One thing I try to do is read things that I know I will disagree with. I think it's the best way to keep my mind open. Sometimes it's really frustrating though. For example, today I read this article on the Opinion Journal.

It's a horribly partisan piece, as it quickly reveals in its subtitle "Some alternatives to pre-emptive retreat." So it immediately makes the assumption that exiting Iraq is "pre-emptive retreat." As if leaving a sovereign country alone is retreat, and is if any such exit could not be pre-emptive, i.e. someone would force us out. Such an opening to an article sguarantees that it will never motivate someone who thinks we should leave Iraq to re-consider their opinion. Instead this just becomes a ra-ra article with no chance of having real substance.

The author (name not listed) does offer a single argument against leaving Iraq:

"former U.S. Ambassador Peter Galbraith suggests resigning ourselves to the partition of Iraq into Sunni, Shiite and Kurdish states. The big problem with that idea is that Baghdad is a multiethnic city, and dividing it along ethnic and sectarian lines would entail displacing at least two million Iraqis and a lot more bloodshed."

So we shouldn't let the people there decide their own future because ... they could hurt themselves? News flash: they're doing that already. Too bad for the US that England or France didn't step in 150 years ago to stop us from hurting ourselves in The American Civil War. If only England could have been occupied and guided America, then a lot of American lives could have been saved...

The unidentified author then goes to provide his list for fixing Iraq:

  • More security forces for Baghdad -- Sounds like Vietnam all over again. Just pour more troops in. That's sure to go over well with the population. Even better, "embed" more troops with Iraqi police forces. Yeah that's really going to make people respect the Iraqi police as legitimate authority.

  • Better intelligence -- When all else fails, blame the troops. We've already seen the President do this. I love how some writer for OJ can claim "it shouldn't be as hard as it has been to identify the likely troublemakers." Maybe the CIA should "pre-emptively retreat" and let this guy take over for them. Clearly he could find out who those "troublemakers" are. Just using such a term shows the author's overwhelming arrogance and ignorance.

  • Iraqi leadership -- What's this, an elected Iraqi spoke poorly about Americans? That's clearly causing violence in Iraq. There was probably no violence until these elected leaders started saying bad things about Americans. So we should definitely do as the author suggests and threaten any Iraqis who say things we don't like. That will definitely stop the violence.

  • International support -- He claims that Iran and Syria are supporting the militia groups by giving them weapons, but a bigger problem is "tacit encouragement" from other Arab states. So let the guns and bombs keep flowing in, but get those Arab leaders in line damnit!

  • U.S. resolve -- Hear we go with the typical Republican tactic of all-but-claiming treason on anybody who questions the President. The real reason for violence in Iraq is the Democrats! If you say that you think we should leave Iraq, you are causing violence in Iraq! So shut up before more people die!

technorati tags:,

Blogged with Flock

Thursday, July 27, 2006

The Ups and Downs of Floyd Landis

This year was the first year that I was really interested in the Tour de France. The exploits of Lance Armstrong were always admirable to me, but never that interesting. This year was different.

I started cycling last year. I bike three days a week, usually about 10-15 miles. This year was also the first year of the Tour of California race. The combination of cycling myself and having a major event near my home motivated me to follow the Tour of California. Not only did it come through the Bay Area, but it's two most important stages were in San Jose. This included a time trial just miles from my house. I would have loved to watch the race in person, but I have a job. I still followed it closely. That important time trial was won by Floyd Landis. It gave him a sizeable lead in the race, a lead that he never gave up.

So when the Tour de France came around, I not only followed it, I rooted for Floyd Landis. If you followed the Tour, you know what a tumultous yet glorious event it was for Landis. I could not believe it when he fell from first place to eleventh with just a couple of stages left. I was thrilled when he came back the next day and crushed everyone in the last Alpine stage. I made sure to record the last time trial and rooted him on as he clenched the yellow jersey. It was a lot of fun. It was the kind of thing that cements one as a fan of a sport. My first time following the Tour, the rider I rooted for not only won, but did it in amazing, come-from-behind fashion.

That was last week. Today I was shocked to see that Landis had failed a drug test. I've often said that I don't care if Barry Bonds or whoever uses performance enhancing drugs. Similarly I don't care if Landis (or Lance Armstrong) use them. Still, it was a really bad feeling to read that somebody I had rooted for could have his victory taken away because of a drug test. I can't imagine what it must be like for Landis.

Here's the thing though. I don't think he's guilty. The test indicated a high ratio of testosterone to epitestosterone. If an athlete is using a steroid, it is easy to beat this particular test by also injecting epitestosterone. In other words, if Landis was really cheating, he should not have been caught like this. Further, it takes a long time for testosterone enhancing drugs to be effective. Thus if Landis was taking some kind of steroid, he would have had to have taken for a long time before the failed test. Otherwise, it would have done him no good. If that was the case, then it would be crazy for him to have not failed an earlier test (he had been tested several times during the race including just two days before, as the race leader is tested after each stage.) I guess he could have been taking steroids for a long time, and just forgot to take his epitestosterone. What other "Landis was cheating" based explanation makes any sense?

So I really don't think he was cheating. If that is the case, that makes this an even worse tragedy. It also shows the many reasons why drug testing is stupid. It certainly leads to the possibility of false accusations and unfairly ruined reputations and careers. And as pointed above, it's easy for "true" cheaters to defeat the testing. Not convinced? Look at the human growth hormone scandal in baseball...

Update: Today it was reported that a mass-spec of Landis's urine revealed synthetic testosterone. Ouch. This story just gets worse and worse...