Uploading Videos

I've been playing with uploading videos today and MSN Video seems to outshine the other when it comes to uploading as well as viewing video.

The biggest strength being the uploader that comes built in to Windows Live Photo Gallery. With YouTube you need to wait for the whole video to upload which can take quite a lot of time, if not you need to muck around with some compression program and fine-tune the settings before doing the upload. I don't have the patience for that.

The Photo Gallery uploader seems to compress the file as it uploads making it extremely fast.



Then Windows Live Writer makes it as easy as Insert->Video to allow you to pick the video that you uploaded.

Insert Video

Joshua & water

One of Joshua’s favorite activity is playing with water. A bath anytime of the day is sure to cheer him up. I usually like to spoil him by giving about four or five baths a day when I’m at home and he goes crazy.

The funny thing is that giving so many baths in Sri Lanka would have made the child sick but over here in Australia it doesn’t seem to have any bad effects, he’s barely had a cold here.

Here’s one of him at home.



This is the more popular one of him at Sentosa Island in Singapore. They have this lovely set of fountains with water sprouting up to about his height, they drove Joshua nuts, Nethmi too joins in on the fun.


Contact us for promotional giveaways custom water bottles .


Imara & Rafael

It turned out to be a wonderful coincidence that our second son Rafael decided to be born on our second wedding anniversary!

The little fella has a loud voice and wakes his older brother up at night, but we all love him so much.

Having a baby so many miles away from family and friends should have been a very difficult experience. On the contrary the midwives who delivered Rafael were so friendly and motherly that Imara, Joshua and I never felt any stress.

I'm even more impressed by the fact that the midwives visit our house to check on the mother and baby and the constant care given. The Australian medical system by far would have to be one of the best in the world.

Anyway's my mother in law just flew in from Sri Lanka today so that's going to make it a little more easier for Imara.

It’s good to be a consultant

I'm working as a consultant for the first time in my ten year career and I'm loving every minute of it.

In the last couple of months I've worked in three very diverse teams, in three different offices and three different technology areas ranging from VB6 Interop + ASP.NET at Kelloggs, WinForms + EntLib + Oracle + Mainframe integration at Microsoft and now SharePoint (MOSS 2007) at Lend Lease.

The quantity & quality of things that you learn from interacting with such diverse people is mind blowing. For now, I'm going to sit back and enjoy the ride!

Playing the currency game

If like me you frequently send money back to Sri Lanka, it's important to know how to play the game.

You can save yourself some dollars or rupees by knowing if things are going up or down, here's where x-rates.com comes to help.

Pick the two currencies from where your sending and receiving and hey presto you have a graph.


I for one will be waiting a couple more days before my next transfer.

Oh and I nearly forgot, the guys at Ceylinco Fast Cash give a really good service when sending money home. My last transfer went through like a breeze, in less than one hour, I deposited some money in Sydney and my brother withdrew from Colombo. Both of us were SMS'd every step of the way by their automated system.

Plus if you use there service about 6 times they provide a number of free benefits including a "doctor on call and other medical services for your loved ones in Sri Lanka".


tigerwoods "I view my life in a way … I'll explain it to you, OK? The greatest thing about tomorrow is, I will be better than I am today. And that's how I look at my life. I will be better as a golfer, I will be better as a person, I will be better as a father, I will be a better husband, I will be better as a friend. That's the beauty of tomorrow. There is no such thing as a setback. The lessons I learn today I will apply tomorrow, and I will be better."

Tiger Woods

No color coding for Classic ASP in Visual Studio 2008

This seems to be a bummer. Color coding and intellisense for VBScript code in Classic ASP pages have been deprecated in VS 2008.

There is a workaround for making it work for files with the .vbs extension but no solution for .asp pages. Hopefully someone would come up with a hack to get it working again.

Until then Microsoft's answer is for us to use VS 2005 or Visual Web Developer 2005. But don't install VWD if you already have VS 2008 installed since VWD will take over all file associations leaving 2008 broken.

You can let Microsoft know how much this sucks by ranting here: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=290845

Moq: Linq to Mock

Daniel Cazzulino just announced the birth of Moq, now this is mocking done right.


// ShouldExpectCallWithArgument
var mock = new Mock<IFoo>();

.Expect(x => x.DoInt(1)).Returns(11);
.Expect(x => x.DoInt(2)).Returns(22);

Assert.AreEqual(11, mock.Instance.DoInt(1));
Assert.AreEqual(22, mock.Instance.DoInt(2));


Lambda is starting to make my mouth water.

The Dangers of Static Events In User Controls

Static events in user controls can lead to all sorts of weird behavior in your application. Especially when they are hosted in forms that are loaded and unloaded during the lifetime of your application.

public partial class FlexiAddress : UserControl
    public static event EventHandler<AddressChangedEventArgs> EventAddressChanged; 

The danger here is that unless you unhook from the static event before your form closes what happens is that although the form is not visible it still hangs around in memory until your application exits.

So if you are showing the form by creating a new instance, every form that is created is loaded into memory and will actually cause a memory leak.

If you want to prove this to yourself the easiest way is to include a Debug.WriteLine in the even handler and then after you've opened and closed the hosting form a couple of times try to do an action that causes the event to be fired. You'll notice that the Output window has one line for each instance of the form that is loaded in memory.

The solution, is to remove the hook to the event handler, the Form_Closing event is probably a good place to include this.

AddressControl.EventAddressChanged -= AddressControl_EventAddressChanged;

The better solution though is to avoid using static events.