Archive for June, 2009

How often have you done something like this? -

public Result calculate() {
long start = System.currentTimeMillis();
Result myResult = doSomethingLongAndComplex();
log.debug(“Crunching took ” + (System.currentTimeMillis() – start) + “ms.”);
return myResult;
}

It’s kind of ugly when you do it a few times and it does clutter the code. The need for defining an explicit myResult var is even more annoying. So, today, I added…


Logging in Java can be messy. Especially the dreaded isDebugEnabled. Not so in Scala.


Fresh start

16Jun09

Having spent months pondering how to migrate my old blog to here, I though to myself, is it of any value to anyone? In this day and age, does anyone really need to generate hibernate mappings from xdoclet, or sneakily introduce open source technology through the back door, because the “architecture committee” won’t have it. [...]