Category: Groovy
-
Groovier Box Scores
I made a couple more fixes to my box scores script to make it a bit groovier. First is a trivial one, but it’s much more in the Groovy idiom than in Java. I replaced def cal = Calendar.getInstance() with def cal = Calendar.instance Groovy automatically uses the getter if you access a property of…
-
Groovy Box Scores (minor correction)
I noticed running the Groovy code I posted the other day that I accidentally reversed home and away. It’s not critical, because I still got the URL right, but it’s better to be right. The fix was just to switch the groups: away = m.group(1) home = m.group(2) and then to update the ${away} and…
-
Groovy Box Scores
Long ago I decided the best thing about Ruby on Rails was Ruby. Ruby is a great language, with a friendly community and lots of samples to learn from. Still, it’s quite a radical change from Java, which is the language where I am most comfortable. That brought me to Grails, on a journey I’ve…
-
Moving from Groovy to Grails
When I first heard about Ruby on Rails late in 2005, I got very excited about it and was eager to learn more. Over the Xmas/New-Years break I purchased both the so-called “pick-axe” book (Programming Ruby, by Dave Thomas) and the Agile Web Developer’s Guide to Rails (by Dave Thomas and David Heinemeier Hansson). I…
-
Groovyness with Excel and XML
Today in class one of the students mentioned that they need to read data from an Excel spreadsheet supplied by one of their clients and transform the data into XML adhering to their own schema. I’ve thought about similar problems for some time and looked at the various Java APIs for accessing Excel. I spent…