.Net

  • May 8 2009 - Simple Extensibility in .NET ... I’ve used this approach a few times when I essentially need a really simple plugin / provider model within my applications so I thought I’d jot down the relevant details here for posterity using an old project for adding post commit hooks to subversion. Consider this a somewhat simplistic approach, not suitable for production code without a bit more plumbing. If you are going all out and need true add-in’s for your .
  • Apr 30 2009 - From test spy to Verify() with Moq ... Moq is now my favorite unit testing framework for .NET, and a great poster child for the power of the lambda expression support added to C#. If you are not doing unit tests or Test Driven Development you should, and if you already are and have not checked out Moq, you should. My tests previous to Moq were using NMock, a very handy tool that looks like a lot of other mock frameworks.
  • Feb 18 2009 - decision making : flip a coin then check your gut ... I once heard an interesting anecdote about how to make a difficult decision between two paths. When you find yourself spinning, alternating between one choice and then the other, it can be helpful to simply assign each choice “heads” or “tails” and flip a coin. When you reveal what side the coin landed on pay attention to your emotional reaction… are you relieved or are you disappointed?  Try it sometime, it really can work.
  • Sep 6 2008 - frequent beachballs in mac os x caused by bad fonts ... I’ve been testing the latest nightly builds of firefox 3.1 over the past few days and while generally impressed with the performance improvements in javascript was quite disapointed that it was causing my iMac to go into frequent hangs where I would see the spinning beachball of death for many seconds before I could continue working again. It became bad enough that I finally had to ditch my firefox testing efforts.
  • Jul 17 2008 - Microsoft's add-in framework and the need for diligence ... We’ve recently put Microsoft’s managed add-in framework (part of .NET 3.5) into very effective use building a plug-in system for a large asp.net application at work. Essentially the framework in place allows other developers (and our own team for out of stream releases) to develop new functionality for our platform that runs the entire life-cycle for a given widget. In our case for this particular widget we’re talking about plugins being responsible for up to 4 asp.
  • Jun 26 2008 - Enough rope to hang yourself (C# Extension Methods) ... So I ran into an interesting “gotchya” with C# extension methods tonight. And of course it happens at the 11th hour on a project that is being demoed at 9:00am tomorrow morning. Of course. Extension MethodsExtension methods are a really cool new feature of C# that were introduced in version 3.0 of the language. Essentially they are static methods that act like instance methods, allowing you to extend objects you don’t own.