del.icio.us links not a good idea for a blog

I am getting rid of these damn delicious links. They are making my blogging output seem a little sparse. Besides, why not just subscribe to the RSS link at delicious if you want to know what I'm finding? Or better still, send me your delicious id and what you are interested in, and I will send them to you as I find them?

Daft fortunism of the day

Here is a simple experiment that will teach you an important electrical
lesson: On a cool, dry day, scuff your feet along a carpet, then reach your
hand into a friend's mouth and touch one of his dental fillings.  Did you
notice how your friend twitched violently and cried out in pain?  This
teaches us that electricity can be a very powerful force, but we must never
use it to hurt others unless we need to learn an important electrical lesson.
        It also teaches us how an electrical circuit works.  When you scuffed
your feet, you picked up batches of "electrons", which are very small objects
that carpet manufacturers weave into carpets so they will attract dirt.
The electrons travel through your bloodstream and collect in your finger,
where they form a spark that leaps to your friend's filling, then travels
down to his feet and back into the carpet, thus completing the circuit.
        Amazing Electronic Fact: If you scuffed your feet long enough without
touching anything, you would build up so many electrons that your finger
would explode!  But this is nothing to worry about unless you have
                — Dave Barry, "What is Electricity?"

A new end/beginning

Well, LinkMe is coming to an end. Not literally – just my involvement in it. Yes, I am off again to a new place. This time it is Readify – a smallish consultancy that specialises in emerging .NET technologies. They were recommended to me by Frank Arrigo, the group manager of the Microsoft Australian Evangelists, who rated them as an 'elite team'. Hopefully, now I will get an opportunity to indulge my secret fetish. I am an EARLY-ADOPTER! There, it's said, I'm out of the closet now.

Microsoft Australian Evangelists – sounds like a good name for a gospel-rock group…

Gorgeous Work

This sculpture is entirely handmade, by Mark Ho. The sculpture reminds me so much of the 50s illustrations by Chris Foss for Isaac Asimov's robots books.

Animatronic Human Sculpture

I love the organic look of it. It looks less a machine contorted into human form than the reverse. 

Some new themes.

No, not display themes in my blog. I'm going to start some new themes on design and development issues. There's a few things that I felt I ought to give a systematic treatment to.  I've had a few conversations lately that brought my mind back to the issues of code generation and its related patterns. I've also been playing with generic algorithms in C# 2.0 for type introspection in my DBC system. It seemed natural for me to explore the idea of using generic algorithms at the heart of code generation frameworks since a generic algorithm would allow me to reuse my code generator regardless of the metadata format or the output stream.

Consider this:

