Friday, November 11, 2005

Brain Quadrants and Thinking Styles

Have you wondered why some of the people you work with just don't seem to get things that are blindingly obvious to you?

One possible explanation is that their preferred style of thinking is diametrically opposed to yours.

The Whole Brain Business Book by Ned Herrmann suggests that there are four core thinkng styles based on four distinct parts of the brain.

You've probably read about Roger Sperry's Nobel prize winning experiments which showed that the left and right sides of the brain have distinct and complementary functions.

Herrmann takes Sperry's idea further by also distinguishing between brain functions located in the cortex and and those based in the limbic system. The cortex is a relatively new part of the brain in evolutionary terms; the limbic system evolved much earlier.

Herrmann classifies brain functions within a four part (quadrant) model depending on whether they are located on the left or right, and in the cortext or limbic system.

According to Herrmann, we have personal preferences for one or more quadrants. These preferences have profound effects on how we think, learn and interact with others.

Our preferences can be modified by practice, and the book suggests activities that you can use to develop the functions of each quadrant.

The book includes a simple guide that helps you to establish your own preferences, and explores the consequences of different thinking styles.

I found something of value in each chapter but I was most excited by Whole Brain Products and Whole Brain Training and Development.

If you're interested in how you think, learn or work with others, this book offers a fascinating and thought-provoking model for you to explore.

Saturday, September 03, 2005

A neat improvement to JUnit testing

Joe Walnes has posted a neat way to simplify and improve tests with JUnit. His technique borrows classes from JMock, but doesn't require you to use Mock Objects.

SableCC v3 and Domain Specific Languages

If you're trying to build a external DSL, you'll need to write a compiler for it. If the language is non-trivial, you will probably want to use a parser generator. One of the best is SableCC, which deserves to be better known.

Nat Pryce (of JMock and OO-Matron fame) has written an excellent introduction to SableCC version 3.

I've been using v2 of SableCC for a couple of years to compile the DSL for the SmartRec project.

At the time I started work on SmartRec, v3 of SableCC was still unstable and the documentation was minimal. I decided to stick with V2, which was recommended for production applications.

I got off to a very quick start. Sadly, as the DSL got more sophisiticated my compiler got more brittle. I've been looking for a good solution for a while. Nat's article has given me one. Thanks, Nat!

Thursday, September 01, 2005

XP version 2, Mocking and more at the Agile Academy

I forgot to this before my holidays, so its kinda late in the day - but there is a really good series of courses on in London next week.

The Agile Academy Summer School runs from Monday 5th to Friday 9th September.

Agenda

Day 1: Introduction to programming with XP version 2

Day 2: Putting XP into practice with RoboCode

Day 3: Advanced Test-First with Mock Objects

Day 4: Acceptance Testing with Fit and Fit Library

Day 5: Automation of Builds and Deployment

They may still have some places free (but at this notice you may have to bring your own sandwiches).

The presenters are leading lights in the AgileCommunity and the courses will be very hands-on. Strongly recommended.

Apologies for posting this so late!

Better ways to find and satisfy requirements.

If you're interested in better ways to build better systems, you should take a look at the courses that Tom Gilb and Kai Gilb will be teaching in London this October.

Titles include Requirement Specification (two day), Evolutionary Project Management (two day) and Agile Inspection (one day).

Tom's new book on Competitive Engineering has had glowing reviews (not just from me :-) and the courses will give you a chance to learn how to apply key techniques directly from the author.

You can find out more at the testing solutions group website.

Saxon rocks! My XSLT transformations are now 20 times faster.

I'm currently developing a tailored course for one of my major clients. I use an XSLT pipleline to convert a huge Mind Map into pdf and html student notes .

As the course takes shape, the Mind Map has been getting larger and the conversion has been taking longer. Yesterday evening the publishing task ran for four and a half minutes - too slow for an agile developer like me!

Today I switched from XALAN to Saxonica's Saxon 8. The publishing task now takes 43 seconds, of which more than half is spent outside XSLT. The XSLT processing now runs 20 times faster!

I'm opening a lot of output documents in the slowest stylesheet, which may be the problem. You may not get the same speed-up in your applications. I'll do some more timings and report them here.

Saxon is developed by Michael Kay, the author of the XSLT 2.0 Programmer's reference. Michael has also played a key role in the development of the XSLT 1.0 and 2.0 specifications. Saxon comes in two versions; I'm using the free open source variety, but there is also a commercial schema aware version.

I also use the XSLT 2.0 engine/debugger in Altova's XML Spy. It's not open-source, but there is a free home edition and you can download the Altova XSLT engine separately (also free).

Saxon was the first widely available implementation of XSLT 2.0. It's functional and fast. If you're doing heavy-duty XSLT transformation, or need an open-source XSLT 2.0 engine, I strongly recommend it.

Wednesday, August 24, 2005

Topic Maps and .Net

