Friday, May 18, 2007

Oh, The Places You'll Go

Leaving a job is never easy, especially when you've been a part of moving the company forward.


Recently, I learned that a lot of the frustrations that I had with my previous position were being addressed directly

They are moving forward, implemented Scrum and a lot of the changes I was pushing for, and have turned the development team into a highly motivated, effecient team with a great sense of camraderie.


And that's awesome. I just wish I could be there to see it happen. It's a shame when the changes can only be brought about with a major catalyst, such as someone leaving the company.


Best of luck, team A.D.D. - I know this is going to be great for you all.

Thursday, May 17, 2007

Get XmlDocument from a class

So - I've been trying to find an easy way to add a ToXml() method to a lot of objects lately. Here's what I've come up with:



MemoryStream ms = new MemoryStream();
XmlWriter writer = XmlWriter.Create(ms);
XmlSerializer xs = new XmlSerializer(this.GetType());
xs.Serialize(writer, this);
XmlDocument doc = new XmlDocument();

// Need to start at the beginning of the MemoryStream
ms.Seek(0, SeekOrigin.Begin);

doc.Load(ms);
return doc;


The Seek method took me the longest to figure out. I kept getting a "Root node is missing." exception.


Hope this helps someone.

Friday, May 11, 2007

CodePlex and Subversion

As I've posted about before, Subversion is a great tool. It's

  • Open Source
  • Free
  • Fast
  • Easy

Rob Conery and his awesome SubSonic project are hosted on CodePlex, which uses TFS as it's backend. I'm working with TFS now (at work) and it's a great solution for the teams we have here. But, I don't think it's appropriate for the CodePlex community.

And Rob's losing contributors - something no open source team wants to happen.

So - here's my two cents. CodePlex should switch to Subversion. It's a much more appropriate source control tool (for this type of collaboration) and I'll even go out on a limb here and say that if they do switch, I'll personally see what I can do to start contributing to SubSonic.

Wednesday, May 09, 2007

Monday, May 07, 2007

Team Hanselman Fights Diabetes

As I've mentionend before - I'm a Type 1 Diabetic.

And Scott Hanselman is as well. And he's raising money to fight it. Which is awesome.

Team Hanselman - Fight Diabetes

Friday, May 04, 2007

Everything I ever needed to Know about Database Design, I learned from .netTiers

OK - not really. But, it's a good play on words.

I recently evaluated CodeSmith and .netTiers to help me develop the middleware for a project I had been working on. I'd like to talk about some of my experiences, and what I learned.


  1. .netTiers doesn't like tbl_.

    Originally, the database had been developed with the tbl_table_name convention - and although there's a StripTablePrefixes in .netTiers, it seemed like it was being ignored. I remedied this problem by scripting up the entire database, applying Regular Expression Magic™ to change the table names to PascalCase, and then re-created.

  2. Don't name any of your tables anything that might be a type in .netTiers framework - like Entity, for example. Originally, we had thought to have a generic "business entity" table that held customers and system users. This turned out to be a bad idea.

  3. Relationships and indexes are awesome. .netTiers will generate any "Get" methods based on any index that return strongly-typed Entities or List collections, depending on if the index is a unique constraint or not. Very cool. Also, you can have GetCollectionFromRelationship() methods that do the same thing.

    Plus - you've made a head start on optimizing your database.

  4. If your schema has problems, and .netTiers doesn't compile - better to find out now, rather than later. This was a rather rude awakening for me - I thought I had a grasp on some DB design. I now have a much better one.

Overall - highly recommended. It doesn't come cheap (you need a licensed version of CodeSmith), but if you're already using CodeSmith - definitely give this template a shot.

One other caveat - it's open source, which is great. But, the documentation is a work in progress.

Dynamic Ducks! Dynamically! (Functionally too!)

So - with all this talk about the DLR and dynamic languages becoming first class citizens in the .NET Framework, I'm going to make a commitment. Here. Where about 10 people read.

I'm going to really learn a functional, dynamic programming language. I'm going to really understand lambda's. I'm going to figure out why those Ruby, Smalltalk, Python, and Haskell guys all start frothing at the mouth. I may even figure out this JavaScript thing.

I did get a B.S. in Mathematics - so I'm not too worried. Being a math guy and hearing about these functional languages intrigues me. Plus, with C# 3.0 coming out soon, I might even be able to apply this skill to my day job.

I don't know what I'm going to do yet, but I'm going to do something.