I always look forward to attending retrospective meetings in an agile setup. It is the time to reflect upon how the team fared and make amendments for the future. There is always tons of learning and from every project springs some unique surprises during a retrospective session.
Team Foundation Server (TFS) Analytics can aid a retrospective discussion, and, more interestingly, be used as a form of gamification to bring in a bit of competitiveness amongst peers. The most interesting of the analytics you can bring into the discussion is the Code Churn report. It helps gauge the lines of code written by each member of the team and illustrates the churn generated. It can be a reflection of how much refactoring has gone in by comparing the deleted and added LOC. It may not be very useful directly for project budget and forecasting, but definitely gives a sense of achievement to the team and provides non-tangible benefits in the form of motivation. It is very easy to run the analytics reports provided by TFS. You however need to make sure that you have appropriate permissions to run.
Open Microsoft Office Excel 2013. You will see an option to connect to different sources under the Data tab. Select the option to create a connection to SQL Server analytics services as illustrated in the following figure.
This will open the data connection wizard. Type the TFS server name in the first step of the wizard and click next to step 2 that will bring the list of available cubes and perspectives as shown in the figure below:
Notice that Team System is the cube holding all possible dimensions and facts that you can create the analytics on, however specific perspective analytics are pre-created like Code Churn and Code Coverage.
Select the Code Churn perspective and finish. You will be prompted to choose the format in which you want to import the data. Select the PowerPivot option as shown:
From the PivotTable fields, choose the Code Churn Attributes as Column Values.
Scroll down the fields’ information and select “Checked In By” under the Version Control Changeset category. This will get added as a Row Value and you will see a report generated as shown in the following figure.
This imported data shows the Code Churn Count, Lines Added, Deleted and the total impact in the form of Total Lines of Code. You can further dissect the information by adding Year / Month attributes to determine the highest and lowest code churn months / years. In addition, comparing with estimated hours of effort, you can use this information to drive sizing discussions.
There are additional perspectives that TFS has pre-generated like the Builds, Code Coverage, Tests, and Work Items. Each of these perspectives are useful for an effective retrospective discussing build quality, work progress, and tested code paths for sunny and rainy day scenarios.