# Wednesday, 16 June 2004

My computer has been acting up and I have not been able to locate error until now. It turns out that both my graphics adapter and motherboard kicked the bucket. Weird coincidence which made finding the error even harder than usual.

Anyway I am back up so expect posting to return to normal.

I am still getting used to being a father but this far I think both my girlfriend and I are doing good. Also Alexander is an angle; he sleeps through most of the night and is easy to comfort when he gets frustrated about something (knock on wood).

posted on Wednesday, 16 June 2004 20:53:52 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Thursday, 10 June 2004

Hot on the heels of yesterday's release a new version of ReSharper has been made available. Grab build 86 right now.

posted on Thursday, 10 June 2004 22:19:38 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Wednesday, 09 June 2004

I am trying to beef up my testing abilities as they leave something to be desired. I immediately got caught on the idea that Test Driven Development would be if not the entire solution then a part of the solution. Only problem was that I really had no idea of what Test Driven Development is all about so I sat through a webcast from Microsoft on the subject. The presentation was James Newkirk a development lead at Microsoft and the man behind NUnit which is the defacto way of unit testing stuff in .NET.

The webcast gives a great overview of Test Driven Development and the ideas behind it. It even goes further and demoes how you would go about putting together some tests in Visual Studio .NET 2003. Please be aware that you need to provide a name before you will be able to view the presentation.

If you need some additional reading "Pragmatic Unit Testing in C# with NUnit" seems like the choice of books along with "Test-Driven Development in Microsoft .NET". My vote for which book is better is still out though.

Also there is a quite interesting article over at CodeProject.com on the subject.

posted on Wednesday, 09 June 2004 23:56:38 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

Being an iPod owner naturally I get excited when Apple releases a new version of iTunes. Even for people who do not own an iPod iTunes is a great music player. You can get the latest version from Apple.

Version 4.6 adds support for a cool piece of hardware called the Airport Express which is a device which allows you to stream music to your stereo wirelessly none the less :)

Read more about the Airport Express at Macworld.

Update: Caledonia pointed out the iTunes COM SDK which you can use for interfacing with iTunes programmatically. This blog being partly a development blog I thought that I'd add the link here :)

posted on Wednesday, 09 June 2004 22:13:49 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

A new version of ReSharper has been released. Check it out. In case you are wondering what ReSharper is I have written a little something about it previously.

posted on Wednesday, 09 June 2004 22:02:15 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 07 June 2004

Yesterday evening I became a dad to beautiful little baby boy Alexander. My girlfriend (wife to be even :) ) was admitted to the hospital Thursday last week because her blood pressure was too high which could cause complications at birth.

Because of this the birth was started prematurely with the help of medicine but unfortunately it didn't take. Labor was induced but the contractions were artificial in nature and could not be sustained during the entire birth so the doctors decided that is was time for a Cesarean. At this point we had reached Sunday and naturally we were happy with any kind of progress so agreeing to surgery was not that tough a decision.

Things started to happen very quickly after the decision was made. My girlfriend was prepped for surgery and less than 30 minutes later she gave birth to our son. Surgery itself lasted for 10 minutes which to me was both surprising and very fascination - I hold a very deep respect for doctors, needless to say that this respect grew ten fold that night.

One of my greatest fears is of surgery so I was pretty much just tried to make it through it all without passing out. Somehow I ended up in surgery with my girlfriend telling her that everything would be alright while at the same time trying just to breathe calmly. Very weird and very scary seeing the person I am the closest with in the entire world lying there without me being able to do anything about it. My job is to protect her yet I was unable to do so.

I cannot describe the feelings which rushed through me as I heard the first little cough coming from my son when he was born. It was basically every single feeling I have had my entire life rushing through me in a span of a few seconds. Even as I type this the memory of it all makes adrenaline pump through my veins.

Everything went according to plan and I have spent today getting to know my son. It's incredible to think of all the possibilities the future has in store for him. For now I am happy just being able to change his diaper and keeping him from crying.

Becoming a father really sets everything in perspective; I have baby poo up my elbows and I couldn't be happier :)

posted on Monday, 07 June 2004 20:40:38 (Romance Daylight Time, UTC+02:00)  #    Comments [6] Trackback
# Friday, 04 June 2004

I have previously mentioned CodeRush here which is an add-in for Visual Studio .NET which adds many of the things we will see in Visual Studio 2005. At $250 a license it is pretty hard to justify when the feature will be available for free in a years time.

While I was tinkering with CodeRush I stumbled across another tool named ReSharper which does the same thing - adds all the IDE sweetness which is found in the VB.NET IDE. ReSharper is still in development and the first release I tried was horribly slow. Today I got an e-mail stating that a new release is available. Not being impressed with the first release I figured I'd give it a whirl just for kicks.

Lo and behold the new version of ReSharper is actually a big improve over build 83 (the first one I tried out). Build 84 addresses the performance issues and also some of the configuration issues. I highly recommend that you try out the new version. Beware though the add-in is still in development and as such can be the subject of changes, breaking stuff, and all that. Consider yourself warned :) Also you should be aware that the performance of previous version decreased as the project size got bigger. I have not yet had a chance to see if this issue is addressed in the new version. If you do try out this build please let me know what you find.

Download latest build of ReSharper (build 84)

posted on Friday, 04 June 2004 12:32:37 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Thursday, 03 June 2004

One of the products I work with daily is Commerce Server 2000 and 2002 from Microsoft which is an interesting product trying to create a standard e-commerce platform on which you can develop your own solutions.

