The Sun Came Back

Note: This entry has been restored from old archives.

The 2006 Summer here in the UK was stunning, endless long sunny days. I was won over for certain. This Summer, however, has been abysmal! Grey, rainy, and even rather cold some days! For a touch of good luck though all three days of the past “Summer Bank Holiday” long weekend were bright and sunny, perfect walking weather. Brilliant timing since Saturday was Kat’s b’day.

It was overcast again today 🙁

Sigh

Singles Club

Note: This entry has been restored from old archives.

A friend of mine was recently asked to jot down a C++ singleton implementation in a job interview, ah the venerable singleton. I guess we’ve all used it sometime or another, possibly trying to fit it into our designs just because it is cool.

Anyway, this dude is positively allergic to anything that looks inefficient. However, since threads are still considered cool locks become necessary, and locks are slow! So a seemingly common enhancement of the singleton is the “Double-Checked Locking Pattern”. This has the dual goals of supporting threaded client code safely and making optimisation junkies happy.

Singleton* Singleton::instance() 
{
    if (pInstance == 0) 
    {
        Lock lock;
        if (pInstance == 0) 
        {
            pInstance = new Singleton;
        }
    }
    return pInstance;
}

[[copied from the paper below]]

I wouldn’t opt for this myself, but I’ve seen it and would have used it if asked for (or I saw a need for) something more efficient. My default implementation would leave out the top level if wrapper, which is the part that makes it “Double-Checked Locking”.

However! It gets horribly complicated, my friend’s interviewer took issue with this implementation. The explanation being that a compiler implementation has the right to decide to assign pInstance to the allocated memory prior to actually executing the class construction code. This was met with disbelief, and when I was told about it I had a hard time believing it too. But things really can be this bad, for an in-depth coverage of the problems with the “Double-Checked Locking Pattern” have a read of this paper (PDF) by Scott Meyers and Andrei Alexandrescu (found in this DDJ article, page 4).

What a nightmare.

It reminds me of something someone I used to work with always said about the C++ standard: “watch out for the weasel words”. More clearly, watch out for the things the standard doesn’t promise.

My friend did get the job, despite the disagreement, and it sounds like a good one. Congratulations! Todo list for first day: eat humble pie. Or maybe: debate practicality of DCLP given constraints of known compiler and platform behaviour and the possible requirement for performance over portability? 😉


On a totally random note, why do so many well-known artists have (supposedly official) MySpace pages that totally suck? Try reading this, or this. (Ah, the aural fun of opening multiple myspace pages.) Maybe their web designers just can’t handle working without 100% flash?

Supermarket Divorce

Note: This entry has been restored from old archives.

Has the spark gone out of your marriage? Ready to give in to the modern virtual inevitability of separation? Then pop down to your local Tesco supermarket and pick up the Separation & Divorce kit for only £14.99!

I wouldn’t even try to venture a guess as to what surprising product I find on offer from Tesco next.

[I came across this while trying to find out if Tesco will sell me some potting mix online, surprisingly one thing you can’t get from Tesco.com is dirt!]

Bastia, Corsica (France)

Note: This entry has been restored from old archives.

Basita has a much more relaxing and interesting feel to it than Nice, though I didn’t think much of Nice in general. Too much city, too much fashion, too smelly. Corsica I’ll do again. Prior to Nice, Provence was great with the Verdon Gorge being a particular highlight. It’s not the best region for wine if you’re into full bodied reds though, it’s really rosé country, there are a few decent reds around though (maybe more on that later). The lowlight of the trip was on the last day with the hire car… I went over what I guess was a pot-hole and managed to get two flats simultaneously! The Europecar mechanic, called out on a Bastille public holiday Saturday, was, luckily, highly amused.

In a couple of hours we board our ferry to Livorno, a four hour crossing, from Livorno we head to our hotel in Pisa (train, 15 minutes in theory). Just one night there before a very early train to Rome. A bit of a whirlwind pass through Bastia and Pisa really.

The weather is a pleasant ~30 degrees, a little humid at times, clear and sunny all the way.

Contrary to popular belief rather few people in shops/etc in France (outside of Nice) seem to speak English. But we get by OK, Yaël with her 6 years of French doing much better than me with my 3 years of not really liking French class! That said, most young people in bars and cafés do speak English well (in one case with a rather stuffy pommie accent). Ah, the eternal shame of the monolingual… maybe Kat and I can get focused on that Italian!

The bank blocked my CC yesterday, a red-flag for fraud. Joy. But I’m happy that these systems are in place. Just remember to travel with more than one card 🙂

Back to the UK on Saturday, we can spend Sunday sorting (discarding) our 1000+ photos, then back to whatever work is up to on Monday. The Lumix DMC-LX2 has been serving me well, certainly glad I got the 4GB card. Even with that we we just had to move a whole bunch of photos to a 2GB USB stick I had the foresight to bring with me. I expect Rome to be photo-heavy, Yaël with every Roman sight available.

Karlsruhe

Note: This entry has been restored from old archives.

Karlsruhe is a large town (or small city?) in southern Germany, quite close to the French border. It is a place I’ve visited several times now, always for business purposes. I’ve never really spent much time looking at it though. My previous visits have been in more wintry months where darkness falls early, this combined with working with people who’re happy to stay in the office until late rules out most sightseeing. I was in Karlsruhe again all of last week and both these conditions were reversed, so I got to check the place out a bit.

