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.




Friday, February 13, 2009

Source Control Follow up

It’s been about 3 1/2 months since I made the switch to Source Gear Vault as my primary home source control. In the time that I’ve been using it it has performed superbly.  I recently did an upgrade, simple, quick and painless. All totaled it took probably ten minutes to upgrade the server using a single setup executable. Contrast that to the day it took a co-worker to upgrade subversion and the fact that he had to compile the  new server GUI functionality and it quickly becomes apparent that subversion is more of a road block than an asset.

A couple of weeks ago I ran across this Source Control How To by Eric Sink, one of the Source Gear Co-Founders. Even if you’re a source control expert it’s a good read.

Sunday, February 8, 2009

LINQ to DataSets

There are tons of LINQ 2 SQL and LINQ to object examples out there but not many LINQ 2 DataSet examples. Here is a quick sample that creates a table, adds three rows and queries the rows.

The key parts of the query are casting the table as enumerable using the AsEnumerable() extension and the generic Field<T>() method.

 

   1: static void Main(string[] args)
   2:       {
   3:           // create a table with three columns
   4:           DataTable table = new DataTable();
   5:           table.Columns.Add(new DataColumn("ID", typeof(System.Int32)));
   6:           table.Columns.Add(new DataColumn("ContactName", typeof(System.String)));
   7:           table.Columns.Add(new DataColumn("CompanyName", typeof(System.String)));
   8:  
   9:           // add three rows
  10:           DataRow row = table.NewRow();
  11:           row["ID"] = 1;
  12:           row["ContactName"] = "James Smith";
  13:           row["CompanyName"] = "Petes Hardware";
  14:           table.Rows.Add(row);
  15:  
  16:           DataRow row2 = table.NewRow();
  17:           row2["ID"] = 2;
  18:           row2["ContactName"] = "Jon Jones";
  19:           row2["CompanyName"] = "Rodgers Travel";
  20:           table.Rows.Add(row2);
  21:  
  22:           DataRow row3 = table.NewRow();
  23:           row3["ID"] = 3;
  24:           row3["ContactName"] = "Jeff Jones";
  25:           row3["CompanyName"] = "Rodgers Travel";
  26:           table.Rows.Add(row3);
  27:  
  28:           // create a data set, not needed but it's more common
  29:           DataSet dataSet = new DataSet();
  30:           // add the table
  31:           dataSet.Tables.Add(table);
  32:  
  33:           // get the jones brothers
  34:           var jones = (from r in dataSet.Tables[0].AsEnumerable()
  35:                        where r.Field<string>("ContactName").Contains("Jones")
  36:                        select r).ToList();
  37:  
  38:           // list the results
  39:           foreach (var item in jones)
  40:           {
  41:               Console.WriteLine(String.Format("Found {0} working for {1}",
  42:                   item.Field<string>("ContactName").ToString(),
  43:                   item.Field<string>("CompanyName").ToString()));
  44:           }
  45:  
  46:           Console.Read();
  47:       }
 

Tuesday, February 3, 2009

Podcasts

I recently purchased a new Zune, which I like very much. One of the things that I’ve found is that there are a number of great podcasts available on the Zune market place. I think all of them are free, at least I haven’t had to purchase. Here are a list of the programming or IT related ones I’ve liked and links to them on the web.

.Net Rocks (Carl Franklin)

Stackoverflow.com (Joel Splosky and Jeff Attwood)

Hanselminutes (Scott Hanselman)

Windows Weekly (Paul Thurrott)

These are all pretty good podcasts generally development or industry related. Check them out. If you have any programming related podcast favorites pass them along.

Saturday, January 24, 2009

Windows 7

I Installed windows 7 on my home dev box. So far the results have been good. Windows 7 has much better performance than Vista does. The memory foot print on my box is about 1/3 that of Vista.

I did have a couple of issues that you may want to look for, first the SM Bus Controller drivers were not installed. This was easy to fix by getting the drivers from Intel. Secondly the Performance score is a little out of touch. The overall score for my hard drive was 2.9, which was really low. The drive is a Hitachi, not a high end drive, but not a bad drive either. At any rate, I disabled write caching and reran the test. Disabling the caching resulted in a score of 5.9. Obviously some work to be done here, but it is a B1 product.

Overall my experience so far has been pretty good, if you get a chance take windows 7 for a test drive.