Tools

A New Version of FxCop

After a very long time indeed, we finally have a new version of FxCop to play with.

While the Source Code Analysis tool integrated into Visual Studio has been upgraded, the standalone version of FxCop has gone a long time without any updates at all.

Working with fxCop

So I've finally managed to get fxCop officially adopted on a work project (*). Better yet, thanks to an upgrade, we now are using the Ultimate Edition of Visual Studio: I no longer have to use the command line of fxCop . Instead, It's integrated right into the build.

Of course, no improvement goes unpunished.

Gource for Software Visualization

At this weeks .NET user group, a friend mentioned Gource, a tool that generates a dynamic visualization that shows how a project evolves over time, based on the commits made to source control.

After finding one movie on the Xero blog, I decided to have a go and see what it looked like when run over a large project I've worked on for the last couple of years.

It looks gorgeous:

Things to install on a new machine

Roy Osherove has posted a list of things he installs on any new developer machine, including links so you can find out more.

An Obscure FxCop feature

This has to qualify as an obscure FxCop feature:

DoNotDeclareReadOnlyMutableReferenceTypes is a rule that checks for visible read-only fields that are mutable reference types (classes). A mutable type is a type whose instance data can be changed once it has been constructed.

Adding AzMan Operations

If you ever find yourself using AzMan and can't work out how to add a new operation (as I did today), here's the key (and hard to Google) step.

Wierdness with Fitnesse

I ran into something really weird with FitNesse (the acceptance testing framework) today.

Chances are, it's something I've done wrong - but I can't work out what. If you know, please comment below!-- Updated below with the solution.

Boiling the whole thing down into a simple test case, what I've found is the following.

CI, Builds and NAnt

The ISerializable blog post "The difference between continuous Integration tools and automated build tools" has a good breakdown of the difference - one does the build, the other triggers the build.

At the moment, I'm using TeamCity and NAnt for my builds.

Sequence diagrams in Visual Studio 2010

This is pretty neat - Sequence Diagram generation in Visual Studio 2010.

What a great tool to have available when trying to grok a codebase.

MappingLists with NHibernate

Here's a subtlety of NHibernate mapping that I ran into this morning.

When you map a one-to-many relationship as a list, you can have null values in that list when loaded.

Synergy

synergyLogo.png
Synergy is a useful wee utility that allows you to share a single keyboard and mouse across multiple machines - kind of a software equivalent to a KVM switch, but for keyboard and mouse only. This is very useful if you have two or more machines located next to each other. While I've used it to link two Windows XP machines, Synergy has support for a wide range of operating systems, including Macintosh, Linux (and other Unix variants) and the Windows 9x series.

Here's a walkthrough of how I set up Synergy to share my keyboard and mouse between two Windows systems.

First Impressions of Google Wave

googleWave.png

At their recent developer conference, Google gave the delegates a sneak peek of their new product, Google Wave. You can see the Google Wave demonstrations for yourself on YouTube.

Disclaimer: I've not used Google Wave at all, just viewed the release video and read a bunch of other commentaries. My comments below (in italics) are based on their developer early access preview and things are likely to change markedly between now and release.

So, what is Google Wave?

Is CruiseControl.NET worth the effort?

Let me begin by saying that CruiseControl.NET certainly delivers on it's core promise as a Continuous Integration server - once everything is properly configured, the system ticks over well.

However, "Once everything is properly configured" is the sticking point.

False positive from Gendarme?

I'm coming up to speed with Gendarme, the open source assembly inspector.

Mostly, the tool seems to deliver on its promise, but I'm having a problem with a false positive.

The EnsureLocalDisposalRule rule is intended to flag situations where Disposable instances aren't properly cleaned up.

StyleCop for ReSharper

styleCopForResharper.png

Now this qualifies as a great idea – integrating the code layout enforcement of StyleCop with the dynamic at-your-fingertips goodness of ReSharper: StyleCop for ReSharper 

Definitely something to download and try out, especially since they’ve got automatic fixes for many of the rule violations.

Going to Oslo

I’ve started looking into Oslo, the new model driven architecture from Microsoft.

In many ways, Oslo looks promising – finally, a way to move to a higher level of abstraction. If they do this right, they really could achieve their goal of improving developer productivity 10x.

What I’ve seen so far does raise some interesting questions though …

Tracking Warnings with TeamCity

A project I’m involved with is using JetBrains TeamCity as the continuous integration environment.

