Design Patterns for Modern Life

Optimal strategies for a better life


Friday, March 17, 2006

Dear Architect...

Ben Thompson writes to ask for my advice on a pressing optimisation problem:

"Whilst in Bologna on a customer project, I wish to visit the fantastic San Luca sanctuary for a splendid view of Bologna city ... I know the walk is approx 3.6 km plus a 10 minute taxi ride from my hotel on the other side of town. Given that sunrise is approx 7am, and I am not required to be back at my hotel until 9am for a pick up to go to work, is it socially acceptable for me to go for an early morning excursion to enjoy the cultural delights of the city? As I see it the only risks here are:

  1. Upsetting my customer due to unforseen tardiness (let's face it: if this were to happen they'd probly just shrug their shoulders and light another fag)

  2. I might tire myself thus rendering my capability at debugging IBM's XMS client for .NET less than optimal.


What dya reckon - worth the risk ? Can Design Patterns for Modern Life help me in this quandary ?"


Ben will be pleased to learn that this blog can, indeed, help him with his predicament.

The key to the solution lies in the following observations:

  1. Taking the excursion will require Ben to arise at an earlier time than normal

  2. He has a definite arrival target: 7am

  3. There is a deadline by which he must arrive back at his hotel: 9am

  4. He is cheap (we can assume the "pick up" is a colleague ferrying him to the client for free)


Ben wishes to optimise his costs, his exposure to the views (a picture in a book will not do) and the satisfaction of his client. I was tempted to facetiously recommend the application of the visitor pattern (ho ho) but, instead, draw his attention to the wise words of Donald Knuth: premature optimisation is the root of all evil.

That is: his mistake is to worry too much. He should ask himself how many times he has visited the tourist delights that South Hampshire has to offer (Portsmouth, Southampton, etc) and how jealous he felt when visiting colleagues told him of the excitement they felt when they saw them for the first time.

Accordingly, Ben should apply the Record Set pattern in the following manner:

  • do take the excursion; you will regret not going

  • take lots of photographs. Ensure the date and time will be etched in the corner of every image in that silly yellow font

  • pay for a cab directly to the client afterwards

  • in the time you save by not returning to the hotel, upload the photos to your laptop

  • set the collection of photos (the record set, if you like...) as your screensaver

  • ostentatiously ensure it is playing when your cigarette-smoking, espresso-drinking colleagues and clients arrive for work

  • use it as a discussion point around which you can build a deeper and longer-lasting client relationship

  • job done!

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home