Archive February 2008

All of the articles archived for the month that you have specified are displayed below.

.NET Sleepers

In the vast universe that is .NET, there is almost no way to know about everything you have right at your fingertips (literally). Every once in a while I come across something and have an 'ah ha' moment (and a subsequent 'Oops' moment when I think about something I did that I could have gotten for free.) So in an effort to help others avoid some sleepers, here are some great articles I have come across in my travels on random topics in the framework.

Tracing

Some of you may know about the static Trace class from .NET 1.0, or you may have written your own debugging support library, well some really cool Tracing support was added in 2.0 that you might not know about. Here's a good series on the topic:

Tracing Primer - Part I
Tracing Primer Part II(A)
Tracing Primer Part II(B)
Tracing Primer Part II(C)

The best part about really instrumenting your app or framework, especially a layered framework, is that, when debug time comes, you can configure the TraceListeners however you want (post-compile) and get just the visibility you need for debugging. Imagine tracing the order of execution through a layered stack - if each layer had its own trace channel (called a TraceSource), you could have them all write to the same trace file and see the execution of calls through the whole stack. For those working with WPF, you might also want to check out this.

Anonymous Delegates

Not necessarily a sleeper, but mysterious to some no less. Here is a series on Anonymous Delegates, they are a powerful concept, and look out for the new stuff in 3.5, it gets even better!

The implementation of anonymous methods in C# and its consequences (part 1)
The implementation of anonymous methods in C# and its consequences (part 2)
The implementation of anonymous methods in C# and its consequences (part 3)

Functional Programming, Lambdas

Here's a great series to get you thinking about some of the awesomeness that is .NET 3.5. I don't know if this could be called a sleeper because it's so new, but you shouldn't miss it. If 'Functional Programming' is boring to you, you should still read to check out some of the new C# 3.0 stuff.

Lambdas and Closures and Currying. Oh my! (Parts 1 - 4)
Lambdas and Closures and Currying. Oh my! (Parts 5 - 9)


Vista SP1


A couple weeks ago Microsoft made Windows Vista Service Pack 1 available to technical folks though the MSDN site. Honestly, I had been waiting on this for a while now. I had long noticed some 'quirks' in the original Vista that I was hoping would be fixed by the service pack. So when they made it available - I figured I would get right on it and download the update. Not wanting any 'accidents' that would cause disruption to my life - I decided to wait until the weekend to install it so I would have ample time to fix any issues that might arise. So I went to download it, pulled down the bootstrapping download manager and fired it up (on my Vista machine), it proceeded to crash. So I tried again, no luck. Ok, let's see if its the download manager - try it on my XP workstation - no problems. Ok, fair enough, over that hurdle. I'll wait until the weekend now and finish this up.

Ok, finally I go to run the update installer on my Vista machine. I get:

"Windows Vista Service Pack 1 cannot be installed on your computer because the language of Windows Vista you have installed is not supported or you have installed a language pack that is not supported. Windows Vista Service Pack 1 can only be installed on computers running the English, French, German, Japanese, and Spanish versions of Windows Vista or computers running only those language packs."

So, I'm thinking, "Why would I have ever installed another language pack, I only want to use my computer in English." Then, I checked in 'Control Panel->Regional Something Settings' and, sure enough I had like 16 language packs installed.

#ifdef RANT

So I thought about why I would have installed those (if it was me that installed them) and realized that the only plausible reason was to make 'Windows Update' stop bugging me every 15 minutes to install them. (I also hate that Java thingy that thinks I care about updating to the latest Java every 3 days.)

#endif

Ok, so I guess I need to uninstall everything that I don't need (i.e. everything except English). So I select all 16 of the non-English language packs and select 'Uninstall'. This should be easy... It works on it for about 15 minutes and then tells me it was only able to uninstall Bulgarian (or whatever) - and that it must restart TO FINISH uninstalling. So it restarts - on its way up it does 'Step 2' and 'Step 3' for about half an hour. Ok, back into Windows now, I go back to 'Control Panel->Regional Something Settings' and look and all the language packs are there still, minus one. Oh boy, this is going to be fun, I try to select all of them and nope, one at a time (~45 minutes each - and its not like I have a total junk machine, its a 2.2ghz DualCore with 2gb RAM, 7200 rpm HDD). So, now its Sunday - I have them all off the machine - or so I think. Yes...time for SP1! Nope,

"Windows Vista Service Pack 1 cannot be installed on your computer because the language of Windows Vista you have installed is not supported or you have installed a language pack that is not supported. Windows Vista Service Pack 1 can only be installed on computers running the English, French, German, Japanese, and Spanish versions of Windows Vista or computers running only those language packs."

Ok, I'm pretty ticked now. I just spent an unreasonable amount of time here messing with this thing. I dig around, my list of installed language packs is showing nothing except English, but I look (somewhere else) and apparently I can select Portuguese for the display language, even though its not showing in my list. So, in despair, I reboot, now I see Hungarian in my list of installed language packs. Whew... So I go though and 'try' to uninstall. Nope, still:

"Windows Vista Service Pack 1 cannot be installed on your computer because the language of Windows Vista you have installed is not supported or you have installed a language pack that is not supported. Windows Vista Service Pack 1 can only be installed on computers running the English, French, German, Japanese, and Spanish versions of Windows Vista or computers running only those language packs."

I try a couple more times and then Google for a while until I stumble upon http://support.microsoft.com/KB/947506. I download that, run it and then uninstall the languauge packs that now show up in my list - and I'm in, SP1! Apparently, 'TrustedInstaller' somehow got my language packs corrupted during install and I didn't even know it...

MORAL OF THE STORY - hope this helps people avoid the pain - if you get the message about the language packs, you might want to try KB947506 before you get too flustered.

Ok, now the good news, SP1 did fix a couple of my noticed 'quirks' in Vista. Network transfers that used to take 12 minutes (3 on XP) seem to be about right now. The 'Calculating Transfer' stuff that you see when you move things around on a network are MUCH QUICKER (I think it starts transferring right away now like it should), Hibernation / Sleep / Startup seem improved, and 'Windows Explorer' now only crashes 3 or 4 times a day (which is a big improvement.)

Also, if you want to hide an update that is being pushed on you by 'Windows Update', you can just right click on it in the list and select 'Hide' and it will stop bothering you about it.

Progress sometimes comes in baby steps...