Sunday
Aug062006

Evolutionary Symbols on Bibles!

bibles.jpgWhen I was in Waterstone's bookshop this morning I happened to notice the rather attractive covers of these Bibles.  I wonder if the publishers realise that they have decorated them with potent symbols of evolution?  Darwin himself studied humming birds, indeed the current ten pound notes issued by the Bank of England show him with a humming bird (I suppose barnacles weren't considered photogenic enough - is there a term 'vertebratist'?).

 ten-pound-note.jpg

The image on the right-hand bible appears to be a nautilus shell, and nautiluses are cephalopods, and cephalopods, as everyone should know, mean .... PZ Myers.
Tuesday
Aug012006

A New Camera

Hoverfly

I got myself a new camera at the weekend, an Olympus SP-500 UZ. I took it out on Sunday morning and this is one of the pictures I took with it. It is a distinct advance on my father's old Olympus C-1400 XL that I was using before.

Saturday
Jul222006

Sir Patrick Moore Cloned?

From the Guardian Unlimited Science page:

Podcast:  Ian Wilmut, the man who cloned Dolly the Sheep, as well as the legendary Sir Patrick Moore.

If I had written this I wouldn't have relied so heavily on a comma to decide between the two possible readings of this sentence!

Thursday
Jul132006

More Deer

A few days ago I noticed what looked like the body of a deer-sized animal just outside Ascot station, beside the line to Guildford and I feared that the deer I had occasionally seen over the past few months had been killed.  Well, I needn't have worried for, this morning, the doe was in its usual place but this time two large, healthy looking fawns.  Come to think of it, what I thought might have been a body has too much white fur, and anyhow it looked too old and well-decayed to have been killed just a week or so ago.

Saturday
Jul082006

Are Tests really Specifications?

Martin Fowler, Jeff Langr and Bob Martin seem very keen to defend the idea that tests should be regarded as specifications.  To me, this seems very strange, almost bizarre.  

Don't get me wrong, I recognize the value of automated test suites, but it never occurred to me that anyone would regard them as specifying the software they test.  This idea seems to show a fundamental misunderstanding of the relationships between specifications, programs and tests, and it blurs important distinctions.

Fowler uses the term 'Specification by Example'  but what he is really talking about is exploring the specification by generating examples.  This is a good and valid activity, but it think it is incorrect to call the generated examples the specification

The exponentiation example that Langr presents is great as a suite of tests, but as a specification it is rather a poor one.  Firstly, it is Java-specific (it would have to be rewritten to apply it to a Python program) but the concept of exponentiation is independent of any programming language.  Secondly, although Langr criticises the Sun specification for being too long, his is about the same length and doesn't even cover floating point exponents as the Sun one does.  Thirdly, his specification fails to actually define what exponentiation is (this is in spite of him criticising the Sun one for the same failing).  He gives lots examples (24 = 16, (-2)3 = -8, and so on), but these do not amount to a definition.  If you want to define exponentiation you really have to use equations, for instance: a0 = 1, an = a*an-1 and so on.  Incidentally, this enables you to define floating point exponents in terms of integer exponents quite simply by using the equivalence between between y = am/n and ym = an (for example:  y = 103.14159 is equivalent to y100000 = a 314159).

Fowler, Langr and Martin seem to be trying to use 'Tests are Specifications'  to support Test-Driven Design (TDD).  I think this is a mistake on two counts: firstly, tests are very poor specifications and, secondly, TDD does not need this support - it stands perfectly well without it. 

Calling tests 'specifications' is contrived, misleading, and devalues the concepts of specification and testing.  Why then should obviously very intelligent and experienced people want to do this?  I can only assume that it is a result of political forces within the XP/Agile movement.  Maybe their clients asked for written specs, so the Agilists looked around for the nearest thing that they actually do write, found tests, and decided to call them specifications.