Friday, 1 October 2010

It’s a Wonderful Life

One week ago my beautiful wife gave me a son.

Actually it was more like a surgeon removed my son from my beautiful wife, handed him to a paediatrician who cleaned him up, I ceremoniously cut the cord and then the paediatrician handed me my son and I presented him to my beautiful wife.  But that description seems a little less romantic.

Either way, we now have a complete family with the addition of Dean Patrick Harris, born on 22nd September at 3:34pm New Zealand time.  One whole week after his sister Serenity had her first birthday.

He weighed in at a very reasonable 4kg (8lb 15).  The odd thing is he is taller than his big sister, but his feet are a little smaller.  Though his toes do seem almost freakishly long.  You can find some pictures on

This time we ended up opting for an elective caesarean section.  As such, it was quite a different experience from Serenity’s emergency c-section.  Last year, after a 19 hour labour, rushing into theatre after being up all night was much more surreal. 

So tired.  So emotional, So stressed,

The whole procedure went by in such a blur.  You barely had time to think.  And I had the easy part.

This time around you noticed everything.

My wife noticed everything.

Last year, she was so tired the surgeon had difficulty keeping her awake enough to confirm if the epidural was working sufficiently to continue with the procedure.

Being fully aware of what was going on has a significant downside.  Of course for both Dean and Serenity, the main action was hidden from us behind a curtain.  But this year we had time to hear everything and the procedure sounded very different from what we remembered from last year.

The most noticeable sound was an awful lot of snipping.  A serious amount of snipping.  I don’t remember any snipping from last time.

Then there is the physical tugging and pulling.  I cannot imagine how that felt.  Dean is a longer than the average baby and it seemed the surgeon and her assistant had a little difficulty even pulling Dean out.

Eventually Dean was pulled from his warm home of nine months and was quickly presented to his parents over the top of the surgical curtain.  Suddenly it was all worth it.

All the pain and discomfort of pregnancy and surgery was instantly cast aside once we met our baby boy for the first time.

No more fears.  No more anxiety.  No more stress.

At least until the euphoria of child birth was worn off and we then have the fears, the anxiety, the stress of raising and caring for two children…

Wednesday, 8 September 2010

Email Attachments

Today I spend just a little too long trying to attach a in-memory Excel 2007 spreadsheet to an email.

I have recently started using ExtremeML to create Excel documents and today I attempted to go a step further and use the in-memory instance of the generated document as an attachment for an email.

It seemed straight forward, create a MemoryStream object and pass it to the routine in ExtremeML to fill it with the Excel document.  Then add the MemoryStream object to the MailAttachments property of the Message object and Send!  How easy can that be…

Well, I receieved the email, the attachment was there but it was empty!

Actually, Outlook was stating it was stating the attachment was 386B but when I saved the attachment to my desktop, it was actually zero bytes.  I can only assume that Outlook is reporting the size the attachment is taking up in respect to being embedding in the raw email body.

Anyhoo, I am left scratching my head for ages.  I can swap the MemoryStream for a FileStream and it successfully saves the file.  But if I use a MemoryStream it suddenly forgets the data.  I can check the stream before it attaches it to the mail message and it seems to contain data.  And then I realise…

The stream has just been written to, the pointer within the stream is pointing to the end of the stream!

   1:  attachmentStream.Seek(0, SeekOrigin.Begin);

Is all I had to do before attaching the stream as a attachment.

I fire up the test app and I dutifully receive the email with a fully populated attachment.

I win!

Tuesday, 7 September 2010

Lufthansa Virtual Pilot

Not sure how good or bad this is but I seemed to be doing reasonably well for making mostly guestimates.

Wednesday, 26 May 2010

Quick and easy query to Active Directory

For ages I have needed a means for finding out details of the person behind a windows login as the login is just an employee number.  I had means to find these details but it was always cumbersome – not to mention slow.

The following DOS command queries Active Directory for details about the given login.


Another handy DOS command queries a who is a member of the given group.


Just a simple little code snippet that make my life a little easier.. :)

Saturday, 22 May 2010

OMG! A year since my last post!


Where has the time gone?

This time last year I had a baby on the way.  Her name is Serenity.  She is a wonderful addition to the family and I love her with all my heart.

We now have a second baby on the way.  He is due on the 26th of September 2010.  Serenity was born on the 15th of September 2009.  I was a slow starter but I am certainly making up for it now.

We have a few names being kicked around at the moment.  My choice this time as Leah chose last time.  Unfortunately Leah is definitely not keen on the name, Teal’c.  I don’t know why… Just kidding :)

In fact most things sci-fi related are out of bounds.

You may think Serenity is very sci-fi related and you would  be correct.  But I didn’t chose it so the name “Serenity” was acceptable.  I am happy.  Leah is happy.  Serenity is happy too.  The thing that is really cool is that Leah came by the name “Serenity” from seeing a movie poster.  The movie the poster depicted just happened to be based on a TV series I enjoy immensely.  The TV series being Firefly of course.  It is funny how things turn out sometimes.

Anyhoo, it has been a whole year since my last blog post, sorely overdue for some kind of update, hence the purpose of this post.

I was supposed to blog about my experience with Typemock.

I am supposed to be blogging about my experience with Lightspeed from Mindscape.  Just as an aside I just recalled my old BBS days and a friend of mine, Kenji, who ran a BBS using a application called Lightspeed for the Amiga.  Ahh… those were the days… :)

I am also supposed to be blogging about my experience with Silverlight Elements also from Mindscape.

I do have a project in the works in which I could try out all the above.  My only obstacle in the way is time.

In the very near future I should be able to allocate some time to this project, subsequently blog the results here and hopefully appease the generous people from Typemock and Mindscape.

Wish me luck…