All in all I think that I really like Karlsruhe. It’s big enough to have everything you’d want but not so big as to feel like just another city. Great features include:

  • The tram (light rail) system is amazing: goes everywhere, regular, and cheap.
  • Overall openness and spacyness of the city is relaxing (no super-hi-rise city centre).
  • Excellent range of food for eating out (amazingly there are many sushi bars – 15.90€ for all-you-can eat sushi that’s actually very good? Beats the heck out of London).
  • A good bit of history around (though most of it is probably reconstructed).
  • Yet general modern design and planning make it less haphazard than truly old towns (it’s actually very young by Germany standards, at only a couple of hundred years).
  • Highly amusing modern sculptures scattered around the place.
  • Great German beer everywhere. Germany is always the best place to be stuck in hotels thanks to hotels always having good beer. The local Hoepfner beer is pretty good, most interestingly they actually do a good porter!

Time to learn German and move there? Heh, after the pain and suffering of moving to the UK? I don’t think so. Maybe in 5+ years! 🙂

I took some photos while I was there, with the new camera we bought while stuck transferring Bangkok a couple of weeks back, and have used the opportunity to give Google’s online photo stuff another spin. No doubt my interest in online photo systems is obvious, having written several entries about such (especially when it comes to mapping of photos). I’ve never been happy with Flikr or Picasa Web Albums on previous trials. It seems that the Google offering has really advanced however! Including just the sort of mapping features I’m interested in.

So I’ve bunged my photos into Picasa Web Albums and mapped them. The drag-and-drop mapping is a refreshing breeze compared to all the overtly complicated methods I’ve played with before. The most significant disability is that it is geared to work with Picasa. This would be fine if the Linux version of Picasa had the bits to interface with Picasa Web Albums but, alas, it doesn’t (yet). This leaves me only able to upload photos in lots of 5 at a time, which really sucks.

I might finally be happy to move to a nefarious online photo service. I still don’t trust them, but I really hate using Gallery. Picasa Web Albums isn’t free if you want to store more than 1GB of photos, but I’m willing to place a reasonable value on not having to maintain and worry about Gallery.

London Sunday

Note: This entry has been restored from old archives.

For the keen slave of capitalism London is rather disappointing on a Sunday morning. I fly out on a work trip at 14:30 today from the city airport so we came in to the city in the morning to do a bit of shopping. Now, because none of my clothes fit very well and our washing machine has packed it in I need some new garments. Clearly Oxford Street in London would be the place to go!

We got into the city just before 09:00. Upon tunnelling our way out of Oxford Circus station we noticed Oxford Street to be pretty dead — but it’s before 09:00 so fair enough. We popped around the corner and had an unsatisfactory type of coffee from one of the usual trashy coffee chains. At around 09:15 we headed back to Oxford Street… still dead. Look at the opening hours, open from 12:00pm (and 12:00am on several shops that clearly don’t know their AM from their PM).

Shopping on London, Oxford Street, on a Sunday morning? Stay at home. You can have a coffee, even have a few beers in the pub, but to buy items of apparel you’ll have to wait until noontime hours.

So I now sit in a nat little café on Neal Street (since Monmouth is closed on Sundays, the bastards) and drink some adequate espresso. Bonus points for insecure wireless networks.

And Back Again

Note: This entry has been restored from old archives.

Touched down at LHR today (Monday June 11th) at 19:00. Yes, that’s more than 12 hours late! Yay!

Apparently the First Officer for our Bangkok to LHR flight came down with a sudden ear infection. As a result we got to spend the night in a Novotel near Bangkok airport. This wasn’t all too bad though, it was a fairly swanky place. No Thai stamps in the passport sadly, the process was that they took away our passports at immigration and gave us numbered cards as a replacement. We picked up the passports on our return from the hotel in the morning (I should say later that morning since we got to the hotel at 02:30).

A good couple of weeks. WA was relaxing. Sydney slightly less so, since it covered friends and work as well as family — but it was great to see everyone (well, almost) again.

We probably wont be back in Oz for another 18 months (So we can sync up with summer next time, and avoid gale-force winds and pelting rain in Sydney!).

More later, as time permits. Right now I’m halfway to being a zombie.

Fly Away Home

Note: This entry has been restored from old archives.

My commitments (work, work, and some work) will finally permit me to head back to Australia for a little while. A week each in WA and Sydney — so Kat and I can spread our time evenly with our respective families. Our itinerary is:

  May 27th: LHR to PER: Arriving Mon 28th 14:10
  Jun 03rd: PER to SYD: Arriving Sun 03rd 16:00
  Jun 10th: SYD to LHR:  Leaving Sun 10th 16:40

I’m proposing a call-to-drinks on Monday the 4th of June, being a “school night” it’ll be an early one. If you can come along I’m sure it’d be great to see you, whoever you are 🙂 I don’t know where it’ll be yet, but I’m thinking The Australian up in The Rocks is a good choice (but I might make it closer to Sensory for after-work convenience — or somewhere quieter just to keep it relaxed).

But wait, there’s more. I think a more lively call-to-drinks needs to be set up for Friday the 8th as well! Again, it’d be great to see anyone there who can make it. This will probably be at the James Squire Brewhouse at Darling Harbour.

I’ll also be going to the Little Creatures place (noticing a theme?) in Freo during my WA week, but I expect that’s a little out of the way for most people I know!

There’s much to celebrate: being in Australia for one (though we missed the damn summer), catching up with everyone we haven’t seen for a year, Kat and I starting out on the route to becoming Poms (we have company-independent residency visas now), Kathlene getting a job within a month of getting a visa!, not to mention various great events in the lives of our friends “back home”.

I’ve heard from a reliable source that there might be “something happening” on the 9th as well.

Aside from these tentative plans I’ll be in Sydney for that whole week (albeit based in the far and distant land of Kellyville) and on leave for most of it. Lunches (ah, Ten Buck Alley), coffees (ah, Toby’s) and the like are all open.