Tags: , ,

Scrum is great in its flexibility. You are free to tune the process to best fit your needs. It is completely normal that the process is varying in different organisations and even in teams in the same organisation.

At my new work, we also use Scrum and I picked up one useful technique. At the beginning of each sprint retrospective meeting we draw a timeline of key events happened during the last sprint. The technique is especially useful in case of long sprints (like one month long in our case) and helps to remember what the team did, what good and bad happened during each week.

Tags:

Last Saturday about 50 people learnt something new at Knetlik conference. The conference was not about Czech cuisine, but about .NET; however, I believe, there are some analogies in the name with popular Czech food — knedlík.

The conference was very fast and full of caloric information. There were 10 short talks 10 minutes each! Such short talk is enough for the introduction and can spark good appetite to learn more.

The format of the conference was quite new for me, but it was not the last thing that surprised me. An organizer of the conference, Andrew Kazyrevich, managed to bring two virtual presenters: Patrick Smacchia (author of NDepend) and Gil Zilberfeld (technology evangelist at Typemock), whom were talking and presenting slides via Skype's screen sharing feature. Neat idea!

As a conclusion, I would like to say that Knetlik is definitely worth to attend next time.

I found myself a bit lazy programming another custom configuration section manually. To my surprise, quick googling brought really cool time-saver Visual Studio add-in —
Configuration Section Designer. In a nutshell, it allows:

  • Create a custom configuration section in a visual designer in Visual Studio. After you designed your configuration section, it is a matter of seconds to update it or even radically change the whole shape.
  • Access your custom configuration settings via generated strongly typed object model. The tool generates partial classes, so you can easily extend them with your code.
  • Use intelli-sense in Visual Studio while editing your custom configuration section in a .config file. It is possible, because the tool also generates a corresponding XSD schema for the configuration section.

Mike Taulty wrote a good introductory post about the Configuration Section Designer.

P.S. Sloth is stimulus to progress.

Tags: ,

If your team is not experienced in estimating in story points — try estimating in T-shirt sizes! =)

Working in agile team I found at the beginning it is quite difficult for some people to switch from estimating in man-days to estimating in story points. The main complexity is to understand two things:

  1. story points express the size, not duration;
  2. and the size is relative, not absolute.

If you notice, your team-mates say "story points", but they mean/discuss/refer to man-days/man-hours — it is time to give a try the T-shirt sizes. The technique is to abstract the numbers and instead use the terms like Small, Medium, Large, eXtra Large. As you can see the T-shirt sizes better correspond to estimation in relative size.

After such estimation session you can convert the sizes back to numbers and send to the business. Hope it will help.

If you belong to Microsoft camp and you have to deal with web services written on non-Microsoft technologies, there is a chance you get an error saying something like "Version number '1.1' is invalid. Line 1, position 16". The bad news is using MS technologies you cannot communicate with web services returning content in XML version 1.1

Microsoft does not support XML 1.1

One of possible workarounds is to convert xml response on the fly and you may find this article helpful.

If you are a decision maker and consider what version of XML to use, please read this short port and especially this long one, and also this thread.

The reality is you cannot create a web service that will be consumed on various platforms if your web service uses XML 1.1

It is 2010 now and while we are enjoying new presentation technologies like Silverlight, nobody can guarantee us we won't deal with more then three years old bugs in WinForms.

Recently I was working on one small desktop application that displays dynamically created content in the FlowLayoutPanel control. In some cases, when you add two controls and the first one has FlowBreak set to true, the FlowLayoutPanel can add unwanted space between the controls.

It seems the height of the gap is the same as the height of the second control following after the flow break. And the workaround to get rid of the gap is to add an additional panel of zero size just after the flow break.

I found this workaround in the Windows Forms General forum.

In my previous post I mentioned how to specify an association between POCO objects in RIA Services. In that post I did not mention that you will get an error as soon as you try to do some operations on associated objects. The error might look like this: "EntitySet of type 'Option' does not support the 'Add' operation".

