Home
  Latest posts
  My Writings
  My Code
  My Gallery
  About me
 
  rssfeed Syndication
 
Bloggtoppen.se
 
 
Links
  Cornerstone
  SweNug
 
Post categories
  misc (48)
  Architecture (21)
  C# (19)
  Asp.Net (2)
  Vb.Net (2)
  Training (7)
  Data (19)
  Events (40)
  Platform (2)
  Orcas (4)
  Updates (3)
  Methods (10)
  Tools (6)
  Announcements (14)
  Languages (1)
  Patterns (6)
  Opinions (11)
  Fun (3)
  Ineta (1)
  Opinion (0)
  Practices (2)
  WCF (5)
 
 
 
Practices (2)
Being Agile about Agile Friday, August 17, 2007

Via Mikael Deurell's blog (http://blogs.msdn.com/deurell/archive/2007/08/16/ska-vi-f-rl-nga-en-sprint-om-vi-h-ller-p-att-misslyckas.aspx)  I found an interesting discussion from inside of Microsoft. The discussion is about Sprints and if you should prolong them.

Agile practices has a clear view on working overtime; you should never have to, unless you are in a Sprint. A Sprint is the last work effort before a release. The idea is that you put in all the effort you need to make sure that all your planned stories get implemented and tested before the release.

Since the Sprint is the last part of the release cycle and short, some overtime is ok and even expected. It's like running, if you see the finish line you can pick up the pace and Sprint to the finish.

The problem is this; what if you realize that your increased pace isn't enough to get to the finish at the expected deadline? What do you do? Do you change the deadline or do you move the finish line? If the pace can't change, one of the other two must.

This really sheds some light upon an oxymoron in the Agile community. Part of being Agile is being flexible, but part of being Agile is also being consistent.

So what part of the Sprint will we be consistent about and what part will we be flexible about?

The answer is that you have to look at the people perspective. Which of the changes in the sprint will affect the people in your team in the most positive way?

Moving the finishing line closer (cutting features), might instill a feeling of failure in the team but the sprint won't exhaust them. On the other hand, making the team run at max pace for longer then initially expected (prolonging the deadline) to reach the finish line might exhaust them instead but might give the team a feeling of success.

So the answer is not really clear cut. The most common practice is to cut features and be consistent about the deadline. This is also what most agile practitioners recommend, but make sure that your team and the individuals within the team will benefit the most from that approach.

The full discussion is over here: http://blogs.msdn.com/nickmalik/archive/2007/08/15/we-are-going-to-miss-do-we-stretch-out-the-sprint.aspx

Update: It appears that SCRUM and XP defines a Sprint differently. For SCRUM, every iteration in a release cycle is called Sprint. Really confusing, why not just call it Iteration. Anyhow, this post is about the last effort before a release, what ever your methodology calls it.

Leave a comment Comments (5)
 
Practice: Put your queries outside of your code Sunday, June 17, 2007

The sprocs vs ad-hoc queries war is still raging and I imagine it will for a while. I think that one of the main reasons that people do stick with sprocs is not due to the fact that they in some way represent the ultimate über performance, but rather the convenience of having the queries in a storage where it is easy to change and maintain it. Since most of the Microsoft community still isn't using some kind of generator to create the query for you (like an ORM for example) it is really a pain to try to maintain something like this:

string specialProductsQuery = "select * from products " + 
                              "inner join categories on products.categoryid = categories.categoryid " +
                              "inner join categorygroup on categorygroup.id = categories.groupid " +
                              "where "

etc, etc, etc.

It is just so awful to maintain and create queries that are represented in quoted strings.

In the rare cases when I need to create theese kind of queries I don't resort to sprocs though(It is just a principle I follow, If I really don't need them I will not use them). Instead I add them to my project as .sql files containing the query. No quotation, no string concatenation and really easy to maintain.

Theese could then either be sent with the application if you want the flexibility to change the query without recompile. (Now I DON'T recommend that, but people do so anyway, to them I just want to say don't change anything in production for god sake!! But that is another battle to be fought another day.) This might be convenient in the development environment though to quickly change and try stuff. Another more sane approach is to compile the .sql file together with the application as resource files.

Using this practices, it would be possible to maintain the sql files without all the headache and still avoid stored procedures.

I've added a distillation of the practice I use in some projects to the "My Code" section over here https://lowendahl.net/shoutCode.aspx  as an example project with unit tests and a test client.

It is capable of reading and caching (and flushing the cache) sql queries with two different strategies which are configured from the outside for easy configuration in different environments.

The idea for this manager is to make it easy to load and maintain queries. No more quoted concatenated strings in our code.Just something like this:

public static class Queries {
  public static string GetAllProductsQuery {
    get {
      QueryManager manager = QueryManager.CreateFromConfigFile();
      string query = manager.GetQueryFor("GetAllProducts");
      return query;
    }
  }
}
.
.
.
SqlDataAdapter adapter = new SqlDataAdapter(Queries.GetAllProductsQuery, ConnectionStrings.AdventureWorks);

The current version has the infrastructure to configure different cache strategies but it's not activated.

kick it on DotNetKicks.com
Leave a comment Comments (9)