Words Software Fun Stuff About me

RSS feed for my blog
Atom feed for my blog
CDF feed for my blog

Wednesday, June 30, 2004

Teaching a cat old tricks 

A few folks have asked me what I think of Tiger, the next version of MacOS X that is due to ship in the first half of next year...

Steve Jobs made a big fuss of some of the new features such as Spotlight, which provides a way to instantly find things all over your file system. This one is no surprise, as Microsoft has touted much the same thing under the "WinFS" moniker for Longhorn. While Jobs joked about how they have this feature at least a year (probably more like 2 years) before Longhorn ships, this whole thing bugged me. Why? Perhaps because BeOS was doin the same thing way back in 1997, when they built BFS (the BeOS File System) where the file system was an indexed database that supported rapid searching based on metadata (filename, document keywords and so on).

Last year I interviewed with the WinFS team, and to bone up on the whole area I read Dominic Giampaolo's book on how he designed BFS when he was at Be Inc. (its a really interesting book but now sadly out of print... If you're interested Dominic made it available in PDF form). It was of course no surprise that Apple beat Microsoft out, as Giampaolo now works in Apple's file system group and helped them to implement the indexing feature in Panther's file system, which is no doubt a key enabler for Spotlight.

I couldn't get excited about iChat AV. I actually gave my iSight away... Perhaps if I was using my Mac at work I might use it. Ah well.

Most of the other stuff seemed like just logical extensions of things they already had. I was especially annoyed by Dashboard, as it is just a total rip of Konfabulator.

The one exciting thing was that they finally got seamless (so they say) 64-bit app support in there. Once Tiger is here I can finally justify to myself the cost and trouble of upgrading to a G5, and dream of the day when Photoshop goes 64-bit (its the one app I use a lot that eats memory like crazy)

On a related note, Dell just announced the new Precision 470 and Precision 670 workstations with the new Xeons featuring Intel's Extended Memory 64 Technology... basically adding the AMD64 extensions to their IA32 core. Now I have a reason to install Whidbey (.NET V2) and start playing with 64-bit stuff (Itanium never excited me very much)

# posted 6/30/2004 07:40:17 PM | 0 comments

Monday, June 21, 2004

Keep on truckin' 

So when I was a kid my big dream was to be a truck driver. I grew up in North Wales, and there wasn't a whole lot to do there, but nearby there was a major trunk road (an interstate of sorts) where trucks would be coming heading from over to the port at Holyhead to go to Ireland. My friends and I used to go sit by the side of the road and get the truckers to blow their air horns.

I'm not sure why I wanted to be a truck driver. This was around the time when you had movies like Convoy and Smokey and the Bandit, so I guess there was a kind of romance to it. I was also into CB radio which was illegal in the UK at the time, which made the whole thing totally cool. The British government took all the fun out of that by legalizing it.

The funny thing was that the trucks I saw every day were UK trucks, not the Kenworths, Peterbilts and Macks that I loved so much. I really wanted a red Kenworth rig and had posters and all sorts on my bedroom wall.

While my missus is in Japan, I considered getting a license to drive a semi. Its funny - my job is as white collar as they come - designing software for one of the worlds busiest web sites. But I think the key lies there as to why I've always wanted to be a truck driver - I think its a way to escape. Growing up in North Wales all I wanted to do was get out, so when I was 16 and had the chance to go live with my father and get out, I jumped at the chance.

Sometime I wake up and the whole rat race just seems like a descending ever-tightening spiral, and the open road never looked more inviting.


# posted 6/21/2004 09:17:53 AM | 0 comments

Sunday, June 20, 2004

Guten Tag 

So I've been wanting to get a new watch... I currently have a Seiko titanium watch that is really light, but also grey and boring.

Yesterday I was doing some gardening at my son's Montessori school (the garden is nearly finished... pictures soon!), but on the way back I saw a billboard for a Rolex Yachtmaster (for folks living in Austin, the billboard is right by Hudson's on the Bend). I thought "wow... that looks pretty cool". The old wheels start turning.

The thing is, I've been wanting to get a watch that is radio controlled. Those are the watches that synchnronize with a radio signal coming from an atomic clock at Ft Collins, Colorado (i.e. they remain blisteringly accurate). Trouble is there aren't many around. My favorite radio controlled watch right now is the Citizen AS2020-53E, but it is only available in Japan (it listens on a different frequency)


Citizen, are you listening? Sell this watch in the US!

So when I got home I dug around to see if Rolex had any radio controlled watches. Don't be silly. Well, the Yachtmaster looks like my old Tag... I wonder if Tag has any. Nope. At first this seemed strange, but then it occurred to me that the whole radio controlled thing is a good way to make up for your watch not keeping good time (so Rolex, Tag, Omega etc. would tell you they don't need to be radio controlled).

