April 2009 Blog Posts

Mirroring output to console and a file

I’ve been doing some more batch file work recently.  I keep getting frustrated that batch files don’t have a way to send output to both the console and a file.  I decided to write a little console application to do this for me. This is largely untested – it’ll be going through the gauntlet tomorrow at work.  What do you think – is this a reasonably valuable little utility?  Was this the best way to do it? 1: class Program 2:...

posted @ Tuesday, April 21, 2009 12:19 AM | Feedback (2)

Creating Derived Class Instances using MEF

I am building an extensible application that can handle any kind of product data.  Back in February, I started looking into a Generic Data Model for Custom Product Types.  After getting some feedback from my blog, on StackOverflow, and having some conversations with a few people, here’s the schema that I ended up with.   Ugly.  Yes.  But this lets me store a single product record, such as “Light bulb,” but have many differently configured light bulbs in the product details table, such as a 45-watt halogen flood light.  The Product schema can be extended to include...

posted @ Tuesday, April 7, 2009 2:40 AM | Feedback (8)

I might like IE8 Accelerators after all

I was completely annoyed by IE8’s accelerators until just a few moments ago.  I like this, very much: So long merriam-webster.com search provider (which is so unusable that I’m not even going to make that a link).

posted @ Wednesday, April 1, 2009 1:59 PM | Feedback (0)

Validation Exceptions in Silverlight

With the Silverlight 3 Beta SDK and .NET RIA Services, a lot of people are starting to utilize the System.ComponentModel.DataAnnotations library to add validation metadata to their entities.  Something that has tripped up some people is the use of exceptions for validation errors, where Visual Studio breaks with a user unhandled exception. As Keith Jones reported, Silverlight 3 uses exceptions to notify controls when validation has failed.  This means that many users will see Visual Studio break when these exceptions occur and be led to believe something has gone wrong.  But everything’s doing what it should.  If you hit...

posted @ Wednesday, April 1, 2009 10:33 AM | Feedback (6)