Why is there an elephant in my messenger?

The average PC has several orders of magnitude more disk space and memory than ten years ago, but developers are still sacrificing ease of use for a few megabytes.

My MSN Messenger stopped working mysteriously a few days ago. I could not log in, and the silly program just gave me a numerical error code and told me that some ‘key ports’ were not accessible. At first, I blamed temporary network problems, but when the guy next to me logged in, that explanation no longer seemed right. After about three hours of network troubleshooting, restarting, reinstalling, deleting, restarting again and other obvious attempts to make it work, I became quite annoyed. MSN messenger has somehow established itself as a my primary method of communication with customers, so I really need it to work. Searching for that strange numerical code on Google at least provided some comfort – I was not alone. However, none of the solutions seemed related to MSN – some poor soul had his proxy settings in IE changed by a virus, causing an error with the same numerical ID. I did not really see what IE proxies have to do with MSN, but at that point, I would even go for black magic if it worked. A quick check at the network configuration dialog of IE could not hurt, I thought. There were no proxies defined, but some other strange check-box was confirmed on that dialog, setting a ‘profile override file’. I unchecked it and the silly messenger logged in.

My messenger is apparently a browser

I used Selenium the day before to automate Web front-end tests, and the engine apparently did not clean up it’s IE configuration after a failed test. I use Firefox normally, and load IE only for occasional testing, so I did not notice that the browser was also not working. Huh… three hours wasted because of shared components.

I appreciate the attempt of Microsoft’s developers to save my disk space and RAM, but I would appreciate it even more if the computer did not have to restart after the messenger is re-installed. It’s like asking me to sleep a night in the hotel just because I had to change a light-bulb in my home. And I would really like the stupid messenger to disappear when I uninstall it and delete the files, not to come back as some undead monster and haunt me.

Is it also an IDE?

After a few hours, Visual Studio 2005 failed to open a project that was saved with VS2005+service pack 1, so I had to upgrade the IDE also. The patch was some 450 MB, so I downloaded it, let it run, changed my messenger status to ‘Out to lunch’, and went to get some food. When I came back, instead of a message telling me that the installation is over, I found a dialog insisting that MSN messenger should be closed because it’s blocking the upgrade. Ok, on some strange level I understand why messenger and IE share components, but what the hell does Visual Studio have in common with a messenger, and why did they not just statically link the library and store it in the application folder? Why does an IDE have to upgrade a messaging program?

Unfortunately, the trouble did not end there. I closed the messenger, let the installation run again, only to crash 30 minutes later due to some strange privilege problem. Google helped again, and I found out that to install a service pack for my IDE I had to define new local system security policies. It seems that those 450 MB of Visual Studio service pack did not only contain an upgrade for my messenger, but for the Windows also.

Yet another premature optimisation

Shared DLLs were a good idea, ten years ago. The technology has advanced enough to make a few megabytes on disk and in memory irrelevant. My current PC has several orders of magnitude more disk space and memory than the one I had 10 years ago, so I’m not really bothered if a DLL loads twice, but I do mind when I lose an entire day because of silly software dependencies. Code reuse was, and still is, a good thing – but shared deployments are not. Microsoft is not the only one to blame, I see the ‘sharing’ issue in enterprise software often (and I do it myself occasionally, to be fair). But never before did it strike me that shared deployment is a relict of the past, solution for a problem long gone, but we are still fighting against it in our heads. I’m not advocating memory leaks or taking up all available RAM and never releasing it, but the problem solved by shared DLLs is just like a scarecrow – simply not real.

Whatever Visual Studio, IE and MSN messenger have in common, it could easily be replicated three times and it would not make any real difference on system performance. Using shared kernel functions is undoubtedly justified, but I think that developers need to wake up to the fact that using shared components does more damage than good. So much memory and disk space is wasted on other issues that those few megabytes hardly make any difference. Like bit-packing and union structures, messing with shared DLLs without a good reason should not be regarded best practice any more, but as a premature optimisation.

 

Image credits: JMJVicente/SXC and Coby/SXC