public class CodeGenerator<DataSource, TemplateSource, CodeGenerationPolicy>{ 
// ... 

using CodeGenerator<DatabaseModel, 
	SingleFilePerTopLevelElementPolicy> SqlCreateTpl; 
SqlCreateTpl tpl = new SqlCreateTpl(GetModel(), 

Neat huh? I'd prefer to write code like that than write code that must explicitly acknowledge where the data comes from, what it's format is, and how it is to be disposed of in the code generator. Up until now, I have achieved design-reuse, but never code-reuse. From looking at other code generators, the problem abounds. Most systems I have worked with provide the code expansion part, and the template language part, but tend to stick to a single metadata source when it comes to generating code or other artifacts.  A case in point are the persistence-tier code generators that purport to be general purpose code generators but that only take data from a specific database API. These don't provide the degree of genericity required to share code between wildly different systems such as a DBC proxy class generator and an Object to Relational mapping system. In the first example our data comes from reflecting the metadata of a .NET assembly in the later it comes from reflecting the schema of a relational database (or both). We need a code generator that will work regardless of where it's data comes from, and how and where its output gets generated. We need to separate the algorithm of the code generation process from the structure of the metadata source, and they both need to be isolated from what happens to the stuff that the template system outputs.

The solution of these problems was the grail of the beautiful C++ Standard Template Library of Alex Stepanov. It is still a matter of debate whether something like the STL is possible in C#, but early work  is yielding possibilities that hold out hope. I propose to give code generation the STL treatment. In the process I will explore many related ideas that have been bugging me about my ORM and DBC systems. Chief amongst those is the matter of policy vs configuration and how you store them.

There's my manifesto for the weeks/months ahead! I have some holiday coming up, so I may even deliver on the promise. ;-)

Another Source of British Pride?

In a conversation I had with a colleague, it came to light that the British have another reason to be proud of their national heritage. As you may know, they were the nation that invented the queue. they take to the queue as ducks take to water, and queueticette is installed in their youth from the cradle. Not content with that, the British graduated in the 70s from simple linear queues to more complicated non-linear arrangements. It is arguable that modern operating systems would never had reached their current degree of multi-processing capabilities were it not for the British obsession for queueing.

We’re talking about the magic roundabout in Swindon. I have gone through the magic roundabout twice. Both times I went in accidentally and with trepidation, and came out elated and enthused. Perhaps that is the essence of many pieces of post-war British town planning. East Dumbarton is another example – I went in thinking I would get knifed and came out overjoyed about the fact that I didn’t.

I’m not sure such roundabouts would get built these days. The 70s in Britain were a time of regrowth and increased confidence, when we ‘never had it so good’. Filled with confidence, people knew it was OK to experiment and try new things – drugs, free-sex, rock-n-roll, roundabouts, whatever! Nowadays, such experimentation would never get off of the drawing-board. Not because of traffic flow analysis but because of the weaselly bean-counting tossers who are the secret police enforcing the modern day tyranny of the nanny-state. These people enforce a Maoist level of austerity on the British public in the name of ‘Health and Safety’, they are insurance brokers and health and safety officers.

FACT:You can’t have hanging baskets in public spaces any more, because they might fall on people’s heads!
FACT: A hanging basket has never actually fallen on anyones head in the UK. The premium increase is not founded on any actuarial analysis, therefore it must be based on a desire to remove hanging baskets from town centres.
CONCLUSION: Insurance Brokers and H&SE officers are effecting social change in a way that is gradual and hidden from view, and in a way that is profoundly negative.

In Britain we like to criticise the American’s for their litigious culture that turns ordinary professionals into timid cowards for fear of punitive legal measures. We have no reason to be conceited though – we are equally held to ransom by the insurance profession. They don’t take us to court, they raise our premiums. It deadens the spirit to even think about what levels of crawleyage have been perpetrated in the name of H&S.

Anyway, rant over. Hats off to the town planners of Swindon who had the courage to strike out against the lowest common denominator, to forge a path to the non-linear via the nirvana of roundabout confusion! The Swindon magic roundabout is a mandala, a traffic koan, a map charting the path to enlightenment and heaven on the highway of life.

I am a father – of two.

It's been five days already, and the urge has come upon me to write a blog entry to say what's been going on.

Friday afternoon I got a call from Kerry saying that she'd had a 'show'. Naturally I wondered whether it was a cabaret or the normal sort. It turned out to be a whole lot more biological than that, involving mucus plugs and contractions and Emily's feet slipping down into the birth canal. We thought that it might be another false alarm – we'd already had one so we tried not to get too excited, but the pains continued to grow so Kerry gave the labour ward another call and this time they summoned us in for observations.

It quickly became clear that these contractions were the real thing, not the brackston-hicks variety that had been going on for months. They mounted and the hours passed, and eventually the doctors decided that they might as well go ahead and whip them out, since we were here anyway.

At midnight they wheeled Kerry into the operating theatre and started to prep her for the caesarian. That meant inserting a needle the length of my index finger, and the width of a bic biro into the gap between two of her vertebrae. At that point the reality of the situation slammed into me at full force, and I sat there in a cold sweat going green, while Kerry was ushered into an operating theatre with about 20 doctors and nurses standing about. At this point I remembered all the advice about deep breathing – funny, I always thought it was meant for the mothers… Kerry was unfazed by the anaesthetists work but I'm sure it would have been another story if she had seen the size of that needle. Christ! Gives me the willies just thinking about it now. I'm not a squeamish sort, but I was so worried about Kerry and the twins that I got all emotional. Ahem. Anyway.

When I was admitted to the inner sanctum, they had laid Kerry out on the operating table with a large screen between her head and her belly – to hide from her the grizzly mechanics of the procedure – another good idea, she didn't wanna see that either! I stayed with her, despite having claimed I was going to photograph everything. She was on a table with arms that came out of the side for her to rest her arms on, for easy access to the aneasthetist. It looked to me like one of those humane execution tables for administering lethal injections. Kerry looked so lost and scared, so we stared into each others eyes and whispered daft nonsense to each other. Almost immediately the aneasthetist said, "oh, they've made the incision already, they're just making their way down to the womb". Within seconds of that Emily made her appearance:

From that point onwards the pace picked up, and I took a peek around the drape to see them tugging Thomas out by his ankles (his head was a little too big for the gigantic slash in Kerry's stomach!) He seemed to have been wading head deep in Shea butter, but I was later told it was Vernix – another brand of snot that mothers dispense free to all children.

Thomas has been a frisky little fella since he came out – not surprising really considering he got his nuts squished by the surgeon on his first outing!

Anyway I'm getting a little ahead of myself. As soon as both babies were safely out, along with their life support systems. The surgeons went to work sewing Kerry up, while I was taken over to see T&E as they were assessed to see whether they needed anything immediately. They were weighed, measured, their breathing checked (and a little O2 administered) before I was given each in turn to take over to Kerry, who was kinda indisposed at the time due the fact that a surgeon was buried up to his elbows (I'm not exaggerating at this point at all!) in her abdomen. Kerry was cool as a cucumber, and just looked so full of joy as first Emily and then Thomas were brought over.

She only got a minute or two with them before they were snatched back and put into portable intensive care pods to be wheeled up to the neonatal intensive care ward (where we have lived on and off for the last week). The babies were fussed over when they arrived in the "newborn services" department. For the record I shall call this department the neonatal intensive care ward. I hate it when people upscale a name to lend it more dignity than it deserves. I have discovered that I also hate it when they downscale a name to not scare the natives. I mean. Newborn services sounds more like a motorway service station than a place that monitors newborn babies intensively. Anyway, I think the nurses there do a wonderful job and deserve more recognition. Rant Over.

As soon as the babies were ensconced, I dived back down to Kerry who, being all sewn up now, was lying around in recovery. I've found myself doing that ever since – I am now torn three ways. I find myself on a strict rotation system between T,E, & K. Eventually guilt drives me from the one I'm with the the one of been with least. I can't wait for them to come home, so I've got them all under the same roof!

It's been a week since Kerry went into labour, and she and the twins are doing fine. So fine in fact that they may be released before two weeks are up. Not bad for babies that are 5 weeks premature! T&E are out of the isolette incubators, away from the UV lamps, sans needles and heart and respiration monitors and (in Thomas's case) without a feeding tube as well. Emily is still too tired to feed very much so she is still wearing the feeding tube, but she's getting more lively with each passing day.

There are some really sick children in the neighboring cots, so we are counting our blessings and are glad that jaundice is all that we have to contend with!

I thought it was worth preserving the original message as well, while I was at it:

Hi Everyone,At 12.31AM and 12.32AM on the 1st of October 2005 we welcomed Emily and Thomas into the world in Monash Medical Centre (Clayton Campus). Everything went perfectly and mother and twins are thriving. Emily was born first. She weighed 2.59Kg and was 46cm tall. Thomas who was born a minute later weighed 2.422Kg and was 47cm tall. They are both in incubators at the moment since they are about 4 1/2 weeks premature, but they seem to be in perfect health, and will probably be transferred out of the incubators into cots sometime this afternoon – i.e. before they are a day old. They both inherited their good looks from their mother and their placid nature from their father (no, really).

Kerry was incredible, as usual, and bravely withstood having a surgeon's arms up to his elbows inside her belly with stoic good humour. I have to admit I was not as brave, and started to freak out at the anaesthetist's first needle. (mind you – I saw the length of the needle, she didn't!) Anyway, she's already looking bright and cheerful, and happy, and totally, totally blissed out. I'm the same – we have been blessed with two gorgeous little angels. I can't wait to get to know them better.

For those of you able to get to the hospital, visiting hours are between 2 and 4pm and about 7-8pm. Sunday or after would be a good time to come in, when Kerry has had a chance to rest properly – I don't think she's had a proper nights sleep for about a month, but a day or two might help her to recover a little.

For those of you who're too far away, I've put up a slide show with the latest pictures. With more to follow.

We'd both like to thank Nicole again, who after a frantic day, with god knows how many deliveries already, decided to stay with us till after 4am, and was there with us for the birth. She was amazing, and helped transform what could have been an agonising and stressful time into the most profound and life changing experience either of us have ever had. Not only that, she made it fun! Thanks Nicole.

Please give us a call on +61 *** ****** so that we can ramble on at length to you about how beautiful our babies are. ;-)

See you,


PS. If I missed anyone, it's cos I didn't have all of the contacts in gmail – could you pass this on to them with my apologies. Also, sorry if you get this more than once, I haven't slept for two days and a little dumb right now.
PPS. To calculate the time difference between the UK and Australia just subtract 3 from the time there, and then change from AM to PM or PM to AM. i.e. midday in UK would be 9pm in Australia, and 9am in UK would be 6pm in Australia. (I think.)