Friday, January 20, 2006

Article on agile development

I read an article on agile development by Martin Fowler. I thought it was an excellent read. Just to get you excited I have extracted some of the points I found most interesting.

Traditional engineering and software development differ in a significant way. E.g., in building a bridge the design is about 10% of the effort, but in software development it is about 50% of the effort. This changes the nature of the work since design is a much more unpredictable process, requiring gifted (non replaceable) individuals, but construction is rather automated and less demanding on particular skills. Additionally, the requirements for software projects are more liquid making the software design process even harder to predict.

Since the individual developer plays such a big role in a software development the agile processes are focuses on how to mange them and their interactions, as opposed to the traditional approach based on the assumption that the individuals are replaceable parts. Finding a good measure of progress for these processes is difficult, and Martin quotes Robert Austin's conclusion that measurement-based management has to be abandoned for delegatory management.

The unpredictability of software development makes it hard to fix a budged up-front: it is impossible to fix time, price and scope. However, using agile methods, it is possible to allow the scope to vary while keeping the price and time fixed. The success of the project should therefore be measured by how much business-value it provides to the customer, rather than how well it meets its plan.

Martin concludes his article by describing some of the numerous agile methods in existence, this I found of less interest.

Thursday, January 19, 2006

Using database transactions in unit tests

I started using the advice of Roy Osherove regarding how to use transactions in unit tests (see previous blog entry).

To summarize the method:

using System.EnterpriseServices;

ServiceConfig config = new ServiceConfig();
config.Transaction= TransactionOption.RequiresNew;

[database CRUD code]


This code worked fine after having sorted out some configuration problems. I am accessing the SQL Server 2000 on a Windows 2003 server from a Windows XP on a different domain. First I got "The partner transaction manager has disabled its support for remote/network transactions.", this changed when I allowed for MSDTC on the server. Then I got "The transaction manager has disabled its support for remote/network transactions" which was fixed by allowing MSDTC on the client machine. The final error was because the firewall was blocking the connection.

Therefore in order to make this work (for this scenario) it is necessary to:
  • Allow MSDCT on the client and server: Administration tools -> Component Services -> Computers, right-click on My Computer, click on the "MSDTC" tab, click on "Security Configuration" and allow everything :) In particular: "Allow Outbound" on client, "Allow Inbound" on server (the SQL Server machine), set "No Authentication Required" on both server and client, and enable TIP and XA Transactions on both server and client.
  • In the firewall open up for the msdtc.exe: %root%\WINDOWS\system32\msdtc.exe on both client and server.

Now I am able to control the initial conditions of the database programmatically in a simple manner :)

P.s. The above settings work for me, but further instructions can be had here and here.

Wednesday, January 18, 2006

Interesting figures

On Tomshardware there is a interesting short comparison on present and past computer capabilities.