There are two ways to solve the issue. First of all, it is necessary to decide what type of association you have. In case of composition you just need to use a new CompositionAttribute (read more in Mathew Charles' post):

// "Master" domain entity class.

public class Parameter {
    [Key]
    public long Id { get; set; }

    public string Name { get; set; }

    [Include]
    [Composition]
    [Association("Parameter_Options", "Id", "ParameterId")]
    public List<Option> Options { get; set; }
}

// "Details" domain entity class.

public class Option {
    [Key]
    public long Id { get; set; }

    public long ParameterId { get; set; }

    public string Name { get; set; }
}

If you do not have the compositional association, you have to specify operations in the corresponding domain service.

[EnableClientAccess]
public class ParametersDomainService : DomainService
{
    [Query]
    public IEnumerable<Parameter> GetParameters() { ... }
    [Insert]
    public void AddParameter(Parameter parameterWithOptions) { ... }
    [Update]
    public void UpdateParameter(Parameter parameterWithOptions) { ... }
    [Delete]
    public void DeleteParameter(Parameter parameterWithOptions) { ... }

    [Insert]
    public void AddOption(Option option) { ... }
    [Update]
    public void UpdateOption(Option option) { ... }
    [Delete]
    public void DeleteOption(Option option) { ... }
}

In the AddParameter, UpdateParameter and DeleteParameter methods you will receive the parameter object with associated options. It is up to you whether to perform operations on option objects together with operations on parameters or to do it in the corresponding methods. Note that AddOption, UpdateOption and DeleteOption should exist, but they could remain empty.

Sooner or later you will encounter an issue with generated entity proxy classes if you use POCO objects in WCF RIA Services. The issue is you won't get any generated code for associations in your domain entity classes. Here is an example:

// "Master" domain entity class.

public class Parameter {
    [Key]
    public long Id { get; set; }

    public string Name { get; set; }

    public List<Option> Options { get; set; }
}

// "Details" domain entity class.

public class Option {
    [Key]
    public long Id { get; set; }

    public string Name { get; set; }
}

The generated Parameter entity proxy class won't have any reference to the Options property. To make that property generated you need to apply AssociationAttribute and IncludeAttribute on the Parameter.Options property, and slightly modify the Options class as shown below:

// "Master" domain entity class.

public class Parameter {
    [Key]
    public long Id { get; set; }

    public string Name { get; set; }

    [Include]
    [Association("Parameter_Options", "Id", "ParameterId")]
    public List<Option> Options { get; set; }
}

// "Details" domain entity class.

public class Option {
    [Key]
    public long Id { get; set; }

    public long ParameterId { get; set; }

    public string Name { get; set; }
}

Now we have the association between our domain entity classes (Parameter.Id - Option.ParameterId) included in the generated entity proxy class on the Silverlight side.

Continue of the story is here.

Changes

  1. For clarity the ReadOnly attributes were removed from identifier properties. (7.12.2009)
  2. Added link to continue of the story. (13.12.2009)

Recently Microsoft announced WCF RIA Services. Basically it is next version of RIA Services issued after last July CTP one, but under the new official name.

Before upgrading to the new version, everyone currently using RIA Services July CTP version should think twice and plan this activity, because the process is quite time consuming. RIA Services PDC 2009 Breaking Changes document (17 pages) could help you in estimating the task.

When I finished with breaking changes, I got another issue related to running WCF services under IIS7 on Vista. Particularly, I got an exception that reported unavailability of my domain services: "Load operation failed for query 'GetMyEntities'. The remote server returned an error: NotFound". When I tried to access the service using its URI (http://[MySite]/Services/MyApp-Web-Services-MyDomainService.svc), I found the error confusing for me:

IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

According to people, the error could be easily solved by disabling the Integrated Windows Authentication schema under IIS, but I could not find where I can configure the Integrated Windows Authentication schema in IIS7 management console.

As it turned out I had to re-configure my IIS7 in order to see the Integrated Windows Authentication setting. This article describes how to do it.

Now I can start enjoying WCF RIA Services.

This week I encountered a nontrivial issue while installing SQL Server 2008 on Windows Vista Czech version with the user interface switched to English. At the beginning of the installation I got the error:

Rule "Performance counter registry hive consistency" failed

Rule Name: PerfMonCounterNotCorruptedCheck
Rule Description: Checks if existing performance counter registry hive is consistent.
Message: The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see http://support.microsoft.com/kb/300956.

It took me long time to recognize and solve the issue. First of all, I started googling for a solution and got an impression that I am not alone. Some of proposed solutions were quite promising (like this one), but no one helped in my case. And then, being about to give up, I came along a bug description that finally explained to me what is going wrong.

In order to check the performance counter registry hive consistency, the installer compares four values from next registry keys:

  1. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Counter" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Counter"
  2. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Help" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Help"

where {LCID} is the system locale. For English version, it is "009", and for Czech one — "005".

As I have the Czech version of Windows Vista, but with English interface, the registry node "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\005" (corresponding to the Czech locale) was empty. I think it is a system issue, but not SQL Server's one.

In order to fix the issue, I had to manually copy the Counter and Help nodes from "...\Perflib\009" under "...\Perflib\005", and syncronize the "Last Counter" and "Last Help" keys with just copied ones. You can read more on this topic in this article.

If your original version of Windows is not Czech, you can use the Process Monitor to identify a registry key the installer tries to open.

Please, don't forget to make a copy of the system registry before you start to make any changes there. Just in case ;)