Anyway the product is very complex and has all kinds of nooks and crannies due to the fact that version 2000 was an ASP only product. Version 2002 has a lot of .NET classes and stuff to use but it is still just a layer added to the top of the COM objects found in version 2000.

I was tasked with creating a program which does some bulk updating using the Commerce objects. One of the tricks in Commerce Server is that it comes with a built in data abstraction layer called the profile system. A profile in the profile system is basically a table in SQL Server.

Back to the task at hand; I needed to create a ProfileContext outside of ASP.NET where it is available through a HTTP handler so I needed to figure out how to get at it without the HTTP handler doing the "heavy lifting".

First you need to add a couple of references to the COM based DLLs named ADODB.dll, AppHelper.dll, and MSCSCFG.dll. They are all found in your Commerce directory. Finally you need the managed Commerce Server runtime DLL named Microsoft.CommerceServer.Runtime.dll which is found in the Commerce Server\Assemblies directory.

Now for some code: First I needed to get the connection string for the profile system which I did in the following way: 


//  Get the profile connection string from the system config


AppConfig appConfig = new AppConfigClass();

appConfig.Initialize( ConfigurationSettings.AppSettings[ "name of your commerce application" ] );

Microsoft.CommerceServer.Runtime.IDictionary configDictionary = appConfig.GetOptionsDictionary( "" );

string profileConnectionstring = Convert.ToString( configDictionary[ "s_ProfileServiceConnectionString" );



//  Instantiate the ProfileContext object


string profileDefinitionCatalog = "Profile Definitions"; // You can look this value up in the Commerce Manager

ProfileContext profileContext ProfileContext( connectionString, profileDefinitionCatalog, new ConsoleDebugContext( DebugMode.Production ) );


posted on Thursday, 03 June 2004 23:03:32 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

I must be a nutter :) I just love getting a new beta release to try out. Here is the first Windows Media Player 10 beta.

Update: Windows Media Player 10 final has been released.

posted on Thursday, 03 June 2004 09:08:46 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback
# Monday, 31 May 2004

I have been having problems connecting for Hotmail these past few days and I have been unable to figure out what caused the problem. I could not get a connection in either Outlook or Internet Explorer, really annoying especially when the girlfriend has no other e-mail account which means she was bugging me about the problem :)

The problem was basically that I was able to log into my Passport but could not get into Hotmail. The connection seemed to stall when the Passport login was complete. The address which the browser would get stuck at was login.passport.com - strange. Even more strange was the fact that other sites displayed without a hitch.

After trying everything from adding the various Hotmail related sites to my secure sites in Internet Settings, deleting cookies, deleting history, deleting temporary Internet files, and troubleshooting my SSL installation I accepted the fact that I was unable to fix the problem and needed a reinstall.

Today I gave the problem another shot before reinstalling, lo and behold everything started working again. The cause of the problem was the MTU size of my router which I had changed in relation to another problem with some wireless networking I had. Changing the MTU size back to the default 1500 (from 1492) resulted in instant connection to Hotmail. How weird is that?!

Oh well, thought I would share this with the world what with routers becoming increasingly popular in households and all. Don't know if the make of the router is important but my router is a Netgear RP614 (let the port attacks commence :)).

All is well that ends well and I am now the official hero in my girlfriend's eyes. Guess I will keep the fact that I was the original cause of the problem to myself :D

posted on Monday, 31 May 2004 15:19:44 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback
# Saturday, 29 May 2004

I can't for the life of me remember where I found this presentation "Overview of the Tablet PC Platform" by Arin Goldberg but it's great both for getting to know what the tablet PC is all about and what the development possibilities are.

I for one am toying with the idea of getting one of these machines as the idea of being able to use a PC in a more natural way what with hand writing recognition and all is very appealing to me. Also being on the cutting of technology counts for something :D Anyway my idea is that I will get more reading done on the computer if I am able to sit comfortly in my livingroom while reading.

posted on Saturday, 29 May 2004 22:02:09 (Romance Daylight Time, UTC+02:00)  #    Comments [0] Trackback

Some time ago I discovered a neat language feature of VB.NET where you can name parameters for method calls. This is actually something which has been around a long time even before .NET (was there anything before .NET? :) ).

Named parameters is a feature you can use if you want to be really explicit in your method calls it does actually improve readability somewhat.

As an example I had to code a components which would do transactions on people's credit card for Bolia.com because they have way too many transactions each week for them to handle it all manually.

The interface I was programming against looking something like:


Function Capture(ByVal sAmount As String, _

                         ByVal sTransact As String, _

                         ByVal sOrderid As String, _

                         ByVal bForce As Boolean, _

                        Optional ByVal sAccount As String = "") As Long


You can use named parameters if you want to be really explicit in your method calls it does actually improve readability somewhat. In the case I mentioned I wanted to make it really clear which values were used for what in the method call like this:


            Dim amount As String = "11111", transactionId As String = "11111"

Dim orderId As String = "11111", forceCapture As Boolean = True, accountNumber = "1111"


Capture(sAmount:=amount, sTransact:=transactionId, sOrderid:=orderId, bForce:=forceCapture, sAccount:=accountNumber)


Unfortunately C# does not support this but I guess that it goes against the whole philosophy of C# anyway :)

posted on Saturday, 29 May 2004 21:46:05 (Romance Daylight Time, UTC+02:00)  #    Comments [1] Trackback