October 2009 Blog Posts

What MEF Needs…

OK.  So this is going to be a cross between a rant and constructive criticism.  I’m sure that Microsoft has great reasons that they created MEF (Managed Extensibility Framework) the way that they did, but it’s just tantalizingly close to perfection, so I’m going to complain about it anyway! For two of my recent articles, I’ve been working with MEF to enable an addins platform for a utility runner.  MEF does some nice things: It makes it easy to designate classes as extensions (define an addin) It makes it easy to...

Extension Methods

One of the cool features introduced in .NET 3.0 was the concept of extension methods.  Subclassing is one way to add new methods and properties to an class, but it’s not available if the class is sealed.  It also doesn’t provide the new members unless you create objects of the subclass. Extension methods let you add new members to a class without actually extending it.  You don’t get access to private or internal methods, but you add a convenient way to access related methods. Most of the convenient LINQ features are implemented by means of extension methods on...

Command Prompt Shortcut

I just noticed something cool.  Anytime I’ve ever needed to paste a command into a command prompt I’ve always used the context menu Paste command:   I’m not sure how I missed it until now, but if you simply right-click in the command area (the black part) it instantly pastes it!  I did a quick search on it and it’s not a new feature, but I never noticed it. Another cool Command Prompt trick I recently learned is the history menu.  Just press F7 to see your history, then use arrows and the Enter key to select:...

Windows 7 Explorer Lockup

I’m so happy!  I’ve had a chronic problem with Windows 7 for a build or two now (including RTM).  Every time I would create a new folder in Explorer, it would hang for a minute or so before coming back.  Then I realized that it was actually the rename operation that was the culprit.  Any file rename would cause the window to hang.  Strangely, if I checked at a command prompt it was immediately renamed.  The final weirdness was that a rename worked instantly from a command prompt.  So what was Explorer doing?  It turns out that the...

«October»
SunMonTueWedThuFriSat
27282930123
45678910
11121314151617
18192021222324
25262728293031
1234567