One of the metrics we wanted to track on this project was the count of warnings produced when compiling. We hoped that, by giving the warning count visibility, we’d be able to gradually reduce the number of warnings over time.

It turned out that adding this into the statistics tab of our TeamCity environment was pretty easy – easier in fact, than counting the warnings.

Reflector

Lutz Roeder, author of the Reflector tool, has sent out an email burst with this announcement:

"After more than eight years of working on .NET Reflector, I have decided it is time to move on and explore some new opportunities."

Roeder's Reflector software is one of my must have tools - a key instrument that helps me to answer "Why does it do that?" and "Is it possible to ...".

It's likely that the return address on his email burst is unmonitored, but just in case, I wrote back to say:

Visual Studio Shortcuts for StyleCop

It turns out that there are shortcuts for the StyleCop analysis window in Visual Studio. It's just that no-one seems to have documented them.

NUnit Best Practices

I'm always looking to do things better tomorrow that I did yesterday - and to that end, I find other peoples "Best Practices" posts endlessly valuable ... not that I always agree with them of course, but I do enjoy being challenged to think.

Go read NUnit Best Practices, a fairly recent post by Scott White.

How many of Scott's 7 NUnit practices do you agree with? How many do you follow? Why?

.NET 3.5 SP 1 problems ...

CEP00007.png

It seems that .NET 3.5 Service Pack 1 has a few issues ...

... First I heard was some postings on a New Zealand dot.net.nz mailing list

... Then I saw a post by Oren Eini with a list of bugs introduced by the SP - one of which breaks Rhino Mocks.

The Best RSS Reader

After using both RSS Owl and RSS Bandit for simply ages, I've finally found an RSS Reader that works the way that I want - and it was under my nose the whole time.

Mozilla Thunderbird.

That's right, Thunderbird. The RSS Reading experience is dead simple - you subscribe to a bunch of feeds, and they show up as mail folders. New postings appear as new messages. Couldn't be easier or simpler.

Why use StyleCop?

One question that I've been asked recently is Why use StyleCop?

I believe that StyleCop is another example of a trend towards automation that has existed in our industry for decades.

Consider these two examples ...

Stylecop Documentation and Supression

The current download of StyleCop doesn't include any documentation that tells you what standards it enforces.

Living with StyleCop

I've been trying an experiment - having integrated StyleCop into my build scripts (using StyleCop.cmd), I've been working to reduce the number of violation messages that it reports.

The key is that I haven't spent very much time making changes just to keep StyleCop happy - rather, I've been continuing development as normal, writing code, fixing bugs and so on, but with half an eye on StyleCop's metrics.

More on StyleCop

Over the weekend I spent more time with StyleCop, bringing a representative sample of code in line with its recommendations.

Fridays intuition has proven correct - there are a handful of rules that I'll disable, but most of the rules are useful, leading towards more maintainable code.

One frustration I found was the lack of a commandline version - the standard download includes Visual Studio and MSBuild integrations, but no commandline version.

So, I've written one.

As soon as I've finished testing it, will post here as a download with source.

StyleCop for C# Coding Standards

StyleCop, newly released by Microsoft, is a tool for C# developers.

In some ways similar to stable-mate, fxCop, StyleCop analyses your C# source code for compliance against a set of rules that embody Microsoft's own style conventions for C# code.

Yesterday I trialed StyleCop against a representative sample of my own code, with interesting results.

Sequence Diagrams for Reflector

Lutz Roeder's .NET Reflector has to be one of the most useful tools in my bag of tricks - the ability to spelunk into the depths of an assembly to answer a tricky question has value beyond words.

Better yet, Reflector has a plug-in architecture, allowing others to extend the tool in new directions.

Continuous Integration with TeamCity

I've been spending some time recently setting up TeamCity, the Continuous Integration server from JetBrains.

Why TeamCity and not CruiseControl.NET?

In my opinion, TeamCity is far more approachable and usable right out of the box. Configuration is through a polished web-based front end. Documentation is pretty good, but most of the time you don't need any docs at all because the UI walks you through the process.

Git

Today I was listening to a recent episode of Hanselminutes, where Scott Hanselmann interviewed three guys from Planet Argon about the source control tool Git. I originally heard about Git some time ago and didn't pay it any heed - having heard the show and done some follow-up research, I'm beginning to think that Git would be worth further investigation.