Design Patterns for Modern Life

Optimal strategies for a better life

Sunday, April 23, 2006

How to cross a busy road without stopping the traffic, building a bridge or digging a tunnel

We stood in the drizzle to watch a friend run in the London Marathon this afternoon.

We moved around but used the Embankment as our final viewing spot. After seeing our friend (and the rest of his team, who were dressed as a centipede for reasons that were never fully explained), we needed to get to a tube station.

One problem: we were on the river side of the Embankment and Temple Station was on the other side. Between us and the Tube station was a road with hundreds of runners passing by. How to cross? There was no easily reachable tunnel and no easily reachable bridge. Waterloo Bridge does not count due to my failure to bring rock-climbing gear.

Fortunately, the Marathon organisers had devised a very neat, and simple, trick that could be used in far more situations.

First, let's set the scene. The picture below shows our predicament. Imagine that I am the green circle. I am trying to cross from top to bottom (yes... I know.... that means the diagram is upside down. Try to put that problem out of your mind for now.)

Image hosting by Photobucket

What the organisers did was very clever. They slowly, but assertively, drew the security line into the middle of the road, forcing the flow of runners towards one side of the road. Those pedestrians wanting to cross the road could move into the space on the road left behind:

Image hosting by Photobucket

Then... they closed off the pedestrians' escape route by opening up a channel behind us. Thus, we were trapped on an island in the middle of the road:

Image hosting by Photobucket

Then.... they used the same security rope trick as before to move the flow of runners to the other side of the road:

Image hosting by Photobucket

Success! We're now on the other side of the road!

Tuesday, April 18, 2006

French Wines

I realised this weekend that one of the main reasons I rarely drink French Wine is because I have little idea how a French Wine region maps to a grape, or blend of grapes.

Whilst I can buy a Merlot or a Pinot Noir or a Shiraz and know what I'll be getting, I have no such intution for French Wines.

Is this something I just have to get over by developing a parallel intuition for French Wines (an investigation that would not be entirely unpleasant) or is there a mapping table somewhere? I couldn't find one with a cursory search on Google and Wikipedia...

Thursday, April 13, 2006

Design patterns for modern cooking

Putting a large dollop of wholegrain mustard in the bowl when preparing mashed potato transforms a mundane dish into a work of genius.

(I think it was my ex-flatmate, Jon, who showed me this)

Friday, April 07, 2006

The curious case of the suboptimal tube route suggestion

A few days ago, I queried why London Underground send passengers via a clearly silly route between Bank and Waterloo now that the Waterloo and City Line is suspended. Diamond Geezer has now asked a similar question. Seems I was right. Ha ha! Take that, Henry! :-)

Tuesday, March 28, 2006

I've ripped my CDs to iTunes... what do I do with the CDs?

The Londonist asks a timely question. Just what am I supposed to do with all the CDs I've ripped? Do I give them away or sell them and hope my hard disk never crashes? Do I back up my hard disk first? Do I store them?

I live in London... space costs money... My CDs would fill a decent proportion of a mini storage locker.... about £10 per month. Arghhh! I thought this whole thing was meant to save me money....

Monday, March 27, 2006

Can deliberately sending tourists in the wrong direction be good for them?

London Undergound's Waterloo and City line will close for six months on Saturday. Suddenly the fact that I'm working long term in Ipswich doesn't seem so bad.

The attentive reader will notice the bizarre route advice given in the advisory I linked to. It says:

"At Waterloo, you can take the Bakerloo or Northern lines to Embankment and then any eastbound District or Circle line to Monument. The reverse of this route can be taken for return journeys."

From a rational commuter's perspective, this is quite clearly insane; the Northern to London Bridge to get the Jubilee is clearly a quicker route. However, it is also congested. Were all Waterloo and City line passengers to move wholesale onto that route, I suspect civilisation would break down and there would be dried-fruit-fights in the catacombs (search for "Cranberry").

So, by sending some people out of their way, a greater good is achieved.

Just make sure you're not the loser who takes the longer route... go to London Bridge!!

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!