Archive for January, 2009

Jan
30

How Anaemic Domain Models Cause Bad Software

Using an anaemic domain model is often considered an anti-pattern.  The reason for this is that it encourages coders to duplicate code needlessly.  This is going to be a fairly short (and fairly trivial) post explaining one of the mechanisms by which this occurs (with an example).  The mechanism can be avoided with careful planning and strict coding discipline but it is quite a lot easier to apply good encapsulation.  The difficulty with avoiding the pit falls of an anaemic domain increases exponentially as more team members work on the project.
None of this will be new for anybody with a moderate understanding of OOP, but it is interesting to see how a small number of fairly innocent steps can lead to a real mess.

(more…)

Jan
28

The Curious Case of Matthew Smith

Some of you may remember those ZX Spectrum classics Manic Miner and Jet Set Willy (if not go here and here to play them in your browser immediately because you are missing out on some important computing history!). You may not know the fascinating story of Matthew Smith, the programmer who dreamt up and programmed these games.

jsw

You only have to look at Jet Set Willy to see that this is the brainchild of an eccentric.  Willy has thrown a party and his dominating housekeeper refuses to allow him to go to sleep until he has tidied everything up.  Through out the house are such nightmarish creatures as snapping toilets and killer telephones.  Willy doesn’t live in a bungalow; he lives in a mansion of ludicrous proportions (presumably paid for from his wealth acquired in the mining business), filled with deadly traps.  The various rooms of the house have names such as “The Banyan Tree” which he can use to climb up into the upper regions of his home.  The monsters kill with a single touch and the user is forced to jump with pixel precision to avoid falling into chasms and eventually being crushed by an enormous boot (in a Monty Python like manner).

After writing the game Matthew became the computer programmer equivalent of a rock star and eventually vanished of the face of the Earth.  His whereabouts were unknown and he became somewhat of a legend.  The mystery of Matthew Smith stirred many rumours, some true, some untrue.

Then, one day out of the blue, he came back.  Here is an interview with him recently broadcast.  He is no longer the long haired bedroom coder, but he still has a wild look in his eyes.

Jan
19

Bonsai Tree

The bonsai tree in the sidebar changes every day.  It loses the leaves slowly through the week until, at the end of the week, it has none left.  As the new week begins, new leaves begin to sprout and the cycle repeats itself.  The tree graphics were done using the free graphics tool Inkscape and the graphics switching using a small piece of PHP code.  Please come back again tomorrow to see how the tree it doing.

Jan
19

Volcano Hiking

Guatemala is home to a large number of volcanos. It boasts the highest in all of Central America, Tajamulco, which reaches approximately 4200 metres above sea level. It is also home to the highly active Santiaguito (2500 metres) and the steep sided Santa Maria (3770 metres) volcanos. A few years ago I hiked up Santa Maria with some fellow students at the Spanish school where I was studying.
Quetzaltenango
Santa Maria is the dominating figure on the horizon, ever present as a ludicrous triangle blotting out part of the sky. While walking the streets of Xela (short for Quetzaltenango), it is almost impossible to find a place where the mountain cannot be seen, so dominating is it to the city dwellers. Indeed, in 1902 an eruption killed several thousand of Guatemalans living in the city.

(more…)

Jan
15

Agile Travel – Go light for maximum enjoyment

It feels good to get off the airplane and walk straight out the airport.  It gives me immense pleasure to walk past all those people waiting by the baggage collection point, and a guilty bout of schadenfreude when I see people struggling with large unwieldy suitcases.  About 2 years ago I was invited to go to a wedding in Hong Kong.  I took the opportunity to plan a trip around the wedding.  The plan was to spend some time in Hong Kong and then move on into mainland China and see how the two regions differ.  To add some spice to the trip I challenged myself to take a very small rucksack (one which I was using to carry documents and perhaps the occasional lunch to work with) and to see just how little I would actually need for three and a half weeks in China.

(more…)

Jan
11

Rome

Well, I’ve been posting photos from my latest holiday to Rome, but I haven’t really said all that much about the experience.  Here goes nothing….

It isn’t the first time that I have been in this city.  My parents took my brother and me to Italy and Sicily when I was younger and I found the experience nothing short of fantastic.  Coming back here years later I find that I don’t remember all that much of the actual city.  I have clear memories of the Trevi fountain and the Colosseum and the Pantheon, but of street life, save for a few culinary experiences, very little.

This I was able to rectify by visiting many cafes and restaurants and enjoying exploring the streets with my girlfriend.  The pasta was very good, the lasagna was always excellent and the pizzas divine.  “Of course”, you might say, “this food comes from Italy”, but I had heard that many people had been disappointed because the food had not met with their (very) high expectations.  For me, the food had surpassed expectations and I even had a few surprises.  The Italians, it seems, also know how to do a good beer.  I tried a type of beer that I never even knew existed: birra rossa.Birra Rossa

One other thing worth mentioning is that I did not see a single Starbucks in Rome.  Coffee seems to be taken very seriously in Italy and the American coffee culture does not seem work in this country.  Does anybody have any theories?

Whenever I visit a place, no matter where, I always imagine what it would be like to live there.  Before coming to Rome, I had done some small research into life in Rome so that I could better understand the lifestyle.  I had read and thoroughly enjoyed the following article entitled “When in Rome, plan to go home”.  Although I was not in the city long enough to verify any of the claims, I feel that I am too acclimatised to Germany, where everything more or less just works to move to a country which is described as “unbridled anarchy”.

Trevi FountainOne more panorama. This one didn’t come out so well as I had hoped, but it isn’t too bad.  I hope that you have enjoyed my photos and my posts.  Take care.


Jan
11

Colosseum Panorama

The Colosseum

Jan
11

Piazza de Spagna

I spent the days following new year in Rome.  Here is a panorama of Piazza de Spagna that I made using Hugin (a piece of free software for Linux and Windows).

Piazza de Spagna

There are some areas where I have no image, and the occasional person without legs, or a missing back of the head.  These just add to the charm of the picture in my opinion 🙂

Actually, doing this panorama gave me an idea.  It can be really annoying when you are visiting somewhere where there are some tourists and it is really hard to get a good picture without anybody in the frame.  It would be really nice to simply be able to take 2 photos when the tourists are in different positions and have some software automatically remove them from the scene (replacing them with the background from the alternate photo and vice versa).  This would probably not work very well in a scene as crowded as this one however.

Jan
1

Video mp3 player as educational tool

Instead of listening to music or watching episodes of your favorite TV show on your video enabled mp3 player, why not head over to MIT OpenCourseWare page and download some video lectures.  There are lots of pretty high quality videos taken from inside a lecture theater with a very wide range of subjects.  You could learn something the next time you are commuting to work.

Hopefully your screen will have a high enough resolution to read the blackboard.