This week marks my 5 year anniversary at Microsoft. Five years ago, I stopped being a “real developer” and became an evangelist. Ok, I started with a short stint as a SQL / BizTalk Technology Specialist (what other companies call “pre-sales engineer”), but I’ve pretty much been focused on developers the whole time. I used FxCop back in my days of “real development.” As an evangelist, I spend lots of time writing demo code and samples. Today, I had a rude awakening that I’ve gotten a little sloppy. I’ve used “it’s demo code” as an excuse so many times. In many ways, I think it is a fair excuse. However, I think I have leaned on that crutch a little too long.
We are going through and cleaning up the OGDI codebase preparing it for CodePlex. Part of our internal review is to use code analysis to help us identify refactoring opportunities. Yea, Yea, Yea. I know. We should have been using it all along.
As part of preparing for our code review, I wanted to find out what else is available in the way of analysis tools that are free. I also wanted to review the capabilities in Visual Studio 2008. Here’s what I came across:
Writing Quality Code (various subsections on code analysis)
StyleCop Blog (Source Code Style and Consistency Tool)
I also watched this PDC session:
I’d definitely recommend checking out these resources and using the tools. I hope to learn a lot from using these tools. I also plan on forcing myself to use them as I build out demos, samples, and work on projects in the future.