Coding
[ joehni ] 08:14, Saturday, 19 January 2008

I've always been a big fan of Java, especially since its promise "Write once, run everywhere" comes very close - at least if you compare the situation with the C/C++ world 8 years ago (and take all the libraries into account).

However, this promise nearly killed my Christmas last year. Ever used the new fancy ScheduledThreadPoolExecutor? Nice class. Easy task handling in a multi-threaded application design (at least if you dont try to extend it, but this is another story). I've developed my application on Windows, we did extensive tests in a Linux environment and when we delivered the application to our customer's location Friday before Christmas it crashed quite instantly. Within the logger! What's that?

Continue reading "Write once run anywhere??"
[ joehni ] 14:55, Saturday, 27 January 2007

How often do you imply facts that nowhere have been stated or confirmed? Last week I found myself trapped by such a certainty that revealed to be a false assumption.

Ever asked yourself what you can expect from the values delievered by the JDK's method System.identityHashCode(Object object) ? My original believe (and I suppose I am not alone here) was that the value reflects somehow the memory address of the given object. Not that I tried to access the object in any obscure way, it was just based on the fact that there are not a lot of more things to assign an identity to an object - implying that identity has something to do with uniqueness for the object's lifetime.

Continue reading "Fooled by Java identity"