Skip navigation

Monthly Archives: October 2004

For reference, this is where I got the jpeg’s for the playing cards.

WordsEye Textures: Playing-Cards

Advertisements

Here’s a good example of using the Strategy Pattern and Template Method in combination. This is known as the Bridge Pattern.

java.net: Principles, Patterns, and Practices: The Strategy, Template Method, and Bridge Patterns

I have made a concerted effort to learn a design pattern. I have applied the Strategy design pattern to one part of the patience game I have designed for the AJUML project. I have used the Strategy pattern to apply the rules of the patience game. By applying this pattern my design has instantly become more object-oriented and thus more extensible and reusable. Now I can easily add new rules without having to change code. All I have to do is create a new class implementing the Rule interface.

Well after a hard day’s work I met up with Andy at the IBM business consulting presentation. Both tonights presentation and the previous software engineering presentation impressed me, but now I’m confused about which dept of IBM to apply. Andy and I each won a cash prize for asking a worthy questions which doesn’t seem all that until you know that 80 people wrote several questions on paper and the IBM panel chose the best 3 questions. Again there was a free buffet dinner and lots of free alcohol and pens which served us warmed us up for Jumana’s birthday.

Jumana is now 21, so we celebrated by having a few drinks in Varsity then Chase.

Ant came up from Peterborough to see his beloved Norwich play Newcastle in the League Cup and to catch up of course. I don’t know how you get the dedication Ant to see every single game, may be if you miss one game they might win! (sorry) It was my first time at a decent football stadium with a good crowd chanting all the way through the game.

It was Reza’s first time at a match too, we both really enjoyed it although it was quite a chilly wind high up in the stands. Unfortunately Norwich lost although I guess it makes Ant’s life a bit easier not having to go to so many games.

The only design pattern I know thoroughly is the MVC pattern, specifically the model 2 version. Today’s presentations introduced me to some new design patterns and I wish to investigate further as I now see the benefits of such a vocabulary covering the recurring problems encountered by software developers.

There are several design patterns which are divided into 3 categories:

  • Structural Patterns
  • Adaptor
  • Bridge
  • Composite
  • Decorator
  • Facade
  • Flyweight
  • Proxy
  • Behavioral Patterns
    • Chain of Responsibility
    • Command
    • Interpreter
    • Iterator
    • Mediator
    • Memento
    • Observer
    • State
    • Strategy
    • Template Method
    • Visitor
  • Creational Patterns
    • Factory Method
    • Abstract Method
    • Builder
    • Prototype
    • Singleton

    Their big day finally arrived and everything went to plan. The church service was filled with joy and lots and lots of singing, even the best man sung ‘You’ve got a friend in me’ from Toy Story instead of the traditional wedding march organ song. Here they are walking down the ailse:

    and Paul getting confettied:

    Congratulations to both of them! They’re off for a two week honeymoon in the Gambia.

    Today was Jenny’s birthday, a mate from my course. A few of us went out to celebrate. It was the first time I had been in the Castle grounds and I was mightily impressed, especially by the cheap bar! Afterwards we went to Jimmy Allens, a bar named after the ghostly piper:

    Jimmy Allen (1733 -1810) had a chequered history. He was a very talented player of the Northumbrian Pipes, he was even official piper to the Duchess of Northumberland for two years. But he liked to drink, and gamble, and he also liked pretty women, conning them out of money to support his drinking habit. As well as this he was a horse rustler, consequently he was almost continually on the run from various authorities. He travelled as far afield as India, the Dutch East Indies and the Baltic, making money from playing his pipes with his extraordinary skill.

    The authorities caught up with him eventually, however, and he was caught in Jedburgh, Scotland, for stealing a horse in Gateshead, Co Durham. He was sentenced to death in 1803 and spent the last seven years of his life in a cell beneath Elvet Bridge, his sentence having been reduced to life inprisonment. He died a few days before a pardon came through from the Prince Regent. It is said that if you listen carefully, you may still hear his ghost playing the Northumbrian Pipes from the cell beneath the bridge.

    The above was taken from here. Here’s a few pictures: