act:ualise | technology

agile software development, software quality, scaling, testing and other tech

June 9, 2011
by j pimmel
0 comments

Joining in the global agile conversation

It took me a while to understand why I would want to use twitter lists and now I am finally starting to see the benefits. For the last few months I’ve spent a few minutes each day exploring twitter people who are actively participating in the global discourse on Agile, Lean, Scrum, Kanban, XP typically in relation to IT. I’ve come across lots of interesting reads and the resulting list I’ve pulled together is 350+ people and growing in fits and spurts, depending on when I find spots of time.

The great thing, for me, about managing a list like this is:

  • It’s opt-in – my main twitter stream isn’t nearly as noisy or hard to follow
  • Conversely, it’s contextual: i see the broad thread of the global conversation and nothing else
  • It’s more dynamic than Top 100/200 lists
  • I get daily emails from it’s corresponding paper.li which summarizes all the linked articles from the list, even if i can’t spend time following the tweet stream
  • Anyone else can also follow the list

The criteria applied to adding to the list is farily loose, but in general terms something like:

  • More than 100 followers
  • Last 10 tweets refer to #agile, #lean, #scrum , #kanban or #xp, or..
  • Last 10 tweets shows active participation with someone else in the subject

Feel free to check it out and/or subscribe or else suggest people to add to the list!

May 17, 2011
by j pimmel
0 comments

Xubuntu 11.04: Rolling back to Xfce

Since Ubuntu released version 11.04 (Natty Narwhal), there’ve been some complaints about it. It’s buggy and slow, perhaps it’s lost it’s way, and based on my own personal experience upgrading from 10.04 it is indeed a drag… I’ve always used Xubuntu, so my upgrade didn’t seem to switch me over to the gleaming new Unity desktop however I found myself suffering some pretty frustrating performance degradation – none of which seemed to burn the CPU or cause excessive IO wait. Puzzling.

I attempted to improve matters with some CompizConfig settings changes, although my 4 core desktop still felt like a Pentium 2. Then I found the following article on reverting from Unity Desktop to the Classic.

As an XUbuntu user the ‘Login Settings’ screen referred to in the last article isn’t hidden away much at all, but resides under System -> Login Screen. From there just pick ‘Xfce Session’ instead of ‘XUbuntu Session’.

Now it would seem I have my speedy old machine back.

July 23, 2009
by j pimmel
5 Comments

JSON Webtests with Grails

I recently figured out how to use WebTest for functional testing of Grails controller actions that render JSON. That said, I’m not convinced it’s the best way – I’m fairly sure the gFunc plugin would do it nicely, though I ran into problems with it clean compiling the whole app on every run.

Custom steps

It’s been possible to add custom steps to Webtests for some time. Assuming you have v0.6 of the plugin (or you use Grails 1.1), then this writeup provides some useful background and also a ‘Hello, World’ type example.

In an ideal world

On the surface it seems that we could therefore have a jsonVerify step which is quite simply:

class JsonVerifyStep extends Step {

    String expected

    void doExecute() {
        def jsonServed = context.currentResponse.inputStream as JSON
        def jsonExpected = expected as JSON
        assert jsonExpected, jsonServed
    }

}

Annoyingly, it’s not this easy.

Grails, Webtest and (sigh) Classpath’s

Webtest is spawned by a forked Ant process (see ${pluginDir}/webtest-n.n/scripts/call-webtest.xml) which means you get a  limited classpath due to JAR version conflicts.

So it’s not possible to add the Grails classpath (or even just $GRAILS_HOME/dist/grails-web-n.n.jar) which contains all the handy JSON library code that we’re so accustomed to when rendering JSON responses.

Solution (has some camembert)

My “solution” was to add two jars (json-lib & ezmorph) to your Grails lib and also tweak the call-webtest.xml file with the following change:

<fileset dir="${grailsHome}/lib" includes="commons-cli*.jar,commons-beanutils*.jar"/>

With the resulting custom step you can test your JSON response

import com.canoo.webtest.steps.Step
import net.sf.json.JSON
import net.sf.json.groovy.GJson
import org.apache.commons.io.IOUtils
import org.apache.log4j.Logger
import net.sf.json.test.JSONAssert

class JsonVerifyStep extends Step {
    private static Logger log = Logger.getLogger(JsonVerifyStep)

    String expected

    void doExecute() {
        GJson.enhanceClasses() // neccessary for the net.sf.JSON stuff in Groovy
        def jsonServed = IOUtils.toString(context.currentResponse.inputStream) as JSON // wants a string
        def jsonExpected = expected as JSON
        JSONAssert.assertEquals jsonExpected, jsonServed
    }
}

And you would implement your webtest as follows:

    def testSomeJSONResponse() {
        webtest('Example JSON webtest') {
            invoke('/controller/actionJSON')
            jsonVerify(expected: '{"totalRecords":2,"results":[{"id":16,"year":2009,"name":"ZZ Top"},{"id":2,"year":2009,"name":"Aerosmith"}')
        }

    }

July 7, 2009
by j pimmel
0 comments

No Fluff, Just Stuff 2009. Seattle WA