Anyway, I thought I'd dig my old Tag up again. When I got married 9 years ago we got his and hers Tag watches (yeah, I know), but after 7 years wearing it, I wanted a change and got the Seiko. Anyhoo, I found it in a drawer... and in the two years since I last looked at it, it had only gained 6 minutes, which isn't bad going. I had to expand the strap a little (spent a couple of hours trying to find the bits for it... not easy when they're 9 years old and you've moved house 4 times) but it feels good to be reunited with the old thing.


# posted 6/20/2004 07:52:01 AM | 0 comments

Friday, June 18, 2004

Separated at birth? 

Business Week described Chrysler's new 300 as "a brashly styled, unmistakably American car", which seems a little odd, as to me it looks just like a Bentley Arnage. But don't take my word for it... see for yourself...

Bentley ArnageChrysler 300
It cracks me up that the 300 is so "unmistakably American" given how unmistakably British the Bentley is. Bah humbug!

# posted 6/18/2004 01:51:24 PM | 0 comments

Saturday, June 12, 2004

Austin has an Apple Store... yay! 

This morning Apple opened its new store at the Barton Creek mall here in Austin. Its not a particularly large store but that didn't stop folks from queuing for 2 hours to get into it... The queue itself went down one arm of the mall and back up the other side... almost more impressive that the store itself (who knew Austin had that many Apple geeks?!)

And why bother? The first 1000 people in got a t-shirt - a black affair with an Apple logo and "Barton Creek" written on it. Very nice.

# posted 6/12/2004 03:54:52 PM | 0 comments

Thursday, June 10, 2004

Thanks for the (partially initialized) memory 

So, there's one of the apps on Dell.com that uses our Storm framework and gets this intermittent error that always wierded us out. It would throw an exception because of a null value, but the value couldn't be null... Here's what would happen...
  • You would be requesting a value from a singleton...
  • The singleton would look to see if it had the instance. If not it would create the object and initialize it. If anything goes wrong it throw an exception.
  • You then get back the singleton instance
  • Then you'd access something in it, and sometimes it would be null...
This is the strangest issue we've seen using .NET and we never did get to the bottom of it even after the app has been in production for a year.

Finally today we found the cause of the issue and its evil!

So when you write a singleton, you want to make sure that you initialize the object only once, so you use the lock keyword to make sure only one thread can be in there. And for performance you want to make sure you do some if checks so you only go into the lock wait if you need to. This approach is called a "double check lock". I didn't know it had a name ... it just seemed like the best way to do it when I came up with that approach when we started doing .NET development.

This is the kind of thing we're talking about here (code from Jon Skeet):
public sealed class Singleton
{
static Singleton instance=null;
static readonly object padlock = new object();

Singleton()
{
}

public static Singleton GetInstance()
{
if (instance==null)
{
lock (padlock)
{
if (instance==null)
instance = new Singleton();
}
}
return instance;
}
}
Anyway, it turns out that double check locking is a bad thing in .NET, and doesn't work at all in Java.

But the reason it doesn't work is pure evilness that I really wish I didn't have to know anything about. And it all comes down to how virtual machines work (which I equally want to know nothing about).

The problem is that when the Singleton object gets created, the values that are in the instance will be assigned all well and good in the code, the CLR may reorder reads and writes (for efficiency) so another thread might try to read a member of the object before it was written (even though you assigned it!). So in order to fix this, you end up having to tell the app to synchronize the writes before you assign the instance and leave the lock...
public sealed class Singleton
{
static Singleton instance=null;
static readonly object padlock = new object();

Singleton()
{
}

public static Singleton GetInstance()
{
if (instance==null)
{
lock (padlock)
{
if (instance==null)
{
Singleton s = new Singleton();
System.Threading.Thread.MemoryBarrier();
instance = s;
}
}
}
return instance;
}
}
Jon Skeet discusses a couple of interesting alternatives to having to do this, but sadly they don't work well for most of the singleton's that we have to create, and most of ours will end up looking like the one above.

At first I was kind of pissed reading about this... "that's a bug in the CLR!"... but as I thought about it, the read/write sequencing is probably a big performance help... but how can you "hint" the compiler to synchronize at key points?

I guess it could be made to do it when leaving a lock, but I bet there's plenty of reasons (other than just performance) why that would be bad too.

Further reading:
K. Scott Allen's blog
Jon Skeet's discussion on this
Brad Abrams' blog

# posted 6/10/2004 07:39:50 PM | 0 comments

Recipe for the end of the world 

So I've not been to see The Day After Tomorrow, but I find the basic premise quite interesting. When I was still living in the UK, I watched a documentary that talked about how there were more icebergs flowing into the North Atlantic, and as they melt the introduce cold freshwater into the sea which could in theory shut down the Atlantic Conveyor, switch off the Gulf Stream and drop Europe and most of the northern hemisphere into an ice age.

