At the last Hackergarten we came together and created two screencasts, both about projects in the Groovy ecosystem.
The first is about CodeNarc, a static analysis tool for Groovy similar to FindBugs or PMD for Java. The screencast can be upvoted at DZone or watched below:
The second is about GroovyServ, an application that increases the startup time of Groovy scripts. It is in German, but is easy to follow along even if you don't speak the language. You can vote for it at DZone here and watch it below:
Be sure to follow the mailing list for future Hackergarten events... it would be great to have some more people come out and join us next time.
Monday, November 29, 2010
CodeNarc and GroovyServ Screencasts
Posted by
Hamlet D'Arcy
at
12:40 PM
0
comments
Labels: groovy
Monday, November 15, 2010
Groovy CodeNarc 0.11 Unofficial Guide
Groovy CodeNarc is a static analysis tool for the Groovy language and does for Groovy what PMD and FindBugs does for Java: it analyses Groovy code for defects, mistakes, and bad practices. The new version 0.11 is a huge release for us. We’ve added over 50 new rules to the product (bringing the total to 130+ rules) and a few really great features. This is THE new look CodeNarc, and it’s ready to use today, try it out in the CodeNarc Web Console or download the package directly from the CodeNarc site. (Ant, Maven, grails, gradle, and griffon plugins all exist as well).
Posted by
Hamlet D'Arcy
at
12:04 PM
0
comments
Labels: groovy
Monday, November 8, 2010
There and Back Again - A Developer's Recursion Tale
Recursive functions are so 2009. All the cool kids are now scrambling to convert those legacy recursive functions into stack based iteration. Why would you ever need this, you ask? Maybe you’ve heard of my friend “StackOverflowError”, he likes to hang out on the JVM. Or maybe you’re a browser kinda guy and you’ve seen your alert messages say “Stack Overflow”. Or worst case (like me), you’re supporting IE6 and you finally figured out that the “Browser shows a blank screen” defect you can’t reproduce is IE’s way of overflowing (oh yes it really is). Well, stack based iteration is a way to leave your nice recursive function the way it is, yet still avoid the overflow errors. You just have to keep track of the function stack frames yourself by adding a little boilerplate around your method (and even that can be cleaned up fairly easily).
So here is the tale of taking the road now commonly traveled. Learning to program imperatively, writing some beautiful recursive functions, and then ripping it out again because of platform limitations. There and Back Again – A Developer’s Tale of Recursion...
Posted by
Hamlet D'Arcy
at
2:39 PM
0
comments
Labels: functional, groovy, recursion
Friday, November 5, 2010
Advanced Mockito: Capturing State with Answer and Captors
Hmmm… I really need to mock out java.sql.ResultSet, I know I’ll just subclass it with a hand-rolled mock. Oh-no, the default implementation without method bodies is 650 lines of code long. WTF? Did you know there are 197 public methods on the java.sql.ResultSet interface? This is an absurdly large interface, possibly the largest in the JDK (if not drop a comment, I’d love to know what the largest is). The workaround is to throw one together in Mockito (or your mock framework of choice). My implementation turned out to be 21 lines of code long. Not bad at all. To do it I creatively used ArgumentCaptors, Answer objects, and anonymous inner classes to capture state... (read on for the full article).
Posted by
Hamlet D'Arcy
at
12:25 PM
0
comments
Labels: java, unit testing
Interview with Dierk Koenig – Author of Groovy in Action
Early this week I pestered Dierk Koenig into letting me ask him a few questions about Groovy past and present and the upcoming release of Groovy in Action 2nd Edition. If you aren’t aware already, Dierk is the author of Groovy in Action, a Canoo Fellow, and a Groovy, Grails and GPars committer.
You can read the complete interview over at the Canoo blog. And if you want to be a kind bro then you can vote at DZone. Do people even say "kind bro" anymore? Anyway... happy Friday.
Posted by
Hamlet D'Arcy
at
1:56 AM
0
comments
Labels: groovy