Monday, February 23, 2009

“We have involved ourselves in a colossal muddle, having blundered in the control of a delicate machine, the working of which we do not understand.”
- John Maynard Keynes

Friday, February 20, 2009

funky regular expression code

Here's some funky Java code, to change \x to \\x, for any x

resultValue = resultValue.replaceAll("\\\\", "\\\\\\\\");

Tuesday, February 17, 2009

An A-Rod Prediction

Having just read about A-Rod's steroids interview: he claims he got his steroids from his "cousin" who brought the drugs into the country from the Dominican Republic.

Here's a prediction: this will be A-Rod's biggest mistake, because the cops or feds will now want to talk to A-Rod to get to this "cousin".

Monday, February 16, 2009

Two Nuclear Subs Go Bump In the Night

http://news.bbc.co.uk/1/hi/uk/7892294.stm

This is both hilarious and terrifying.

She said it might be that the anti-sonar devices, which hide the submarines, were to blame.

"This is clearly a one-in-a-million chance when you think about how big the Atlantic is," she said. "It is actually unbelievable that something happened."

Unbelievable indeed. Seems Tom Clancy fiction is closer to the truth than I thought. "We" (ok the Brits and French) have billion dollar nuclear subs playing chicken at the bottom of the Atlantic.

What's the scariest part of this? The prospect of hundreds of sailors drowning thanks to these games? Or the prospect that these clowns have the keys to nuclear armeggedon?

Saturday, February 14, 2009

Battier Story

Here's an interesting read about Shane Battier.

A part of me wants to believe this story: what could be better? Numbers. Battier. A Grand Theory of Everything.

But as much as I love Battier and Bill James is fun, I can't buy it. This is an article written by a geek and targeted at geeks, having found Battier and Morey willing to endorse this particular theory of geekness. Every slow uncoordinated math major wants to believe that the game is amenable to statistical analysis. But this goes overboard. Sure, you want to force Kobe to shoot a 12-footer instead of a 6-footer. But I don't believe you need extensive analysis to decide this.

I don't believe Battier is a better defensive or team player than Dennis Rodman, whom no one ever accused of being a numerical savant I think both players understand at a gut level the fundamentals of good defense and team basketball, and whether you choose to explain the intuition based on probability theory or untreated mania is up to you. OTOH, I don't know Rodman, so if he spends his evenings poring over stats, I'll rethink my position.

Also .. from the article: "The open corner 3-point shot is the most efficient shot in the game". Let's assume an open layup gives an expected value 2 points. For the 3 point shot to be better, they have to hit more than 66%. I don't believe that, so I call bullshit on this.

Friday, February 13, 2009

Observations on the Stimulus Bill

I was pleasantly surprised that the stimulus bill came out of conference committee better than it went in, in two respects:
  1. The "flip your house to your brother" tax credit was nuked.
  2. Most science funding that had been cut was restored.
So, should I now be optimistic that congress works?

How To Fix the NBA Game

The NBA game is boring. Part of the problem is that you need only watch the last two minutes of the game, and these two minutes can take a half hour thanks to fouls and timeouts.

Here's my profound proposal to fix it:

Eliminate the game clock. First team to 100 wins.

The benefits should be obvious. Like baseball, "it ain't over till its over". Also, every game would have a game-winning shot. Also, I think the new game would put a greater premium on defense.

David Stern, are you listening?

Thursday, February 12, 2009

Javadoc of the day

/**
* Examines the argument type and its fields and perform some documented
* operation. No specific operations are required.
*
* @param any an argument.
* @return a compiler-specific value, or null if no compiler
* is available.
* @exception NullPointerException if any is
* null.
*/
public static native Object command(Object any);

Comments I Don't Want to Hear About Juicers

I've heard each of these on the radio over the past week:
  1. He's been tested since 2004, so that's a good indication that he's been clean since then.
  2. Kudos to him for "coming clean" (coincidentally immediately after he was caught)
  3. He admitted to doping from 2001-2004, so when considering him for the HoF, we should just discount his homers in that period, since the other homers are legit.
  4. He's got an unbelievable work ethic.
  5. Steroids can't help in finesse sports like basketball.
  6. Performance-enhancing drugs only help with fast-twitch muscles.
  7. He only used drugs to recover from injury, so we forgive him.
  8. I'm glad MLB is starting to take this problem seriously (says Obama).
And a prediction:
The Yankee fan will completely embrace A-Rod as soon as he has two good weeks at the plate.