Take a look at An Introduction to Topic Maps on msdn. It's written by Kal Ahmed and Graham Moore of Networked Planet. It's more informative and more up-to-date than the introduction on my website :-(

Kal Ahmed has been heavily involved in TM4j, an open source implementation of the Topic Map API. Graham and he have now created a (commercial) TMCore topic map engine for .NET

I've been playing with Topic Maps for a while now. Topic Mapping has incredible potential as a technique for knowledge creation and dissemination, but uptake has been slow. Let's hope that interest from the Microsoft developer community will be the trigger for liftoff.

Tuesday, August 23, 2005

MindJet, .Net and the Mac

I'm not given to conspiracy theory, but I know that well-known companies sometimes have big secrets. Like me, you probably like to guess those secrets, and sometimes get them right.

You're about to read my latest wild guess.

First, though, I need to set the scene. For years I've used a program called MindManager to create Mind Maps on my computer. (Thanks to Rachel Davies for the latter link). Mind Manager is not the only Mind Mapping Software, but it's probably the most widely used. It's well integrated with Windows, but is currently only available on that platform.

A few days ago a message on the MindManager Yahoo Group mentioned that MindJet, the makers of MindManager, were recruiting developers with Mac experience.

I can only see two plausible explanations for this,and one of them is mindblowing.

The boring one is that MindJet are really worried about NovaMind, which is a Mind Mapping program that runs on the Mac and will soon be available for Windows. The folks at MindJet might be willing to create a second codebase for their product, but I doubt it. I don't think they are that dumb.

The second explanation is that they know something that we don't. That's not unlikely, as MindJet have a very close relationship with Microsoft.

When the Mac makes its move to Intel hardware, is it possible that we'll also see .Net for the Mac OS?

Monday, August 22, 2005

It's not XML - it's not YAML - it's SPaML!

I'm currently working on a project that requires a lot of XSLT 2.0 transformations. Since I'm doing Test Driven Development, I am relying heavily on XMLUnit. (Bless you, Tim and Jeff).

However, I've been spending more time than I want to writing XML test documents.

So I created SPaML - the Simplest Possible Markup Language. It's very concise, and allows me to specify a complex document in a short line of text.

Here's a SPaML document (quoted, as it would be in a JUnit TestCase):

"(map file=foo(branch id=0(branch id=1(text{bar}))(branch id=2)))"

The corresponding XML is about three times as long, with escaped quotes. Horrid to read, tedious to write, and very error prone. Don't you just love it when you've got bugs in your test data!

I've written a SPaML converter in Java, and will probably port it to C#.
If anyone is interested, drop me a note: romilly(at)cocking.co.uk

Friday, August 12, 2005

Competitive Engineering hits the bookshops!


Tom Gilb skyped me this morning to tell me that his latest book "Competitive Engineering" has hit the bookshops.

There's a (five star) review on Amazon.co.uk; you can view my (five star) review on Amazon.com.

New SmartArrays website

SmartArrays, Inc. have just finished a remake of their website. There's a lot of new information there, including a new interactive tutorial.

Wednesday, August 10, 2005

eXtremely enjoyable Tuesday

One of the things I'll miss most if I ever move out of London is the Extreme Tuesday Club.

It's a goup of great people who get together when they can (on Tuesdays, as you might have guessed) at the Old Bank Of England pub in Fleet Street.

If you're a regular you can be sure of meeting old friends and making new ones. If you're a first-timer you can be sure of a warm welcome. Everyone seems to share a thirst for learning and a love of sharing what they already know. The regulars include some very experienced developers.

It's a great way to find out what's going on in the Agile community. Last night Peter Brown announced XPDay5 - a two day international conference about Agile Software Development for software developers, project leaders, IT managers, testers, architects, and coaches.

I went to XPDay4 last year and loved it. This year XPDay5 will take place on Monday 28th & Tuesday 29th November, 2005 in London, U.K. Recommended!

Tuesday, August 09, 2005

Fun with XSLT - no, really!

I've been having a lot of fun with XSLT recently.


I'm currently working on a customised course for a banking client. (No, not the French one). Over the last couple of years I have been gradually refining a course publishing framework that takes a MindMap and turns it into courseware. The framework works pretty well, but I still need to create lots of graphics.

Trouble is, I hate using drawing editors.

I'd much rather just describe the picture that I want in text and then have a piece of software draw the diagrams for me. Fortunately there are several Open Source tools that can help; one of my favorites is dot (part of the GraphViz package) . Dot reads a text file that describes a directed or undirected graph in the dot language and then lays out the graph for you. It can export a variaty of formats, inclding svg which is what my framework prefers.

The dot language is pretty intuitive, but it's a bit repetitive if you are creating lots of similar diagrams. Since I hate un-necessary repetition, I decided to create a little language for some of the most common diagrams that I needed.

Problem: how should I turn my little language into a dot file? Normally I would use a compiler compiler to do this - fun, but not quite trivial. A few days ago I stumbled on an article by Michael Kay which showed how to use regular expressions and the new unparsed-text capabilities of XSLT 2.0 to turn text files into XML. It's then very easy to get XSLT to generate a new text file in dot format.

Here's a short sample input file:

data xml "XML\ndocument"
text txt "Unparsed text\ndocument"
data out "XML, HTML or text\ndocument"
program xsl "XSL\nStylesheet"
process XSLT "XSLT 2.0\nProcessor"
input from xml to XSLT
unparsed from txt to XSLT
code from xsl to XSLT
output from XSLT to out
Here's the dot language file that's generated:

digraph process{
node[shape=Mrecord]
xml[label="XML\ndocument" shape=box]
txt[label="Unparsed text\ndocument" shape=box color=brown]
out[label="XML, HTML or text\ndocument" shape=box]
xsl[label="XSL\nStylesheet" shape=invhouse]
XSLT[label="{{XSLT|ANT task}|XSLT 2.0\nProcessor}" ]
xml -> XSLT
txt -> XSLT[color=brown]
xsl -> XSLT[color=gray]
XSLT -> out
{ rank=same; txt; xsl; }
{ rank=same; xml; out; XSLT; }
}
And here's the output as a jpeg image: