Code Contracts: Now with IntelliSense

Using the Code Contracts Editor Extensions for Visual Studio 2010, available as a free download as of today, you get code contract details in the IntelliSense pop-​​up of your contracted methods. Currently it only works with C# code.

Very nice!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

Easy to fix issue between NServiceBus and Code Contracts

If you use NServiceBus' Configure.With fluent interface, and you use Code Contracts in any assem­blies that your NServiceBus config­u­ration uses, then configure Code Contracts in those assem­blies not to build separate code contract assem­blies, because this confuses NServiceBus.

Configure.With scans all assem­blies for imple­men­ta­tions, and if any imple­men­tation you have also generates code contract assem­blies, then basi­cally you will end up with 2 assem­blies that expose the same classes — one with the actual imple­men­tation, the other with the code contracts. This confuses NServiceBus and you'll get an error:

There is a component already registered for the given key

The simple solution is to go to the "offending" assembly project's Properties, select the Code Contracts tab, and in the Contract Reference Assembly drop­downlist, select "(none)" instead of "Build". The contract code will then be compiled straight into the code assembly rather than sepa­rately, and this will fix the issue with NServiceBus.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments (1)

Tfs team launches beta of Scrum template for Team Foundation Server

The Team Foundation Server team has just released the first beta of an all-​​new Scrum template for TFS 2010. This template competes with MSF Agile 5 up to some point, but more specif­i­cally it competes with EMC2's Scrum for Team System v3.

My first impression is that the new Scrum template is indeed a much better match for Scrum than MSF Agile 5, which was also targeted towards Scrum teams. It seems a simpler imple­men­tation than EMC2's (formerly Conchango's) template. Both are free.

Right now I am using EMC2's template on a project, and my client is about to roll out TFS 2010 on a larger scale, so for me the timing is just right. The next few weeks, we'll have a look at the new template and decide what to use for the next batch of projects.

It will be inter­esting to see whether Scrum teams every­where will adopt the more powerful Scrum for Team System v3 or will prefer the simpler, but less powerful, "standard" Microsoft imple­men­tation. Time will tell. I'd be most inter­ested to hear from you what you prefer, and why.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

New version of Code Contracts

Microsoft DevLabs released a new version of Code Contracts yesterday, for both .NET 3.5 and 4.0 frame­works. You can download it at http://​msdn​.microsoft​.com/​e​n​-​u​s​/​d​e​v​l​a​b​s​/​d​d​4​9​1​992.aspx.

Included in the new build are bug fixes and some nifty new features, such as the [ContractArgumentValidator] attribute to mark helper methods that perform if-​​then-​​throw style para­meter vali­dation (so the tools can recognize legacy "requires" methods) and the [ContractAbbreviator] attribute to mark methods that contain reusable Contract.Requires and Contract.Ensures calls.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

Getting started with Scrum for Team System v3

Crispin Parker has written a very inter­esting post on the basics of EMC2's free Scrum for Team System v3 process template. Recommended!

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

Scrum for Team System v3 is released

EMC2 (formerly Conchango) has released its much-​​awaited Scrum for Team System v3 template for Microsoft Team Foundation Server 2010. The template is available in 2 versions, x86 and x64. This is great news for us Scrum for TFS fans, who have been using the RC version for a few months now.

See the Process Guidance to see what features this template provides. It is quite different from what MSF Agile 5, which is also based on Scrum, provides. Some concepts such as accep­tance test work items are shared.

The Scrum template also works with the new TFS 2010 features such as project collec­tions and events.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

Cool, handy and free tools for Visual Studio 2010 and Team Foundation Server 2010

TFS Power Tools (April 2010)

The latest drop of TFS Power Tools supports Team Foundation Server 2010, and is free to download now.

This pack contains many useful tools, such as the Microsoft Team Foundation Server 2010 Best Practices Analyzer, to help you diagnose instal­lation or config­u­ration problems.

