Get Up to Speed with Velocity

Trygve Isaacson is dumping some of his own Java code in favor of Apache Velocity, a terrific open source template publishing engine.

In the process, he found a solution to a thorny configuration problem that prevented his Web server from finding templates.

I wrote an introduction to Velocity for the December 2002 Linux Magazine. Using its own scripting language, Velocity Template Language, the class library prevents template creators from making the biggest mistake of JavaServer Pages -- mixing code used to present data with code to modify it, producing an unholy mess that's easy for everyone involved to screw up. A Velocity template only presents data; it may not contain Java statements or create objects.

Like Log4j, Velocity's so easy to learn Java programmers will be kicking themselves for not exploring it sooner.

The Trouble with Harry

With one week to go, there's no sign that any liberal group will mount a challenge to the selection of Harry Reid as Senate Minority Leader.

E-mailing all 45 Democrats in the Senate got me a handful of pleasant form letters. I'm thinking about calling them next, since being a cog in the machinery of republic provides comfort in dark times.

Molly Ivins panned the selection of Reid this morning:

... let's get a battler from a safe blue state who doesn't have to worry about re-election all the time. I like Harry Reid, but Nevada is not blue and he's a little charismatically challenged.

Reid sounds like a solid red-state Democrat, but anyone who thinks he'll be a liberal bulwark against the Bush juggernaut should read his offical biography, which begins with admiring quotes from Trent Lott and Orrin Hatch and a photo of Reid gladhanding President Reagan.

A lot of people think that Reid's ability to dish out a parliamentary ass-kicking is all that matters. But if you share the view of James Carville and other mopey Democrats that the party needs a stronger message, the Minority Leader should be an articulate, unequivocal, and loud voice for our views.

Internet Bites CBS Journalist

CBS News correspondent Eric Engberg comes out of retirement to lay an old-school hurting on webloggers for releasing exit poll numbers, causing John Kerry's seven-hour presidency (sniffle):

While out on the campaign trail covering candidates, my own network's political unit would not even give me exit poll information on election days because it was thought to be too tricky for a common reporter to comprehend. If you are standing in the main election night studio when your network's polling experts start discussing the significance of a particular state poll, you the reporter will hear about three words out of one hundred that you will understand. These polls occur in the realm of statistics and probability. They require PhD-style expertise to understand. ...

When you the humble reporter are writing a story based on the polls you need one of these gurus standing over your shoulder interpreting what they mean or you almost certainly will screw it up. There is a word for this kind of teamwork and expertise. It's called "journalism."

Engberg believes webloggers should be more like, well, him, judicious in the information we share.

He doesn't understand that thousands of webloggers working independently of each other could never function as gatekeepers. Exit polls, privately spread by chatty cathy reporters for years, had as much chance of staying secret in 2004 as the name of Kobe Bryant's accuser.

From their perch at West 57th, Engberg and his CBS colleagues could guard the public from news that couldn't be reported for reasons of propriety, accuracy, or editorial timidity (FDR's wheelchair, JFK's bimbo eruptions, Queen Elizabeth's control of the international drug trade).

Like Engberg, I think that webloggers should behave ethically, whether we're journalists or humans. When information must not be set free, I'd love to man the gate.

But when you combine the teeming multitude of webloggers with the instant ability of any Matt, Markos, or Glenn to reach a global audience, I can't find a gate left to guard.

Canning Comment Spam

Workbench has been under attack lately by a comment spammer linking to dozens of cheesy .info domains. The sites sell drugs like Cialis and Phentermine, offer Texas Holdem poker, and pimp a bunch of other get-rich-click schemes.

I'm writing my own software here in PHP and MySQL, so I'm trying to deal with this abuse as painlessly as possible.

For several hours at a time, a new comment spam is being posted every 1-2 minutes on the 2,300 weblog entries on this site. In a comment management tool, I added a Delete Comment and Ban IP button, which removes the message and blocks the IP address used by the spammer.

Unfortunately, the spammer has a wide range of IPs at his disposal. In the last three days, I've banned 40 different addresses in Spain, Puerto Rico, Uruguay, and other countries. The comments are coming from new IP addresses as fast as I can ban them.

Plan B: I am now counting the number of hyperlinks in posted comments with the following PHP code:

if (substr_count(strtolower($comment), "a href") > 3) {
error_log("Attempt to post four or more links from $ip_address");
header("Location: /workbench/comment/$dex");
exit;
}

Comments with more than three links are not accepted.

Jargon: Kidding on the Square

At the first press conference since he won a broad nationwide overwhelming landslide mandate, President Bush gave reporters a hard time for asking multi-part questions:

Question: Mr. President -- thank you. As you look at your second term, how much is the war in Iraq going to cost? Do you intend to send more troops, or bring troops home? And in the Middle East, more broadly, do you agree with Tony Blair that revitalizing the Middle East peace process is the single most pressing political issue facing the world?

President Bush: Now that I've got the will of the people at my back, I'm going to start enforcing the one-question rule. That was three questions. ...

Question: Thank you, Mr. President. How will you go about bringing people together? Will you seek a consensus candidate for the Supreme Court if there's an opening? Will you bring some Democrats into your Cabinet?

Bush: Again, he violated the one-question rule right off the bat. Obviously, you didn't listen to the will of the people.

I thought it was funny for the president to throw around "will of the people" like an elderly Mickey Rooney constantly reminding people he was the "number one star in the world" from 1938 to 1940.

On Air America Radio this morning, Al Franken called Bush's joke an example of kidding on the square, an old expression he has been trying to popularize that means "kidding, but also really meaning it." He wrote this in Lies and the Lying Liars Who Tell Them:

If this book does two things, I want it to get "kidding on the square" into the lexicon, and I want it to get Bush out of the White House.

So I guess we'll have to settle for making "kidding on the square" popular.

When News Breaks, He Fixes It

John Ellis criticizes the exit polls that suggested a big Kerry win on Tuesday:

The weirdest thing about Election Day 2004 was the seven or so hours, from roughly 1:30 p.m. to roughly 9 p.m. when Big Media's story-line was based upon fiction. Kerry never led Bush nationally by 4 points. He was never ever close in any Southern state save Florida (and he lost that by 5). Colorado wasn't close. Virginia wasn't close. Kerry never led Bush by double-digits in Pennsylvania. Everything that was hinted at, winked along, or implied by the deluded talking heads was, in fact, fiction.

Ellis neglects to mention the biggest blunder a TV network has ever made in a presidential election: Wrongly declaring a winner in Florida twice on election night 2000, first in favor of Gore and several hours later for Bush. As the official 537-vote margin demonstrated, the state was too close to call. (To put it in perspective, Iowa has yet to be called this year because of a 14,000-vote difference.)

When TV networks jumped the gun twice by declaring a winner, putting the legitimacy of the election forever in question, they committed one of the most egregious mistakes in media history.

The journalist most responsible for that mistake at Fox News? John Ellis. He has as much credibility on this subject as Jayson Blair on ethics.

Bang Your Senators

Here's a better list of e-mail links for Democratic senators, updated to add Obama and Salazar and remove the departing members: