Just in case you run into OutOfMemory Exceptions while requesting a large data chunk from the MySQL: the JDBC driver will load ALL (yes, ALL) rows before passing it to your fancy, agile and low-footprint routine. Tweaking the fetchSize property of a statement won't do any good either... well, not without some voodoo. So, here is how you can get the JDBC driver to get you a nice and tight StreamingResultSet:

Oh, and you clowns out there saying "this is normal, just bump up the memory settings for your JVM" - are you NUTS!? Or do you just like your applications exploding out of nowhere after being in production for some time?

Reflection and me? Big friends. With all the love and hate a good friendship should have. A few days ago it was all about hate again. I had a bunch of service classes, some of them would implement a generic interface... Let's call it IHasAdorable - so a Service-Implementation could look like this:

Now lets assume we want to browse through ALL market merchants and have a look if they have any adorable products. Let's skip the iteration process and pay attention to the probing of all market merchants in order to buy a adorable product from each of them. First attempt might be to use "is":

If you run into the same issue, disable IPv6 support in Firefox:about:config -> network.dns.disableIPv6 -> true
Apparently Firefox and Microsoft Internet Information Server do not like to play together nicely on Vista without human intervention.

This drives me crazy! Every time I debootstrap a debian or ubuntu machine the resulting root system will lack properly set up locales. dpkg-reconfigure locales & derivates won't help since the system does not know what locales it should generate - and for some reason it does not show that nice ncurses UI where you were able to pick the locales you would like to have the support for.

So, there goes another blog entry which should act as my personal notepad for future accidents like this:

Atomic RouterThis issue has been puzzling me for some time. I have this Atom based home-brew router sitting on the shelf with a 2TB drive attached to it. So yes, it does also serve as a NAS, Meda-Server etc. All the good stuff. So theoretically it should be also a good place to backup my data to – in case one of the workstation harddrives fails – been there, done that. No IBM drives for me since that incident.

So, where is the catch? Backing up private and sensitive data to that device would be almost insane, this nice piece of hardware is directly connected to the internet and thus exposed to a variety of break in attempts. What if one of these is successful? Riiiite, I would be fu***. Properly.

The solution is very obvious; encrypt your data before you move it onto the server. But how would one do that using a windows client and free software only? There are several ways to achieve that. You could choose to write a batch script, use 7zip or something to compress / password protect that data and copy it over to the other side.

Since I don’t really like batch scripting and prefer doing fancy stunts using bash, I choose cygwin, cron (running as NT service, @see /usr/share/doc/Cygwin/cron-4.1-7.README) and openssl to encrypt that data. So, here is the one-liner doing all the work:

Go crazy now! Use the week-number to create a series of backups instead of the daily snapshot, remove old backup sets etc. Once you have that script, schedule it using the cron (crontab –e) and watch your sensitive data being backed up automagically. /me likes!