The No Fluff, Just Stuff 2009 Tour rolls into Seattle on September 18-20th. The line-up has some interesting speakers:

  • Brian Goetz, Author of Java Concurrency in Practice
  • Brian Sletten, REST Expert
  • David Geary, Author of Graphic Java and co-author of Core JSF
  • Howard Lewis Ship, Creator of Tapestry and HiveMind
  • Ken Sipe, Technology Director, Perficient, Inc. (PRFT)
  • Mark Richards, SOA and Enterprise Architect, Author of Java Message Service
  • Matthew McCullough, Open Source Application Architect at Ambient Ideas
  • Nathaniel Schutta, Author, speaker, software engineer focused on user interface design.
  • Scott Davis, Author of “Groovy Recipes” & TDD Expert
  • Ted Neward, Enterprise, Virtual Machine and Language Wonk
  • Venkat Subramaniam, Founder of Agile Developer, Inc

Attendance is limited to 250 and no Vendors, no Sales Pitches, no Marketecture.

July 6, 2009
by j pimmel
0 comments

Google reader keyboard shortcuts

I’m a daily user of Google Reader and find it very useful for helping me manage information. Despite having used it for a year, and maybe because it’s quite well made to start with, I hadn’t stopped to ponder whether or not it had keyboard shortcuts until I accidentally pressed ‘g’ then ‘f’ in a fit of crappy typing.

So Reader users, avail yourselves of a whole host of shortcuts!

July 3, 2009
by j pimmel
7 Comments

Viewing Grails’ in memory HSQLDB

DatabaseManagerGrails comes with HSQLDB as it’s in-memory db and it’s not difficult to inspect it, but there’s a simpler way than many realise and it’s built into every Grails installation, bundled in the HSQLDB jar lib.

I have found this trick is useful when inspecting DB state during integration test execution.

Just add the following line of code to somewhere in your application.

org.hsqldb.util.DatabaseManager.main()

When that line gets triggered from a running grails app you will see the prompt window above appear on your desktop.

All you need to then do is tweak the DB url (remove the . and replace with DB name) to reflect your datasource properties for the in-memory DB, in my case

jdbc:hsqldb:mem:devDB

That’s it! You should then see the Database schema browser below.

DatabaseManager_session

One important caveat – this DB tool issues a System.exit() which terminates your Grails app when you close so be sure to remove that line when you have done inspecting!

May 14, 2009
by j pimmel
0 comments

Protectionism in development: An extreme faction

BoingBoing just posted about an analysis of the breathalyzer system written by AlcoTest where the following *stunning* failures were revealed in a report assessing the fitness of the code for a court case:

  • Readings are Not Averaged Correctly: When the software takes a series of readings, it first averages the first two readings. Then, it averages the third reading with theaverage just computed. Then the fourth reading is averaged with the new average, and so on. There is no comment or note detailing a reason for this calculation, which would cause the first reading to have more weight than successive readings. Nonetheless, the comments say that the values should be averaged, and they are not.
  • Catastrophic Error Detection Is Disabled: An interrupt that detects that the microprocessor is trying to execute an illegal instruction is disabled, meaning that the Alcotest software could appear to run correctly while executing wild branches or invalid code for a period of time. Other interrupts ignored are the Computer Operating Property (a watchdog timer), and the Software Interrupt.
  • Code Does Not Detect Data Variations.
  • Error Detection Logic: The software design detects measurement errors, but ignores these errors unless they occur a consecutive total number of times. For example, in the airflow measuring logic, if a flow measurement is above the prescribed maximum value, it is called an error, but this error must occur 32 consecutive times for the error to be handled and displayed. This means that the error could occur 31 times, then appear within range once, then appear 31 times, etc., and never be reported. The software uses different criteria values (e.g. 10 instead of 32) for the measurements of the various Alcotest components, but the error detection logic is the same as described.
  • Defects In Three Out Of Five Lines Of Code: A universal tool in the open-source community, called Lint, was used to analyze the source code written in C. This program uncovers a range of problems from minor to serious problems that can halt or cripple the program operation. This Lint program has been used for many years. It uncovered that there are 3 error lines for every 5 lines of source code in C.

Reading the full report is a damning indictment on a piece of software which has failings in so many ways, it’s hard to believe it even actually got to production. As BoingBoing pointed out the software companies who develop these kinds of systems  (voting machines & breathalyzers) cry foul of ‘trade secrets’ at the mention of a review of the source.  This tactic is to software what Monsanto flexes in genetic engineering (interesting that open-source GM has been mooted).

This rare insight reminded me again why Agile methods, openness and transparency and holding oneself and one another to a high standard of quality are central to knowing you are delivering software which is fit for purpose (at the very least), and which ideally is well made, thoroughly tested and makes both the customer and the developers happy.

March 27, 2009
by j pimmel
2 Comments

Mother and Ubuntu

A fun post by our friend Ivanka who recently joined Canonical to head up the User Experience side, a role which will no doubt prove challenging but has huge potential. Those who’ve already used Ubuntu, myself included, have something of a love/hate relationship with it; likely this is because we hardcore techies are no longer their target market.

In the spirit of eating dogfood Ivanka steeled herself and installed it as her mother’s primary OS FTW!