There is the Custom Check-​​in Policy Pack, which is a collection of check-​​in policies you can apply to source control. The policies included are:

  • Changeset Comments: If active, users cannot check in source code without adding a comment about the changes being checked in.
  • Forbidden Patterns: If active, users cannot check in source code that matches (config­urable) filename patterns. This can prevent users from checking in source control config­u­ration files, for instance.
  • Testing: If active, users cannot check in source code if specific test lists are not success­fully run before checking in.
  • Work Item Query: Allows the build­master to configure which work items are acceptable for check-​​in asso­ci­ation. For instance, you may allow that users asso­ciate check-​​ins with Sprint Tasks and Bugs, but not with Product Backlog Items or Sprints, etc.

The Process Template Editor allows you to visually modify your process template. For instance, you may modify the state flow of a bug, to change the bug's life­cycle. You may add fields to forms, create your own work item types, etc. You can also do that without the PTE, but then you have to manually modify XML files and keep them consistent.

Furthermore, the Team Explorer is extended to enable launching an instant Messenger by double-​​clicking on a team member's name, for instance, and it now includes the Alerts Explorer on the collection level.

PowerCommands for Visual Studio 2010

Another cool and free plug-​​in for Visual Studio, PowerCommands contains shortcuts to collapse all projects in the Solution Explorer, close all open panes, copy/​paste a class easily, copy/​paste refer­ences, etc. A real time­saver! Available for download now.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

Code Contracts: Static checking doesn't work on Attributes

Code Contracts' static analyzer is a great feature, but of course it does have its limi­ta­tions. Some things it just cannot check at compile-​​time, and other things it can… but doesn't (always).

One example of where the static analyzer could check, but doesn't, is on attribute contracts.

Say you define an attribute with code contracts in it, like so:

using System;
using System.Diagnostics.Contracts;

namespace CodeContractsTest
{
    ///

    /// My super validation attribute.
    /// 

    public class SuperValidationAttribute : Attribute
    {
        public SuperValidationAttribute(string pattern)
        {
            Contract.Requires(!string.IsNullOrEmpty(pattern));
            Contract.Requires(pattern.Contains("$"));
            Pattern = pattern;
        }

        ///

        /// Gets or sets the pattern to use.
        /// 

        public string Pattern { get; set; }
    }
}

Then when you use that attribute, the contracts will not be stat­i­cally checked; i.e., if you use the attribute wrongly, you will not be warned at compile-​​time.

Microsoft is aware of this issue, and hope­fully it will be fixed in an update soon.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments (2)

Team Foundation Server 2010 Single-​​Server Installation Requires 2 Gb Memory

If you want to install TFS 2010 on a single-​​server instal­lation, be advised that Microsoft deter­mined that the minimum amount of available RAM should be 2 GB (it was 1 GB with the Beta and RC versions).

Microsoft's own research has shown that over 50% of all single-​​server instal­la­tions of the Release Candidate of TFS 2010 is on machines with less than 2 GB of RAM. These machines have to increase their memory before upgrading to RTM, or the new installer refuses to install.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments off

First Impressions: Scrum for Team System 3.0.3698.00 with Team Foundation Server 2010

A while ago, I installed a pre-​​release version of EMC's (previ­ously Conchango's) Scrum for Team System v3, using the RC version of Team Foundation Server 2010. Here are my first impressions.

Installation

Installation was a breeze. I installed the Process Template MSI on our server without a hitch.

Our envi­ronment was very simple, though:

  • VMWare virtual machine, 2 GB RAM, single "CPU"
  • Windows Server 2008 R2 x64
  • TFS 2010 RC

Configuration

After instal­lation, the SfTS Process Template Manager started and it was just a matter of clicking a few buttons to deploy the new templates to our existing Team Project Collection.

After that, we could create a new project based on the Scrum template using the Visual Studio Team Explorer.

Work Item Types

The first thing you notice after creating a new project, is that the Scrum template contains more types of work items than MSF-​​Agile:

Work Item Type Scrum MSF Agile
Acceptance Test Yes No
Bug Yes Yes
Impediment/​Issue Impediment Issue
Product Backlog Item Yes Yes ("User Story")
Acceptance Test/​Test Case Acceptance Test Test Case
Release Yes No
Shared Steps Yes Yes
Sprint Yes No *
Sprint Backlog Task Yes Yes ("Task")
Sprint Retrospective Yes No
Team Sprint Yes No

* : MSF Agile uses TFS' concept of an Iteration, but does not expose it as a Work Item.

