Saturday, April 25, 2009

Scrum and Stand ups

My organization is currently using Scrum as a development methodology. We recently increased the sprint length to 4 weeks which seems to be a little better than 2 or 3 weeks, but one of the nagging points, for me at least, is the daily standup. Every day we get together and and discuss backlog items and tasks worked on the previous day. The meeting invariably digresses into details or discussions that don’t really pertain to the status or “look at the cool thing I did”. 

As I was listening  to Patrick Hynds discuss Why projects fail on the .Net Rocks podcast, it occurred to me that he had some valid points on tracking status and more over those principals could be applied directly to the daily standup. The general point of the daily standup is to know where you are in relation to the project schedule and what is getting in the way of the schedule. Pat’s status points where:

  1. What Task/Tasks did you work on yesterday?
  2. What Task/Tasks did you work on yesterday that were not part of a backlog?
  3. What do you plan to work on today?
  4. What Roadblocks do you have?

These questions should be answered without any additional details or ego pumping. The second question is one we don’t ask in our stand-ups, but it occurs on a daily basis and should be addressed. It definitely distracts from the planned backlog items and has a huge impact on what’s accomplished during a sprint.

Using this question format during the standup should allow us to better gauge were we are and what distractions are keeping us from achieving our sprint objectives.

Tuesday, April 21, 2009

Visual Studio 2010 Enhancements for ASP.NET

Mike Ormond posted a piece on the ASP.Net enhancements in Visual Studio 2010.  Web design snippets are cool, but the web.config transformations are huge. It will be a lot easier too deploy to different environments. I hope we’ll see beta 1 around the Tech Ed timeframe in mid May, for now you can read the entire article here

Sunday, April 12, 2009

Lambda Expressions as methods

Many of the Lambda expressions samples demonstrate Selects and Order By but I recently discovered the ability of Lambda expressions to be used as delegate methods. You can use Func<T> for methods that return a result which provides a very concise shorthand notation. In addition to Func<T> you can use Action<T> and Predicate<T>

Here is an example that uses Func<T,TResult> to add two numbers together

// Lambda Function that adds two numbers
Func<int, int, int> add = (int val1, int val2) => val1 + val2;

// add 200 and 100
Console.WriteLine(add(200, 100));



In this case the Func<int, int,int> indicates that the method takes two integers and returns an integer.



Action<T> allows you to capture behavior:



// Action<T> to echo input
Action<string> echo = (s) => Console.WriteLine(s);

// invoke echo
echo("Hello");


Predicate<T> allows you to filter:



// Create fibonacci sequence
List<int> fi = new List<int>();
fi.AddRange(new[] { 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 });

// select the matches
Predicate<int> matches = num => num % 2 == 1;
var odd = fi.FindAll(matches);

// use array Foreach<T> to display the results
Array.ForEach<int>(odd.ToArray(),x=>Console.WriteLine(x));


In the example above I use Array.ForEach<T> to display the results instead of a foreach loop.



You can download the sample code here.