Quick fix for “java.sql.SQLException: Value ‘0000-00-00’ can not be represented as java.sql.Timestamp”

If you ever run across this while fighting with Hibernate, one quick fix is to instruct JDBC to turn the bad date values into NULLs, eg:


Your mileage side-effects may vary.

More excellent Java + J2EE tips (and lots of other stuff in Czech) here.

Diff’ing files over the network

This is a godsend. Wish I had thought about doing this before.

$ diff source/worksforme.php <(ssh -n me@liveserver cat /home/me/source/worksforme.php)

You can also compare files on two remote hosts.

$ diff <(ssh -n me@testserver cat /home/me/source/worksforme.php) <(ssh -n me@clientserver cat /home/me/source/worksforme.php)

Remote access to a Mac from a Windows (Vista) box

If you find that you need to access a Mac from a Windows box, probably you’ll find yourself surfing the specs of a variety of Win32 X-Windows clients. Here are some that I tried:

Cygwin also has an X client, but I didn’t muck around with that.

RealVNC is (I think) the original. I’m guessing that the others are forks of Real, and that either Echo is a fork of Ultra or Ultra a fork of Echo. Tight seems to be a fork of an earlier, simpler version of RealVNC. And, according to their website, is “fully compatible with the standard RFB protocol used in VNC.”

It’s not surprising then that, out of the box, TightVNC is the only client I could get to connect to a Mac from my Vista machine at home. Tight’s refresh/rendering is plenty slow, but gets the job done.

Larry King and UFOs

The other day I stumbled across this ridiculous news article about an “Octopus UFO” attacking windmills:

Yeah, the Don Quixote of UFOs I suppose.

Googling around, to my surprise I discovered a Larry King interview from last year discussing UFOs and malfunctioning missiles:

Woah. On Larry King?

Searching further it seems that King has been doing interviews like this for years: Larry King and UFOs.

Rather convincing.

This is Epoch

Literally. I was just alerted to this site here:


As you can see, in less than five days the Epoch time will reach 1234567890.  Ephoch time is, of course, POSIX time, a popular time-keeping method for Unix which is measured in the number of seconds that have passed since the POSIX clock started virtually ticking at midnight on January 1, 1970 (not including leap seconds).

I hereby call on all geeks everywhere to begin immediate global Epoch time party mobilization.   We’re gonna party like it’s 915148800!!

Or, well technically we’re going to party like it’s 915148800 + 319419090 plus or minus some leap seconds.  Which happens to also be this coming Friday the thirteenth.  Which might be unlucky except that it falls before Valentine’s day in the year of the Bull, so…

Er.. Nevermind, just get some booze and spread the word.