We see that both templates, while supporting Scrum and being similar, approach the use of TFS differ­ently. In TFS, every work item type is trackable, and you can calculate statistics and run reports on it. This means that the Scrum template can easily track and compare releases, sprints and even retro­spec­tives. You can also specify which Release each Sprint belongs to.

I think it's unfor­tunate that MSF Agile 5 does not have a work item defi­n­ition for Retrospective, but luckily, SFTS3 does.

Let's have a look at some of the Scrum template's work item types:

Work Item Type: Product Backlog Item

The MSF-​​Agile template's standard type for filling up the Product Backlog is the "User Story", whereas in Scrum it's the "Product Backlog Item". I think the "PBI" notation is better; after all, you don't only want to add User Stories to the PB.

The input form for a PBI is nice, as you can see below:

Scrum Template for Product Backlog Item

Scrum Template for Product Backlog Item

I prefer this over the MSF-​​Agile template because it leaves me more room to type my Description, History is a separate tab, and "Feature Scope" to me is clearer than "Area" — even though it is the same thing.

Work Item Type: Acceptance Test

When writing a user story — sorry, a PBI — you also add one or more Acceptance Tests that define what criteria need to be fulfilled for the PO/​QA to accept the PBI as "done".

Scrum's Acceptance Test template is almost iden­tical to MSF-Agile's Test Case. In the former, you can link any other work item to a test as a source of failure (such as a contra­dicting user story). In the latter, you can add a priority to the test. Both features are nice.

Areas and Iterations

The Scrum template does not prepop­ulate these TFS value trees. I think this is a good thing; it annoys me that MSF-​​Agile prepop­u­lates the Iterations tree with 3 iter­a­tions, including report types, when I want to call my iter­a­tions "Sprints".

Work Item Hierarchy

The Scrum template supports TFS' new feature of hier­ar­chical work items. That is, you can link one work item as a child of another. A typical example would be a Sprint Backlog Task that is a child of a Product Backlog Item.

Team Site

The Windows SharePoint Services (WSS) Team Site that the Scrum template produces is, alas, no more impressive than the one from MSF-​​Agile. In fact, they are nearly iden­tical. I think there is a lot of oppor­tunity for improvement here, both on the Conchango/​EMC2 side and on the Microsoft side. Right now, if you want a really useful team site, you need Microsoft Office SharePoint Server (MOSS) 2010, which provides a far richer team envi­ronment. We chose not to go that route, and used the WSS portal instead.

Of course TFS' built-​​in Team Web Access also works with team projects created with SFTS3.

No Visual Management

Unfortunately neither the team portal nor the Web Access site provides a visual interface for managing work items. But Conchango/​EMC2 is preparing the Task Board appli­cation for just that purpose, priced at about $90 per developer (< 10 devel­opers) down to about $76 (> 50 developers).

Third-​​party products like Urban Turtle can also fill that gap, priced at about $50 per developer. I will have a look at Urban Turtle later; I was not able to install the pre-​​release builds on our Team Foundation Server, but I'm sure now that Visual Studio 2010 and TFS 2010 are released, Urban Turtle will not be far behind.

Compatibility with TFS 2010 RTM

In a test TFS envi­ronment, I upgraded a TFS 2010 RC with the prelease version of Scrum for Team System v3 to the RTM version of TFS 2010, and it worked without a hitch. This means the existing Scrum for Team System template works fine with the TFS RTM, and existing work items remain unchanged and continue to work just fine. I really like this; I feared it would be a real pain to migrate our project to the newer bits. It will probably also enable Conchango/​EMC2 to release the updated bits of Scrum for Team System 3 quickly.

Early Conclusion

My, admit­tedly limited, expe­rience with the Scrum for Team System v3 template is very positive, and we will defi­nitely continue to use this template at my current customer. I think it is a much better fit for Scrum teams than Microsoft's MSF Agile is, and it has some nifty features such as the Retrospective work item type to complete the expe­rience. Granted, there is some work to be done in the WSS Team Portal area, and I could not test the difference between Conchango/EMC2's template and Microsoft's when it comes to a SharePoint Server-​​based Team Portal. But all in all I can say that I think Scrum for Team System v3 is a winner.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on DotNetKicks.com
Shout it
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter
Google Buzz (aka. Google Reader)

Comments (1)