Home  |  Photos  |  Blog

 Saturday, April 19, 2008

After installing this cool new Windows Media Center plugin, "Movie Browser", I noticed that its data store uses a proprietary XML schema, so I wrote a quick and dirty console app to generate the XML data file based on a common directory structure containing MyMovies.xml files used by My Movies and many other plugins. Of course, the developer has said he will eventually support the MyMovies.xml format, but until then...

The app was written in .NET using Visual C# 2008 Express Edition (using LINQ and other 3.0 stuff if you're a developer type). You can download a copy of the source or the .exe directly. It requires .NET 3.5. And the usual disclaimer...the app was only tested on my machine using my movie collection. It is not supported, it may hose your machine, YMMV, etc....blah, blah, blah.

To run the app, open a cmd window (run as administrator on Vista) and type something like the following. It will create a backup of the output file if it already exists.

MovieBrowserMetadataTranslator.exe "C:\\MovieCollection\\" "C:\\Windows\\ehome\\MovieBrowser\\Recent.xml"

Enjoy!

4/19/2008 4:16 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Wednesday, March 29, 2006

Lutz Roeder's tool, Reflector, now supports reading local variable names from PDB files.  Awesome stuff!  Get it here.

3/29/2006 11:18 AM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Friday, January 27, 2006

Thanks to Aaron Stebner's post, I was able to easily get Visual Studio .NET 2005 to provide IntelliSense (based on XSD) for custom XML files. The best approach seems to be dropping a new schema catalog file along with the referenced XSD file(s) into the %VsInstallDir%/xml/schemas/ directory. It appears that VS monitors this directory for changes. This approach is nice because it doesn't involve updating any of the default VS installation.

1/27/2006 6:24 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Friday, January 13, 2006

Anders has a good article on how to exclude generated .NET code from code coverage analysis using a tool called IL Merge.  This solution apparently is not supported in VB.NET.

1/13/2006 4:17 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Tuesday, October 04, 2005

Today at work I came across some new APIs in Whidbey that I found to be quite useful when dealing with generic types.  System.Type.IsGenericType and System.Type.GetGenericTypeDefinition().  Have you ever wondered how to reflect if an object's type is a specific generic type definition (wait...is that any oxymoron :))?

Suppose we have some generic code:

class Foo {}

static void Main(string[] args) {
  System.Collections.Generic.List<Foo> fooList = new System.Collections.Generic.List<Foo>();
 
}

and now we want a method of determining at runtime if the object, fooList is a generic list:

static void Main(string[] args) {
  System.Collections.Generic.List<Foo> fooList = new System.Collections.Generic.List<Foo>();
  Console.WriteLine(IsObjectGenericList(fooList));
}

static bool IsObjectGenericList(object o) {
  Type t = o.GetType();
  return (t.IsGenericType && t.GetGenericTypeDefinition().Equals(typeof(System.Collections.Generic.List<>)));
}

I found these APIs useful when working with various generic types in my system.  For more information on this subject, look here.

10/4/2005 6:58 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Tuesday, August 16, 2005
Scott Gu has posted about the upcoming fixes to the web projects in Whidbey.  It looks like it may be a good change afterall :)
8/16/2005 9:56 AM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Tuesday, June 28, 2005

Insightful article on Java Generics from Ken Arnold.  I like the idea of a "complexity budget".  I have certainly been involved with projects where I wish the design complexity could have been quantified and budgeted.  As far as generics go, my own view is that there are a limited number of use cases for writing generic code.  Generics may possibly help simplify some complex design pattern implementations.  I can only see, at least for now, a limited number of common patterns expressed generically.  Trying too hard to leverage a "one size fits all" approach to programming will lead to the production of more complex and sloppier code.  To developers who are considering using generics - please use sparingly!

6/28/2005 5:17 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Friday, May 06, 2005

Four members of the Microsoft CLR team (Brad Abrams, Jason Zander, Kit George, and Claudio Caldato) have come to Atlanta this week to visit customers, gather feedback, promote the .NET community and share vision and direction.

I had the wonderful opportunity to meet these guys and I must say that they are all a class act. These guys are not only very cerebral, they are very cool as well. I want to thank them for caring about the users of their work and being willing to be open and giving of themselves. Thanks for coming guys...keep up the great work!

5/6/2005 3:07 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Thursday, April 28, 2005

I agree with Aaron Skonnard's thoughts on the contract-driven approach to SO development. I especially enjoyed Joel Spolsky's comments on leaky abstractions. He's right that in some sense, being a proficient programmer is becoming more and more difficult (especially in terms of troubleshooting/debugging) with the increasing number of leaking abstractions we're building on top of.

I've often struggled with how to address all of the various abstraction boundaries when I've taught programming classes (ASP.NET being the king-of-abstractions). How many layers down do the students really need to grasp in order to become good developers (really all the way down to the TCP/IP stack, but there's never enough time).

Anyway...Aaron, nice comments on the much belabored "contract-first/code-first" debate.

4/28/2005 9:50 AM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Wednesday, April 20, 2005

Check out some of the videos of one of my software heros, a distinguished engineer at Microsoft, Anders Hejlsberg.

4/20/2005 1:37 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Thursday, April 14, 2005

Here's another one of the crazy videos.  The end makes it worth it :)

4/14/2005 9:37 AM Eastern Standard Time  #    Disclaimer  |   |  Trackback
 Thursday, April 07, 2005

I've been playing with Whidbey (VS.NET 2005) for a couple of days now and just found this new feature.  I must say I'm quite impressed.  Microsoft has made it so easy to debug code that now we really have no excuse for writing bugs into our software :)

4/7/2005 4:27 PM Eastern Standard Time  #    Disclaimer  |   |  Trackback