Welcome

We are an IT consultancy specialising in high quality, high value, Agile & Test Driven Software Development, based on the Gold Coast in Queensland, Australia.

We have the experience and expertise to help you eliminate the ‘pain points’ in your business by applying the latest technologies and techniques. We are an established, productive software development team available for hire.

The first step is to work with you in understanding your business and industry and the day-to-day challenges you face. So please contact us via the menu above for a no obligation chat about what Refactor can do for you.

Steve Dalton's picture

Twitter Groovy scripts from Podcamp Gold Coast

I had the pleasure of doing a basic intro to Social Media APIs session at the Gold Coast Podcamp on Saturday 20th Feb. I tried to make it as basic as possible, but did include some Groovy code that interacted with the Twitter API. Anyway here's the code for anyone that's interested, for groovyists - it's not very idiomatic Groovy code, but I wanted to keep it pretty simple and not use any external libraries.

Follow another user's friends:

Unfollow all your friends

Follow all users that mention a hashtag (can be modified to do replies or mentions)

Steve Dalton's picture

Grails log4j configuration and custom environments

If like me, you have different appenders depending on the grails environment - you might not have realised that custom environments don't work with the log4j config DSL. So code like this doesn't work:

log4j = {
     appenders {
         development {
             rollingFile name: "mylog",
                     file: 'mylog.log', layout: pattern(conversionPattern: '%d{ISO
         }
         test {
             rollingFile name: "mylog",
                     file: 'mylog.log', layout: pattern(conversionPattern: '%d{ISO
         }
         beta {
             rollingFile name: "mylog",
                     file: '/tmp/mylog-beta.log',
                     layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c
         }
         production {
            rollingFile name: "mylog",
                     file: '/tmp/mylog-beta.log',
                     layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c
         }
    }

The beta environment won't be picked up and you will get some error in your logs about it for other environments. In any case the configuration doesn't look very DRY to me. Probably better to just have the filename into a separate config param in your Config.groovy, then just refer to it from a single appender

myapp.logLocation = 'mylog.log'

environments {
    production {
        myapp.logLocation = '/tmp/mylog.log'
    }
    beta {
        myapp.logLocation = '/tmp/mylog.log'
    }
}

log4j = {
    appenders {
            rollingFile name: "mylog",
                    file: myapp.logLocation, layout: pattern(conversionPattern: '%d{ISO8601} [%t] %p %c %x - %m%n')
    }

Still not completely very DRY, wish I could do something like

environments {
     production, beta {
         somesharedconfig = 'foo'
     }

Hopefully they'll come up with some way to do this nicely in future grails releases.

Steve Dalton's picture

Groovy around the Globe - Australia & New Zealand

This article is the first in a series that will examine the Groovy/Grails/Griffon community around the world - it first appeared in the November issue of GroovyMag.

We all love the technology, and this series will focus on the people that help to make technology great – colleagues from the farthest flung corners of the globe. This first article focuses on one of the the most remote regions: Australia & New Zealand.

A far-flung land

Tucked away in a oft-forgotten corner of the Southern Pacific are the sparsely-populated countries of Australia and New Zealand. Despite the relative isolation from the rest of the development community (and each other), there's been a long history of innovation and contribution to Open Source projects from the Aussie and Kiwi developers over the years.

Australia in particular is a very urban society: 82% of the citizens live primarily in the eight state and territorial capitals. However, the population of 22 million is spread over an area the size of Europe, which makes face-to-face meetings of the tech community a pretty rare thing. Despite the long and dusty distances separating the capitals, a great sense of community and collaboration prevails. New Zealand has an even smaller population (about two million) and the development community is even more thinly dispersed; however, there is also a surprising amount of activity coming from this remote land.

Conferences

Despite the geographic challenges, in the Open Source area there are two successful annual conferences in the region: Open Source Developers Conference (OSDC), and Linux Conference Australia (LCA).

Steve Dalton's picture

Grails set-proxy and authenticated proxy servers

Quick tip.

If your company uses an authenticating NTLM proxy server and your login includes your domain name, eg:

internal\joebloggs

The \ in the username will cause some trouble for "grails set-proxy". Once set this way you will then get

Error executing script SetProxy: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Script1.groovy: 2: unexpected char: '\' @ line 2, column 66.

If you try and set it again (you'll have to remove the proxy script in your .grails directory to be able to set it again)

Simple solution - just make sure you use a \\ in the username and it will all work

internal\\joebloggs

Wasted a bit of time for me - so just wanted to share in case it helps others.

Steve Dalton's picture

IntelliJ Grails Plugin and importing existing Grails projects

Something has been really annoying me for last couple of weeks.

Whenever I import a grails project from existing sources into IntelliJ (8.1.4), even though I had installed the Grails facet correctly - the Grails project view features would not be visible (eg. easy switching between controllers and views etc). New Grails projects created in IDEA were fine - so my setup was good.

Anyway, after searching the forums and lists I could find a lot of people complaining about the IDEA Grails plugin but no solution to my problem.

I finally gave up and thought maybe I could make some sense of the Intellij .iml file. It wasn't as bad as I expected there is a line:

<module relativePaths="true" type="JAVA_MODULE" version="4">

I noticed that in the "created from scratch" version it was:

<module relativePaths="true" type="GRAILS_MODULE" version="4">

So - I changed it in my none-working projects - and Voila! it worked.

Hope this helps others and saves some time - I wasted a fair bit looking for a solution.

Steve Dalton's picture

Open Source Developers Conference - Day 1

Well it's that time of the year again, and one of the highlights of my year. Open Source Developers Conference Australia - this year just up the road in Brisbane.

The drive up from Gold Coast pretty slow. It's been a while since I drove up in peak hour. Train is much faster, but we needed the car to get the last few kms to Bardon.

The venue is right in the bush near Mt-Cootha.... nice spot. Bit far from the pubs and civilisation, but I am warming to it.

I set up an OSIA stand for the day - we didn't actually have a stand, but I put up some posters to give a bit of visibility. Gave away a lot of badges that CustomTees did for us - saw a few people wearing them or attached to their lanyards which was good. Everyone really liked my polo shirt I was wearing - so hopefully I am going to get some more made and give one to each member. Lots of people knew about OSIA, lot's didn't - a few people were very interesting in joining - and I have to live up to my promise of activity this year now! Watch this space.

The opening Keynote on Volunteers by Karen Pauley was really really interesting. I sat next to Paul O'Keeffe and had a lot to think about there in relation to Barcamp, Legion of Tech and the various groups we run. I found what she said about leaders so true - there are a lot of groups that rely on 1 person, if that person stops, then the group usually stops. We need to future-proof our groups so that they are sustainable... a lot of good things happening, but we need to keep them going.

Lee Butts's picture

Grails WebTest Plugin 1.2.0 Released

Update: latest version is now 1.2.3 containing some installer improvements and test generation bug fixes

The latest version of the Grails WebTest plugin is now available in the main repository. It is a major update to integrate better with the grails test-app hooks and is built using Grails 1.2-M2 (it is backwards compatible with 1.1+). As such there are some manual upgrade steps required (see release notes below). On the plus side, tests will now run as part of test-app and can also access domain classes and plugin code via the groovy step provided by WebTest

There are some trade-offs between using the old run-webtest script and the new test-app support which are outlined below. Hopefully subsequent releases can move all functionality over to the test-app script. Please raise any issues in JIRA against the webtest plugin component.

Lee Butts's picture

Grails Amazon S3 Plugin 0.6.5 Released

A new version of the Amazon S3 plugin is now available.

The new release contains changes to help the plugin play nicely in a clustered environment:

  • Quartz jobs are now non-volatile and durable to stop them being deleted/recreated when a node is stopped/started
  • S3Asset now contains a hostName property (and hence a new column that you will need to add to the DB) which holds the host name of the server that created the row. This allows the plugin job to only try and upload assets where the local file exists on the server that it is running on.
Lee Butts's picture

Grails Amazon S3 Plugin 0.6.3 released

The latest release of the Amazon S3 plugin for grails is now available.

Version 0.6.3.2 provides some bug fixes as well as several improvements.

  • The S3 access/secret key pair can now be set on a per-asset basis
  • The bucket name can be set on a per-asset basis. Note that it will be prefixed with the access key used in order to avoid uniqueness errors.
  • An ACL (access control list) can be specified for passing through to S3 in order to prevent public access to your assets if required
  • Unnecessary default options are no longer created in the S3Asset.options map and they are eager loaded to avoid flushing errors and extra queries
  • The plugin is now built with Grails 1.1.1 and the Quartz 0.4.1 plugin

The full documentation for the plugin can be found here.

Syndicate content