Archive for October, 2002

Self Shunt Pattern

Thursday, October 31st, 2002

Darren pointed me to the self shunt pattern, which is a lightweight way to test without using full Mocks. Similar to testing messaging classes by registering the Test as a listener on te object you are testing, and then checking the messages you receive.

Untangling the Gordian Knot

Wednesday, October 30th, 2002

Currently working on a project to untangle a hairball project. Its quite tempting to cut the Gordian Knot, but we are working more slowly, following a pattern best described as encapsulate, delegate, deprecate, delete.

  1. self encapsulate fields and methods
  2. delegate to methods on the new untangled object and deprecate the old
  3. delete the old methods and fields

Anyone have any other patterns for this?

Chess Clock

Tuesday, October 29th, 2002

We have been using a chess clock to force us to drive equally. The clock is set at 10 minutes, and when it runs down we swap. It works really well for those of us who hog the keyboard :-)

BTW - don’t use the above applet on the machine you are using to develp on - it hogs CPU. I am thinking of writing my own version…

Reinventing the wheel

Friday, October 25th, 2002

Turns out a Cruisecontrol project-name patch has been in CVS since Sept 20th, (the property is projectname). Man I wish we could access CVS through the firewall - stale copies suck …

CC Patch - BuildHistoryPublisher

Thursday, October 17th, 2002

I have attached the code for a BuildHistoryPublisher, that maintains an XML log of build summary information.

This makes it easy to generate a summary page showing build history with (for example) green/red test bars for each build, without having to process all the XML files in the log directory.

I am doing some work on the JSP in relation to this, but I will submit that separately once people have had a look at this.

BuildHistoryPublisher also contains a main method that allows it to be run over a set of pre-existing log files to bootstrap the history file.

The XML generated looks like:

<buildhistory>;
<build logFileName=”log20020206120000.xml” error=”An error message”>
<testinfo tests=”5″ errors=”11″ failures=”10″ time=”1.2″ />
<info>
… a copy of the info element that CC passes to the publisher
&llt;/info>
</build>
….
</buildhistory>

Download file

CC Patch - project name

Thursday, October 17th, 2002

We have multiple instances of CC running, each on a different project. In order to show the project name on the CC websites, we need the project name to be available to the XSLT stylesheets.

The attached patch adds the project name as a property to the info element, ie:
<cruisecontrol>
<info>

<property name=”project-name” value=”myProject”/>

Download file

Wikify…

Thursday, October 17th, 2002

I like wiki. But… its too hard.

I want to be able to wikify my entire website, so that if I update my blog and mention a Wiki keyword like ChrisStevenson, it will automatically be linked to the appropriate wiki page.

And what if I want to be able to link from my wiki to my blog?

And what if we extend the idea - so that if I enter a jira id like NMO-3 that was also recognised and turned into a link?

Now one more step: what if I were able to do this on another web site, in a way similar to Annotera - annotate someone else’s web site, but share the annotations in a similar way to blog feeds, so anyone can subscribe to feeds they are interested in and have the annotations highlighted in some way (colour?, icon?).

Some requirements though:
- zero configuration (or as little as possible)
- no requirement for centralised servers (unlike annotera)
- simplicity
- discoverablility

This is a bit like the semantic web stuff, but a little more anarchic…

NMock news

Thursday, October 17th, 2002

Joe now has a jira up and running on http://jira.truemesh.com, and I have now entered the remaining User Stories … When we’ll have a chance to implement is another matter…

Dondo news

Friday, October 11th, 2002

Joe and I spent some time on stories for this on the bus back from the TW junket. Maybe we’ll have some code soon too…

technolust…

Thursday, October 10th, 2002

Now suffering serious technolust over Mike’s new Zaurus. It runs Linux. Need I say more?