Saturday, December 02, 2006

Is measurement evil?


I've tried to summarize my understanding below.

Tuesday, November 28, 2006

XPDay6 - better than ever...

XPDay6 is nearly over, and it's been great.

One of my favorite sessions was Clarke Ching's Embracing Change: An Introduction to Agile Software Development. Clarke has given similar presentations at XPDay for several years. They've all been good and they keep getting better.

Another was a goldfish bowl session Facilitated by Nat Pryce and Jonathan Clarke asking Why Is Simple So Difficult?

It's hard to define simplicity; it's much easier to define or detect complexity (and then avoid it).

Lots of good ideas in the session; I liked Joe Walnes' comment that you shouldn't do the simplest thing - you should have the simplest thing (but it may be very difficult creating that simple thing).

I introduced Roy Sykes' 3am rule. This defines what I call simple code. It's the sort of code you'd hope to find if you have been called out of bed at 3am to fix a critical defect in production code.

My favorites session today was on LiFT - a framework for literate testing. It can be used as an alternative to FIT, but it can also be used to implement readable FIT fixtures. I'm hoping to give it a spin on my current project.

I really enjoyed the pub session afterwards. (Thanks, Google). Quote of the day - to Angela Martin, as she was taking photos of us all:

"I see you're taking a picture of me while I'm sober. I hope you have a fast film."

Ah well - off to the Old Bank Of England in Fleet Street for the post-conference Extreme Tuesday with more free drinks - thanks, Kizoom!

Monday, November 20, 2006

Factory methods can improve readability in embedded DSLs

Nat Pryce has just got rid of lots of explicit object creation from the interface to GetInLine; the embedded Domain Specific Language now reads much better.

No new()s is goood news, in fact!

Wednesday, November 15, 2006

Facts and Fallacies of Software Engineering

I've just read Facts and Fallacies of Software Engineering and I love it.

My mate Bryan Dollery lent it to me after a chat in the pub about developer productivity. (Don't look so surprised. I do go the pub occasionally).

The book confirms many long-held opinions, and offers a lot of hard evidence ato support them. In particular, it spells out why a few skilled (and therefore expensive) developers can deliver business value much faster than a larger, less skilled team.

I've started to write a couple of short articles on themes raised by the book. Watch this space.

And thanks, Bryan, for an excellent read.

Tuesday, November 14, 2006

Ruby and Amazon Web Services

I've been ill at home for the last few days, but today I felt well enough to play a little. I built a really useful little command line application in Ruby. It's already saved the time it took to write it.

It expects to find an ISBN in the clipboard. It checks that the ISBN is valid, uses the Amazon Web Service interface to get book details from an ISBN, and pastes the details to the clipboard, complete with an Amazon affiliate link. (If you buy the book after clicking on the link, I get a little money).

A variant does the same thing, but copies the book details in a format ready to paste into TiddlyWiki which I use as an personal blog/wiki.

I found out how to parse XML in Ruby by reading Enterprise Integration with Ruby. (You can guess how I created that link, can't you?)

Here's the Ruby code. To use it you will have to sign up for Amazon web services (if you haven't done so) and insert your access key into the code.

Ruby rocks.

Sunday, November 05, 2006

GetInLine at SourceForge

The GetInLine file processing DSL is now hosted at SourceForge. Code is in cvs and I've released an initial version (0.0.9).

Here's a sample test case that will give you a feeling for how to use it.

Friday, November 03, 2006

Brain Quadrants updated

I'm still fascinated by Ned Herrmann's Brain Quadrant Theory.

My colleague Chris Pollard points out that my earlier blog post never listed the four core types of thinking in Herrman's model.

Here they are:
  • logician
  • organizer
  • communicator and
  • visionary.

For a good introduction, read Herrman's overview (pdf).

Monday, October 23, 2006

DSL for file processing - GetInLine

I've been playing with an embedded Domain-specific language for file processing. It grew out of a requirement from my current project, but I've already found a use for it in a couple of personal tasks.

Tha language is growing and changing fast, but here's a code snippet that may give you a feel for what it can do already:



public void testIncludingFiltersOutRecordsThatDoNotMatchACondition() throws Exception {
new Source().
fromFile("docs/sample-data/flights3.txt").
upToTheEnd().
counting(allRecords).
withoutBlankLines().
counting(nonBlankRecords).
allowing(Processing.rule().
accepting(1).
including(terminalRecordPattern).
populatingList(
terminals,
terminalFactory,
regexParser),
Processing.rule().
including(detailRecordPattern).
populatingList(
flights,
flightFactory,
commaDelimitedParser))
.read();

assertEquals(1, terminals.size());
assertEquals(4, flights.size());
assertEquals(6, allRecords.getCount());
assertEquals(5, nonBlankRecords.getCount());
checkEntry(0, "BA123", "Glasgow", "09:45");
checkEntry(2, "BM435", "Bradford", "10:40");
}


which will read this file and create objects from it:


Terminal 1

BA123,Glasgow,09:45
IB236,Barcelona,10:20
BM435,Bradford,10:40
KL326,Amsterdam (Schipol),11:00

Saturday, July 01, 2006

Callisto appears on schedule

Yesterday the Eclipse project released Callisto. Callisto is a simultaneous release of 10 related Eclipse projects, including Eclipse 3.2.

One of the projects is GMF, the Eclipse Graphical Modelling Framework. GMF is a very high-level tool for building Graphical Editors for Domain-Specific Languages (DSLs). GMF is what Martin Fowler calls a Language Workbench. I'll be reporting on my experiences with the latest release of GMF over the next few days.

I've also been following two similar projects, one from JetBrains and one from Microsoft.

JetBrains have just announced an Early Access Programme for their Meta Programming System. I've not yet started to play with it, but I will. Given the outstanding usability of IntelliJ Idea, this is likely be an outstanding product.

Steve Cook and Alan Cameron-Wills are busy building DSL tools at Microscoft. As you'd expect, they are based on VS2005, and tie in with Microsoft's Software Factory strategy. I'm much less productive when using VS2005 than I am using Eclipse or Idea, but Microsoft initiatives can't be ignored and the authors are world-class experts.

Back to Callisto. The team at Eclipse turned the Callisto release into a real cliff-hanger. The relase date had been announced well in advance, and for several days the Callisto web-page showed a ticking countdown.

Yesterday I watched the release clock tick down to zero, to be replaced by a banner reading "You're too late!". This was (fairly) quickly replaced by a banner saying Callisto was coming soon; then an additonal "no really, we promise"; then a banner saying "packing up the bits"; "distributiong to mirrors"; and finally, late yesterday evening UK time, the download was released.

Someone at Eclipse has a fine sense of the dramatic!