Sunday, June 3, 2007

A language for test

Writing tests is hard
=====================


Writing unit tests is hard. Often harder than writing the application. Our current choice of languages does not help much. General purpose programming languages were designed to solve application development problems not necessarily help us test the application under development. Virtual machines such as Sun's JVM and Microsoft's .NET runtime provide basic support by exposing the code meta-model so that test frameworks can be developed. To my knowledge 'test frameworks' have not been made high priority aspects of current language design.

Initiatives like [Behaviour-Driven Development](http://behaviour-driven.org) (BDD) add new dimensions to verifying the behaviour of an application. BDD uses a constrained analysis language to define the intended behaviour for the domain model. This behaviour statement is then used to generate executable code that it then run against the application.

BDD is an important step but is by its nature a confined to particular types of application (those with a domain model).

So what could a test language look like?
----------------------------------------

test-case: test case name
given ::=
BankAccount (Balance => 12.50, OverDraftLimit => 100)
when

verify that ::=
BankAccount

Monday, May 28, 2007

GPS Units and the Mac

Just over a year ago I switched to one of the nice new MacBook Pro's with Intel chips in them. This was a hard decision. I had been a Software Developer on the Windows platform for just over 20 years and felt pretty tied to the platform. But life moves on and I had the good fortune to be working on a Java project and hoped to do more with Ruby so a Mac made sense. I also wanted to immerse myself into a different OS and the Mac seemed ideal.



I still had some reliance on Windows based software so made sure that I got hold of a copy of Paralells but have needed it less and less. One bone of contention though was the lack of support for GPS software. Initially the USB drivers just did not work in the virtual machines so I had to rely on PCs here and there to transfer my walk information.



I was delighted to read that Garmin have stated work on supporting Macs! Oh Happy day.

String Template for code generation

I have been a fan of the ANTLR parser generator by Terrance Parr for some years and used it in some of the tools I have developed to make life a little easier.
Recently on a project I was looking at the output stage of a Java code generator for FitNesse fixtures and thought to compare the way the code was being produced (inline strings and print statements) to ANTLR and discovered that version 3 of ANTLR uses the StringTemplate library. Further digging revealed a really cool library for text file generation based on a domain model.
Really cool

Monday, May 14, 2007

FreeMind Retrospectives

I was turned on to FreeMind by Dan North and I have to say it has been some time since I have been so impressed with a piece of software (commercial or open source). It just works in an intuitive and immediate way. Once installed I was happily brainstorming away on ideas that have been sitting in my mental todo list for quite a while.
On my current project the team is not co-located and this causes problems with team retrospectives. Working on a whiteboard does sort of work as long as the contents is regularly read out to everyone. Web cams might be an option but even over a fast link it is difficult to get sufficient quality for text to be readable. I have strongly resisted using a software tool and desktop sharing during retrospectives because I feel a lot is lost in the process of capturing the teams thoughts.
But I think FreeMind is different - speed of entry is key to capturing information quickly and FreeMind seems to have the right keystrokes for the right commands (Mac and Windows versions). Ok it helps if you are a keyboard junkie rather than a cat chasing mice! Spreadsheets and Word processors would allow similar capture speeds but then you are left with lists and headings and to be honest the results are fairly boring and require time to clean up and format into anything presentable.
Mind Maps are different. They more closely match the organic data collection process of a retrospective. The HTML export option should help those of us using Wikis to manage project documentation.

First retrospective

For the first retrospective we used NetMeeting to share a single desktop to the remote teams. One person was designated as the scribe - initially a new team member of the team but someone outside the team would have been better.
The results were impressive. I was able to keep up with the conversation, summarise the discussion and contribute occasionally. The cool part was when it came to adding actions to the items. The actions naturally entered as child nodes on the mind map to the issue and could be flagged with a simple icon.
The really cool part was after a quick export to .jpg file and an upload the results of the retrospective were on the project wiki for all to see.

Tools support but do not make a retrospective

Although I have dwelled a lot on how FreeMind has helped run retrospectives for distributed teams it is important not to let the tool drive the process. For co-located teams I am still a big fan of index cards for rapid collection of raw opinion.

MSDE Setup

Old Entry

I have been setting up MSDE a few times recently (same server) to operate as a remote database server. Out of the box the MSDE engine installs for Windows security and no network access. I also needed to use SQL security mode because I could not obtain a trusted connection to the server.
The setup parameters I used are noted here so I don't forget them and incase they are useful to someone else trying to do the same thing.
setup DISABLENETWORKPROTOCOLS=0 SAPWD=some.strong.password SECURITYMODE=SQL

Monday, April 2, 2007

Software Projects as Rock Climbing


This post http://www.codinghorror.com/blog/archives/000830.html on CodingHorror struck a chord with me. I had always thought that my favourite sport was similar to writing software but this really makes the point well.

Thursday, March 1, 2007

Simple Cruise Control Block Diagram

I realized today that I had not seen a simple block diagram of a typical continuous integration system and how it interacts so I thought I would put one together.