Sunday, February 26, 2012

Visual Studio Code Metrics & Refactoring

Refactoring is a disciplined technique for restructuring an existing body of code, altering its internal structure without changing its external behavior.”  Martin Fowler

Using Code Metrics feature of Visual Studio (or Code Metrics Power Tools if you don’t have Premium or Ultimate edition) you can get some good information about which unit of code or components are candidates for refactoring.

Use this tool regularly in order to track refactoring opportunities. Check this MSDN article and this Post for usage.

Some metric hints you could use:

  1. Maintainability Index (< 40 or instance)
  2. Cyclomatic Complexity (> 15)
  3. Make a Top Ten Ranking of Refactoring Candidates by using: [Cyclomatic Complexity] * [LOC (Line of Code)] => Order By Desc

For valid ranges, check this Post.

PS: I will be working on how to get this metrics into a TFS Team Project Report.

Thursday, February 23, 2012

Scrum Daily Work Evidence in TFS – End of Day Evidence

A good Agile practice that I’ve personally tested is registering our daily work evidence using images. Source code images, screen images of our application, database tables, etc. Anything that could give other people a quick hint about our work.

Using TFS we can update daily Task status using Work Items. Having images associated and displayed with them is not as straight forward as it should be (like pasting images in Word or in an Email).

One recommended approach is to upload a very simple and lightweight PPT or Word document containing images of evidence for all team members to a folder in the project’s SharePoint site. This could be done under a folder called “Daily Evidence” or something. The name of the PPT/Word file could be the current date (02/23/2012) or such.

At the end of the day, a simple report could detail the status of tasks for every team member and have a link (calculated automatically) to the Evidence file in the SharePoint site.

End of Day Progress Report Sample

image

Using Reporting Services Subscriptions feature, you could also have this report sent by email automatically.

VS2010 - Herramientas de Arquitectura (VS2010 - Architecture Tools) Screencast

Hope to see you there next Tuesday (28th). Register here https://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032506180&culture=en-us.