Managing CruiseControl configuration

One of the pains of using CruiseControl is that setting up and configuring it is not very intuitive, especially when you only need to change it every six months or after a hard disk crash.
Julian Simpson shows how to keep the CC configuration file in the version control system, and use a bootstrapper to apply the configuration whenever it changes – Configuring CruiseControl the CruiseControl way.

Or, you can switch to Hudson 😉

Groovy with spice – curried closures

Groovy rocks!

I have used Groovy swing builder before to layout some basic Swing UIs, but recently I used it for the first time for some real scripting. It was a script to do some database maintenance, and I was amazed at how easy, fun and productive Groovy can be.

What surprised me most was how easy it was to refactor as I went along. I had assumed that it will be inherently more difficult to modify it without static typing and full IDE support. Not the case at all, although it was a single script, and so things might be different if it is a Groovy program spread over multiple scripts.

Incidentally, the Codehaus Groovy Closures page has the easiest to understand explanation of what curried functions are –

You can fix the values for one or more arguments to a closure instance using the curry() method from the Closure type. In fact, this action is often referred to as currying in functional programming circles, and the result is generally referred to as a Curried Closure. Curried closures are very useful for creating generic closure definitions, and then creating several curried versions of the original with differing parameters bound to them.

I had glanced over curried functions in past, and it always looked like something that I will have to sit down and write some code to fully understand. But this explanation just clicked instantly. Thanks to whoever wrote this; I am sure I will find a use for it again soon.

Intellij IDEA – Add unambiguous imports as you type

One of my favourite settings in IDEA is to turn on the ‘Add unambiguous imports on the fly’ option.
With this on, if you type a class name, and that class is unique in the project libraries, IDEA automatically adds an import for that class. No need to stop typing to press ALT – ENTER.

So, I updated to IDEA 7 and found this wasn’t working anymore. Even more annoying, I couldn’t find this option in the settings. Turns out this setting has a new home.
In IDEA 7, it is has been moved to Settings|Code style|Imports.

Ref – EAP 7087 Release Notes