Tuesday, February 19, 2008

English and American or why formalism is better than English

Lets be clear, I'm a fan of formalism. The best pure programming language I've ever used was Eiffel, the best programming language I've ever used in a large team for delivering the best code out of average developers and minimising issues was Ada. At Uni I had to learn Z notation and formal proofs and I've even used some of that stuff in certain highly reliable systems I've worked on down the years.

Simply put I think that having a formal specification that can be measured and adhered to is good engineering practice and that it reduces the impact of muppetry and misunderstanding. So that is my cards on the table, I like formalism because its consistently worked in large and complex projects where the skills profile has been mixed and the number of companies involved has been large.

Two countries separated by a common language - George Bernard Shaw

I travel a lot so it always entertains me when people argue that formal specifications aren't as effective as "simple" English specifications. Putting apart the UML/OCL challenge this has some basic problems in that what English do you mean? "British" English? American English? Scots English? Welsh English? Irish English? Australian English?


When an Australian says that you "need to wear thongs at the beach because its hot on the sand" they mean that you should wear things like this on your feet. A Brit will think they mean something like this(link) which is more than a little different.


When a Brit talks about a "bungalow" the Americans look on with same sort of confusion that the Brit has when an American says that someone "fell on their fanny" in polite society. When Americans refer to someone as "liberal" meaning it as an insult the Brit hears it as at worst a statement that the person is a bit wet.

The problem is that language is open to huge interpretation based on locality, even within single countries there can be different meanings. Describing someone as a "Baggie" in West Bromwich means they are a loyal and reliable person, ten miles down the road it means they are criminal scum who can't be trusted.

This isn't about pronunciation (for instance to all Bartenders in America, its highly unlikely that a Brit is ordering a "bear") its about the actual semantics of specific individual words that can completely change the meaning and outcome of a sentence. One example that was used at Uni to explain what a bugger English was is the following phrase

"The pen flew across the page"

Now it makes perfect sense right? It means someone is writing quickly, but could it mean something else?

Starting with the first noun what definitions can we have?

Pen - A writing implement, a place to keep animals, a female swan

then to the last noun

Page - a piece of paper, a small boy

then the tricky middle section

"flew across" - went in the air over, went fast

So which is more logical from the original statement?

The female swan went in the air over the small boy

or

The writing implement went fast over the piece of paper

Now we know its the last one right? But legally if it came to the argument could you explain why it could never be the former? This is the issue with "plain" English contracts, they are open to interpretation and this interpretation leads to delays and errors, formal specifications help to minimise this scope and thus help to improve quality. There is no such thing as "plain" English when it can be used to create nonsense poems like "Jabberwocky" and result in lawyers arguing over the interpretation of specific words in contracts and laws.

Put it this way, if someone wandered up to a bloke in an club or bar in the UK and said "Excuse me mate, can I bum one of your fags?" they'd be fine, in certain areas of the US they'd have a life expectancy of less than 30 seconds.

Technorati Tags: ,

4 comments:

Ron said...

Steve,

Given your clear preference for Eiffel (whatever happened to good old Bertrand Meyer) and Ada, you just got to love my recent CTO blog item

Steve Jones said...

Ron, :)

Lance Walton said...

Nice. This reflects a great deal of what I was saying in an article I wrote a couple of years ago.

Lance Walton said...

OK. Don't know what's going on with that link. The article can be found at http://www.stateofflow.com/journal/18/just-semantics