Saturday, July 30, 2005

Bill Frist is not a hero...

He's a douche.

Look, I'm strongly in favor of stem cell research. It holds a lot of promise for people with terrible illnesses, most of the embryos from IVF clinics will be destroyed one way or the other, and it's silly to restrict our basis of research on the basis of a viewpoint that's strongly in the minority (and yes, I understand morality isn't a votable concept, but in this case the issue is far from clear to most citizens and the views of the polity are the only basis for judgment).

But changing his stance on this issue doesn't make First a hero. It makes him the first official candidate for the GOP nomination in 2008. Even though he's pissed off some key Republican constituencies, as we've seen on a number of issues, it's more important to win than to be pure. By early 2007, when campaigning will begin in earnest, this issue will have lost its partisan venom for Frist, but the air of compassion and pragmatism will still linger about him, hopefully (from Frist's viewpoint) obscuring the pathetic image of Frist's pandering to right-to-lifers in the Terri Schiavo case.

After having vehemently opposed stem cell research for so long at the behest of the Bush Administration and the absolutist pro-life right wing, Frist's change in position is nothing more than blatant pandering, positioning himself for post-nomination general election politics, with what he gauges to be the smallest impact on his chances of gaining the Republican nomination. That doesn't make him courageous, it makes him a snivelling, pandering douche.

Friday, July 29, 2005

Rockstar Games sued

So the lawsuits over Grand Theft Auto: San Andreas have begun. An 85-year-old woman bought the game for her 14-year-old grandson and is now pissed to find out that the game contains graphically depicted simulated sex.

But wait, wasn't GTA:SA rated Mature? That's for... 17 years of age and older. Yet this woman bought the game for her 14-year-old grandson. This dumb ass is all up in arms about the bad stuff contained in a game that she never should have bought for her fucking grandson in the first place! These labels aren't subtle, people. If you're too fucking stupid to figure it out, you don't get to complain later.

It's only in the window between Mature and Adults Only, i.e. 17 year olds, that could conceivably have a legitimate gripe. And of course that doesn't address the fact that apparently this woman thinks it's OK for her 14-year-old grandson to play a game simulating shooting cops and stealing cars (again, not subtle: the name of the game is GRAND THEFT AUTO), but she's aghast that he might see something resembling sex (if you've seen the video of Hot Coffee or actually played it, you'll know it's not the most titillating sexual experience to come down the pipe).

Damn it, I really hate pathetically stupid people.

What version of a class or resource am I using?

I end up working with lots and lots of different Web applications, fat-client applications, and server extensions, meaning that I get various versions of various bits of code scattered all over the damned place. This becomes a real problem when you're basically learning things on the fly and modifying stuff heavily. A really good example is working with log4j. After lots of changes and extensions, I'm reasonably happy with our current configuration. However there are lots of files floating around and sometimes my apps end up getting one of these older configurations, which leads to heartache. So how can you figure out which version of a particular resource you're getting?

The code below shows how you can use the Java VM itself to tell you where items are coming from:

ClassLoader cl = Thread.currentThread().getContextClassLoader();
while(cl != null)
{ loc = cl.getResource("/");
   System.out.println("Search and destroy --> " + loc);
   cl = cl.getParent();

It's worth noting that your classes will end up using the first version found in the class loader (assuming all classes in the same process space). The other versions found, if any, will be obscured by the first version.

Thursday, July 28, 2005

I think calling guys "douche" is funny

For example, Bill Frist is a douche. I don't know why, but it strikes me as funny, in a completely pointless way. "Douche" and "douchebag" are both funny, but I think the former has a bit of an edge.

I just saw a Burger King commercial that's from the same lineage as the Subservient Chicken. Fully understanding that by saying so I become part of the viral commercial meme, this was a hilarious commercial. It was for Chicken Fries, which are, like, chicken sticks or something. And the main attraction was semi-Gwar type of band, wearing chicken masks and singing songs about nihilism outside of the shelter of your chicken bits or something. But the thing that really drove the point home was the backdrop behind the band that read, "Coq Roq." That's all I have to say about that.

Tuesday, July 26, 2005

Super annoying Struts error

So I've run into this a couple of times before and found it very frustrating. Hopefully this will help some people avoid that same frustration! Basically, you can display validation error messages in a Struts form page with this syntax:

   <html:messages id="errors" message="false">
      <bean:write name="errors"/>

Under some (previously mysterious to me) circumstances, this can give you this error message:

An unhandled exception occurred. The name of the exception is:
Cannot find bean errors in any scope
javax.servlet.jsp.JspException: Cannot find bean errors in any scope

The problem comes all the way back in your form or action class when you create the error message. Unfortunately, it's not at all related to the actual message. In fact, your bean is there! Or at least in my particular case it's there. So I do this in the action class (you can also get error messages from within the validate() method of your form class if you're subclassing the ValidatorForm class):

ActionMessages errors = new ActionMessages();

if (someBooleanErrorCondition)
              new ActionMessage("Here's your error message!");

if (!errors.isEmpty())
   saveErrors(request, errors);

Things go wrong at the point where I'm creating the new ActionMessage object. The problem is that I put the literal message in the constructor instead of a resource key from the file. Replace that line with:

           new ActionMessage("error.message.whatever");

If that was your problem, this should fix it.

Tuesday, July 19, 2005

Something wrong with page display in Internet Explorer

I use Mozilla Firefox at home and this blog looks just fine. But it is totally munged in Internet Explorer. I'm using one of the default templates from, so it's totally their fault. Yeah.

I dunno, I have some add-on stuff, trackback and hit counter, so maybe it's related to that. Or maybe the template is shite or IE is shite or this blog is shite. So many possibilities.

Anyways, I'll try to fix it later this week.

UPDATE: OK, I figured it out. I was using the <pre> tag to format my code examples in an earlier post. That makes IE barf. So now I'm using a <style> tag. The drawback with that is that now Firefox eats the spaces that align the Java code (yes, I'm using non-breaking spaces in there; that works in IE but not in Firefox).

Multiple levels of redirection

But nonetheless. Here's a post (that is, this post) that points you to another post that points you to yet another post. But I would be remiss to ignore the source, so that's why I'm doing it that way.

Pretty hilarious. I can't decide if cyclotouriste is an actual psychopath, a plain old idiot, a jokester, or some combination of the batch. I do like the fact that he uses the word "poltroon" repeatedly. It's not one you run into often nowadays.

Monday, July 18, 2005

Comparing classes in Java 1.4 compared to 1.3

Let's say you need to compare classes, checking, for example, whether a particular class is the same as this class. You might have something like this:

public class CorrectClass
  boolean isCorrectClass(Class cl)
    return cl.equals(CorrectClass.class);

This works with Java 1.3 or earlier, but gives you an error under 1.4:

Information: 1 error
Information: 0 warnings
Information: Compilation completed with 1 errors and 0 warnings
Error: line (xxx) the symbol class$org$vshivers$test$CorrectClass conflicts with a compiler-synthesized symbol in org.vshivers.test.CorrectClass

To make it work properly under 1.4, use the afore-mentioned compiler-synthesized static member:

public class CorrectClass
  boolean isCorrectClass(Class cl)
    return cl.equals(CorrectClass.class$org$vshivers$test$CorrectClass);

Annoyingly, this is changed back to the original syntax in 5.0. Well, it's really more annoying that they changed this rather basic operation in 1.4, making it incompatible with every previous and subsequent version of Java.

Convenient timing for a personality sea change?

So Karl Rove apparently learned that Joseph Wilson's wife worked for the CIA from a journalist, but, gosh dang it, he just can't remember who that journalist was:
President Bush's deputy chief of staff has told investigators that he first learned about the operative from a journalist and that he later learned her name from Novak.

Rove has said he does not recall who the journalist was who first told him that Wilson's wife worked for the CIA, or when the conversation occurred, the lawyer said.

Just slipped his dang ol' mind, man.

This from a guy who has been reported to be able to reel off nation-wide voting pattern breakdowns precinct by precinct and described by a long-time observer of the Austin political scene as "the most focused, disciplined and organized political consultant he ever met."

That's really convenient, isn't it?

UPDATE: As noted here, none of this really matters: excuses are just that, excuses. I just find this frantic backpeddling and talking-point flinging to be really funny coming from the "Responsibility Administration" and its shills.

Tuesday, July 05, 2005


So there's this article in the New York Times entitled G.O.P. Asks Conservative Allies to Cool Rhetoric Over the Court. And in this article, one guy says, "The extremism of language, if there is to be any, should be demonstrably on the other side. The hysteria and the foaming at the mouth ought to come from the left."

Oh my yes. The frantic left. Unlike the calm even-handedness of Ann Coulter, who certainly is a voice of reason. Or the talk radio hosts who are so eager to keep the national debate civil that they throw quite a ruckus whenever they're called Nazis. And never mind those Christians who just want to share their love of Christ.

Oh, also, note that Scott McClellan said, "[President Bush] said that he would hone in over the next few weeks on a handful of nominees." Yeah, that certainly sounds like something he'd say. Actually, maybe that's how we managed to hit that building full of civilians, too much honing and not enough homing.

Saturday, July 02, 2005

Bush's Court appointment strategy: The fight is the whole point

There is a lot of speculation as to Bush's strategy with the appointment of a Justice to replace Sandra Day O'Connor. For example, Brad Plumer in MoJo speculates that Bush will nominate a wing-nut, throwing the Senate into tizzies, before Bush finally withdraws the wing-nut, nominating a "compromise" nominee, who's distinguished from the first by, for example, raising a higher barrier to random killings of the poor by credit card companies. In response, Jeffrey Dubner on TAPPED riffs on a theme, but disagreeing that Bush will withdraw the nominee, forcing a showdown on the filibuster and the nuclear option. What's pretty certain is that, according to Atrios, the check is already in the mail: "all signs point to extremist."

I'm going with Dubner on this one, but I have a more expansive view on it than Dubner or, for example, Ed Kilgore at TPM Café. In Kilgore's view, this appointment is the big pay-off for the Christian right, the tasty treat at the end of a long expanse of being flogged like a mule for political points without much in the way of a sack of tasty religious oats on the way. I don't disagree with that, just as I don't disagree that Bush will nominate a wing-nut then try like hell to jam the wing-nut down SCOTUS's throat. But there's even more than that and to see this, draw back for a minute and think about Rasputin... er, I mean, Karl Rove.

Remember that the Bush administration has been built on Rove's "divide and conquer" strategy, provoking outrage through proxies--or increasingly on his own--while allowing the President to remain--relatively--above the fray. This nomination gives the administration to achieve both goals outlined by Dubner and Kilgore, as well as re-igniting the culture war mentality the GOP so successfully cultivated during the 2004 campaign. Directly put, the President and Karl Rove relish the upcoming nomination fight all on its own. Here's why.

Bush's poll numbers are in free fall. This goes both for Iraq in particular and his job performance in general. The Social Security and domestic policy pursuits on which Bush promised to expend political capital after the election have fallen flat (with, as has often been noted, his Social Security plan actually losing support the more people learn about it). The problem with these issues is that they're concrete, measurable, arguable and debatable. On this type of playing field, Bush has been a dismal failure.

But on the "values" issues, oh, the values issues. These let the administration take the moral high ground, at least as perceived by a distinct segment of the population, and beat their opponents with it mercilessly. Nuance, subtlety, and certainly respecting the position of those you may disagree with are thrown out the door. Terri Schiavo, abortion, gay marriage, you name it, it can be fought over. And there is no way to win any of these arguments. They're dogmatic arguments, they're argued on metaphysical bases, and they generate smoke and fire and heat and nothing of any consequence--other than the distraction so desperately sought by the Bush administration and so effectively exploited previously.

In this view, the more hard-core and divisive the nominee, the better. The arguments shift away from policy specifics, where most Americans don't back the administration, and back to shouting matches, where thuggish insult and bare power politics are heralded as defending America's moral heart from the decay of the obstructionist opposition. We'll see again the fight over the filibuster, the fight over right-wing moral values, the faux concern over "states' rights" (only an issue when conservative causes are threatened and something to be ignored or denigrated when desired, i.e. gay marraige, Schiavo, medical marijuana, and so on), the smearing of administration opponents or even those who aren't party-line dogmatists.

It's going to be a long, hot summer. Prepare for the ugliness of 2004 all over again.