While sucky, such a scenario wouldn't really be the end of the world... civilization would just move further south.

What bothers me more are supervolcanoes and basalt flows...

Supervolcanoes such as the one at YellowStone or Mt Aso in Japan are kind of scary. Imagine how a volcano 75 miles across at the base, which can erupt so violently that it collapses in on itself... When I moved to Texas I bought my first house facing west because I wanted a good view if YellowStone erupted... but it never happened. Ah well.

Scarier still are basalt flows such as the Deccan Traps in India... Seems like scientists don't really know what causes them, but I have a theory. Deccan, and the Columbia River Valley are both at tectonic subduction zones, where one plate is going under another... The friction is what causes earthquakes... Imagine if you had an earthquake so large that the section of land over the subduction zone actually cracked...

So my end of the world scenario? Well, you know how Californians are waiting for "The Big One"... Think about Lex Luthor in Superman I, buying up real estate in the California desert because he was going to drop into the ocean... Imagine if the "the big one" was big enough to do what Lex Luthor wanted... but instead of falling into the ocean, a crack opens up and hot magma flows out over a 100 miles of the San Andreas Fault. Kind of makes the LA tornadoes in The Day After Tomorrow seem kind of irrelevant at that point.

# posted 6/10/2004 01:10:04 PM | 0 comments

Tuesday, June 08, 2004

More Japan photos 

I've posted some photos from our Japan trip in the gallery...

I've also stitched together a few more panorama-esque shots that I'm providing in a larger format:
  • Ninomaru garden
    At the Imperial Palace in Tokyo... as the azaleas were out
  • At Disney Sea
    This is the square at the entrance to the Disney Sea resort at Tokyo Disneyland...
  • Restaurant garden
    Taken at Ohara, near Kyoto
  • Temple garden
    Also at Ohara.
  • Mt Heisei Shinzan
    This is a volcano that was very active from 1990-1995. People climb it, which is nuts because it is still venting. In this picture you can see the ash lava beds laid down by pyroclastic flows, and the dams that are there to buy time for the folks living "downstream"...

# posted 6/08/2004 08:27:51 PM | 0 comments

Sunday, June 06, 2004

Ever wondered what 33 million people looks like? 

While I was in Japan a typhoon came through, and it cleared out a lot of the polution over Tokyo, so the next day we went up the Sunshine 60 tower in Ikebukuro - the tallest building in the area (i.e. you can get a good view because its not crowded in by other equally big buildings)

I took a series of photos - one from almost every window, and stitched them all together to make the picture below. Sorry its so big :-(

Scary facts: While Tokyo itself has only 12 million people, the Tokyo Metropolitan Area has something like 33 million people. You can see the Shinjuku district quite clearly about 75% into the image. Shinjuku's train station alone has something like 8 million people passing through it each day which can be quite intimidating if your walking through it in rush hour not knowing where you're going :-o


# posted 6/06/2004 12:07:08 PM | 0 comments

Thursday, June 03, 2004

Tubular Swells 

So, a few months ago I found a swelling in a place guys aren't supposed to have them (hint: you guys out there need to be checking your boys from time to time...)

My doctor decided it probably wasn't a tumor just because of where it seemed to be, and referred me to a urologist. The urologist agreed but had me get an ultrasound to be sure. Getting my boys covered in gel and probed with an ultrasound probe is certainly the wierdest thing that happened to me in the past 12 months. Today I got the all clear, so life goes on!

Anyway, the whole business made me come up with a crap joke...

# posted 6/03/2004 02:05:29 PM | 0 comments

Tuesday, June 01, 2004

Forget to mention the strangest trend of all 

How could I have failed to mention the wierdest thing I saw in Japan this time...

So, I was waiting for a train at Ueno station, and these two girls were squatted down fixing her makeup in a compact mirror. The nearest one had died grey (no really) hair and really cute shorts on and looked pretty hot from the back (bear with me). Anyway, her train arrives and she gets up and gets on the train. Wow - nice legs. Then she turns and sits down. Holy Cow! Her whole face is a combination of silver and black makeup. I have no idea what she was trying to look like, but she came across looking like a panda in drag.

Welcome to to Ganguro.

This is the latest "look" for the gal for whom looks are not everything. A lot of the girls I saw looking like this were a little on the plump side. But some like this girl were just stunning - until you saw their face. And some had tamed it down so they just had bright silver lipstick and eye shadow, which would have made them looked deathly ill if not for their deep brown tans.

Anyway, I couldn't possibly describe it better than pictures can...


There's a page on the whole lurid thing here:
http://www.livemusicstudio.com/mac/pages/ganguro.html

# posted 6/01/2004 05:43:32 AM | 2 comments


This page is powered by Blogger. Isn't yours?
Copyright 2004 Steve Saxon