kids
resume
links
jbum
jblog
about
One Laptop Per Child: Give 1 Get 1
Bob's musings... (cc:world)        bob@jadn.com groovy.rss
Validating Relax NG Compact from the Groovy Console? - Saturday, 23 January 2010 Categories: all, groovy 

Validating Relax NG Compact from the Groovy Console? I just created a short gist to do that.... http://gist.github.com/284784 Enjoy!

Grails Boston - Wednesday, 13 January 2010 Categories: all, groovy 

Innocentive.com is looking for a lead Grails developer in the Boston area. Boston Grails Job It is a great place to work!

Groovy Console Tip - Wednesday, 28 October 2009 Categories: all, groovy 

I hack lots of small stuff together using the Groovy and Grails Consoles (using Groovy 1.5.x and Grails 1.0.3 - I know, I know... old versions...) A handy way to make your script so that it can be interrupted is to simply insert "Thread.sleep(0)" in any loop your doing. When you send it an interrupt the Sleep will throw a runtime and stop your script.

while(true){
    println 'getting wiki text'
    new URL('http://wiki').text
    Thread.sleep(0)
}

Giving the Grails Console some recall - Monday, 13 July 2009 Categories: all, groovy 

The Grails Console is a handy way to try and tinker with stuff. If you switch back to your editor/IDE and change a domain or controller class, the console restarts. This is good, but it drops all the tinkering that you were doing. That can mean a loosing quite a bit of work.

At a coworkers suggestion, I tried modifying the Grails Console to save the current text during a restart. This is what I did and it works. Edit $GRAILS_HOME/scripts/console.groovy and replace the existing monitorCallback with this one

       monitorCallback = {
            def text = console.inputArea.text
            println "Exiting console"
            console.exit()
            println "Console had ---\n$text\n---"
            createConsole()
            println " Restarting console"
            console.run()
            // wait for inputArea to be constructed
            Thread.sleep(500)
            console.inputArea.text = text
        }
Yea, the sleep is grotty, but without it the inputArea wasnt always constructed in time (race.) It dumps the current script to the console as a cut/paste backup if the console doesnt reload in a happy way.

Boston Grails Consultant needed - Monday, 15 June 2009 Categories: all, groovy 

A friend of mine says

We are a small company in Waltham, Massachusetts looking for a full-time Grails contractor for 3 months (Q3). Even a talented J2EE contractor could be of interest (with a passion for learning new technology), although a Grails developer would be our first priority.
Anyone looking in the Boston area?

Part time Groovy Gig in Boston Area - Thursday, 23 April 2009 Categories: all, groovy 

A buddy of mine, @cutshot, is looking for a part time (1-3 month) Groovy developer to help out with a project. Any groovy people in the Boston Area looking for some work?

IntelliJ and HumanTime - Friday, 06 February 2009 Categories: all, groovy 

Two interesting things I found today.

I use IntelliJ a lot when working on Grails and Groovy projects. Since IntelliJ doesn't have Eclipe's quick overview feature (Control-o), I do a lot of searhing when using IntelliJ. Alas the incremental search in IntelliJ, marks stuff yellow... and it doesnt clear it when you change your search. After a few searches your file is too yellow too look at. To clear all the highlighting, just hit escape twice. (thanks Ed for finding this one.)

I wanted to display how long it took to process something, but I wanted it to be readable by humans.

ie. Loading data took 1h 3m 33s
and NOT
Loading data took 28882 seconds
This little class makes that pretty easy, Date Formatting and Parsing for Humans in Java with HumanTime

Although I still wish I had a nice solution that would just do days.

println daysAgo( new Date(0) )
with output like
30 years, 2 months and 12 days ago

Make commuting (or treadmill time) fun with a groovy podcast downloader - Thursday, 13 November 2008 Categories: all, groovy 

Make commuting (or treadmill time) fun with a groovy podcast downloader

I've received quite a bit of feedback on my earlier release of my groovy podcast downloader script. I've folded in this feedback.

Take a spin at http://github.com/bherrmann7/podcast-get/tree/master/src/pget.groovy Enjoy!! Please send along feedback! bob@jadn.com

YES, THERE IS MORE!!!
To read my older drivel, CLICK HERE    Don't say I didnt warn you.
Made using jblog.sf.net