Groovy OJUG Talk last night

Published:
Reading time:
About 2 min

Last night at OJUG (Omaha Java Users Group), Scott Hickey gave an awesome talk over Groovy. I wish I had a link to his website, but I didn’t see one. He is the lead on the groovy Eclipse plug-in, and is currently finishing an article for the IBM DeveloperWorks Practically Groovy series covering groovy and spring. He’s been writing production groovy code for a few years on a mission critical financial app.

He covered some great code examples comparing java and groovy. Things seem to be written much easier (as like most dynamically typed languages), and it’s cool that groovy runs in the same jvm as the rest of the code. From what I could tell, the syntax looks a lot like Ruby.

I liked his example showing how he did some Test First development by using a Map in his test, and later replaced with an object because of the dynamic typing.

He stressed that groovy by design uses BigDecimal behind the scenes, which is great when used in math statements. 1.1 + .1 should = 1.2, but in java it equals 1.19999999 except when using BigDecimal. He had some great examples here too.

He mentioned catching exceptions only when you want to. This was a bit scary to me, but I think in practice I might agree.

As for his Eclipse groovy plugin… They are looking for some help in finishing the code completion portion. It’s a difficult task in a dynamically typed language. I’d advise him to look at the javascript Eclipse plugins. The latest ones try to guess what object you are code completing by remembering previous methods that you have called. This works surpising well, and may be enough for them to use IMHO…

Thanks to Scott for a great talk, and to Matt for pulling it all together…