Archive for July, 2003

Venice may get a reprieve?

Thursday, July 24th, 2003

According to this report Venice may finally get the protection it needs and deserves. The BBC report does have rather a peculiar photograph attached to it though — I don’t believe that anyone has ever been able to drive a car along the Grand Canal…

Palazzo Incognito

Wednesday, July 16th, 2003

John Julius Norwich points out in Venice that the Doges were scrupulous in their avoidance of any appearance of a cult of personality, in contrast with the “parade of Medicis” on the mainland. Often the only remaining legacy is the name of a Palazzo. I have no idea who this one is named for though.

Legacy code smells: double meanings

Wednesday, July 16th, 2003

I am currently working on a legacy system. It’s not very scalable, not very maintainable, and is regarded pretty much as a dragon that needs slaying.

But how did it get that way?

Its not just because its old — emacs, vi and the gnu utilities are 20+ years old but they are not ‘legacy’.

There’s a whole lot of smells that characterise legacy systems, and I’m going to try and tease them out over the next few weeks…

One smell that really hurt us is double meanings. It happens when change to some part of the system is too hard (or too scary), so rather than introducing a new field or column, you reuse an old one, wither changing its meaning or introducing an extra meaning.

You tend to see this a lot in database designs. Since its so hard to change schemas, and migrate data to a new schema, you look for a column or field that is not used or rarely used, and give it a new meaning, with a new flag.

To give a concrete example, a table in our system has a column called error_ind which takes the values “Y”, “N” and “E”. “Y” and “N” are bad enough (especially since on our system “Y” means “Yes it is OK” rather than “Yes there was an error” as I would expect), but “E” is even worse. It was an attempt to retrofit a third state onto a boolean field. Nasty.

Almost as bad as the brokenness of the design is the fact that the internal documentation of the system is now broken. error_ind is totally misleading and will almost certainly lead to developer misunderstandings as time goes on. The use of “Y” and “N” as values is also bad, since they are in such common use in databases that they are taken for granted as boolean true/false. Reusing a universal standard is just asking for trouble.

Agile practices that work against this anti-pattern are:

  • constant refactoring — if you need a new column, add it, and even more importantly remove the old one. If something’s meaning has changed change the name.
  • internal documentation — things should have meaningful names (I’ll definitely have more to say on this one - its one of my key practices).

A wall for art

Tuesday, July 15th, 2003

The walls of Venice have statues, icons, shrines built into them — no wall is too plain for art.

Venice

Tuesday, July 15th, 2003

A couple of weeks ago now, Ben and I went to Venice for the weekend. It is a special place — despite the thousands of tourists I felt priveliged to have seen the place.

John Ruskin, writing in 1853, summed it up in a way that only a Victorian could:

[Tyre’s] suceesor, like her in perfection of beauty, though less in endurance of dominion, is still left for our beholding in the final period of her decline: a ghost upon the sands of the sea, so weak—so quiet,—so bereft of all but her loveliness, that we might well doubt, as we watched her faint reflection in the mirage of the lagoon, which was the city and which the Shadow.

There is a melancholy about Venice that is hard to shake off — she is, like Ruskin says, a ghost. Everywhere you go there is a feeling of what was, of the life that once teemed in the streets, of the hope and hubris that built such a stunningly beautiful city, of the knowledge that despite our best efforts she will crumble and sink.

At the same time, she is like a signpost to what could be — to what we as humans can do if we aspire to do something beyond the mundane. Venice is a city where life became art, where no wall was too poor to be adorned with a statue.

Where cities are concerned, Venice is the other — there are no cars, only 3 bridges cross the Grand Canal, life would be impossible for a person who is wheelchair bound. It is a labyrinth — a maze for adults — seemingly uniform but in truth a mess of styles and conflicting influences — romanesque, baroque, arabesque. Somehow it works, and somehow it has survived all the horrors of the last two centuries as a reminder of what we are capable of.

Riding the Vaporetto along the Grand Canal at night, glimpsing baroque painted ceilings and crystal chandeliers in the palazzos, watching the slow waving of the reflections in the water is a sublime experience.

And sitting in St Mark’s Square at 1am, knowing that you have to catch a 7am flight back to London for work, but so entranced by the view that to leave is impossible — well suffice it to say that after 3 days in Venice, I was homesick for it on leaving. As Ruskin says of the Palazzo Ducale — it is the central building of the world.

Lion of St Mark at the Doge’s palace

Monday, July 14th, 2003

I’ve started reading history books about Venice. One of the books I was looking at talks of Venice as the first ‘corporate’ city — and although I believe the metaphor might be stretched, it is an intereesting observation that Venice sells itself through a couple of strong, iconic images. The first of these is the winged lion of St Mark - the ‘logo’ of Venice. This photo is the famous statue on a column in St Mark’s square, seen from the balcony of the Doge’s palace.

Grand canal from Accademia

Friday, July 11th, 2003


Last weekend Ben and I went to Venice. This view of the Grand Canal from Ponte dell’Accademia is facing east - just around the corner is Piazza san Marco, which must be one of the most beautiful places on earth. I have photos of course… coming in the next few days.

Venice - Accademia

Tuesday, July 8th, 2003

… and a view from the bridge.