2008 European Championships - my predictions

It’s that great time of the year when the best brass band competition in world takes place - the European Brass Band Championships. Historically this is where the best bands plays at the very highest level. This year the event takes place in Norway, in Stavanger.

We Swedes are of course strengthen by the win of WindCorp in Grenland, which from what i understand was a great display from the band. We’ve come to expect nothing less from that great band.

The Swedish band competing in Stavanger is Stockholm Brass Band. I wish them all the best and really hope that they can impress the judges - they sure have all the potential to do so. I’ll be keeping my thumbs crossed all weekend.

So how will it all go down? The test piece is quite modern and not very “brass bandy”. So that will probably promote...

Read More

In control

You have to see this amazing performance….

Took me a while to understand but she is recording herself and the replaying it while continue to add voices, rhythm etc… and finally produces a wonderful sound and a quite catchy song.

Don’t try this at home, boys and girls. She is a professional

Read More

How to fail a tfs-build on test failing

One thing that really surprised me was that when tests fail in my build script the build script happily ran along after that!? Isn’t one of the ideas with Continuous Integration that the build script only will emit working versions?

Well in this article Aaron Hallberg (Swedish relatives?) shows us how to handle this. What he basically does is to check the status of the test-run and then update the status of the complete build.

I extended his code to use the test-status-flag on the tasks that follow the test, i.e. the publish task. This task deploys the executables to my test server, update the documentation etc.

So now I’ve got my desired result which is that failing test leads to failing the whole build.

Read More

TFS, MSBuild and Code Coverage

When you have a testing framework in place you of course want to test it each build. But of course, you also want to know much code your tests are covering, a.k.a. CodeCoverage.

It is in a way quite easy to accomplish in your build script. The only catch is the complete lack of documentation. Benjamin Day led the way (he he - it rhymes).

What you need to do is two things:

  1. First configure the tests to run. This is easily done by adhering to good naming standards (all test assemblies ending with tests.dll). Then you can add create an item group called TestContainer, like below. This will run through all your tests.

    <ItemGroup> <TestContainer Include="$(OutDir)\%2aTests.dll" /> </ItemGroup> 
  2. Secondly (and here is the secret) you need to specify that the tests are to be run under code coverage....

Read More

Exclude generated code from code coverage result in Team System

One thing that have irritated me with the code coverage tool in Visual Studio 2005-8 is that you can’t exclude things from the code coverage result.

For example - in VB.NET the MySettings-class is generated for each assembly that is created. The code in it is automatically generated and you shouldn’t change it (it even says so in a comment from the tool…). However it is counted when the code coverage result is calculated.

The same thing applies for proxy-classes to web services for example.

This gives an incorrect picture on how much of your code that is tested. But now I’ve found an attribute that might help:


This attribute tells the compiler that the code that is decorated with the attribute is not written by the user and should not be step into during debugging sessions. So when the testing tool encounters the attribute it will simply not...

Read More

How to get equivalent proxy-classes to implement a shared interface

After reading the great patterns book i was talking about earlier i soon ran into a problem that at first seemed pattern-like but was not after some examination.

The case that we are integrating against a back end AS400 system, via Microsoft Transaction Integrator. The “problem” is that the department that is responsible for the integration is creating a web service for each program (“method”) we are accessing. I brushed on this in an earlier post about naming those web services.

A lot of the stuff we are sending back and forth are equivalent but not the same, for example an header that all methods expect. They are equivalent but not the same since they are located in different namespaces, since the header are generated once for each web service.

So what we wanted was to create an interface that all the headers could implement. To create...

Read More

Great Silverlight 2.0 Tutorial

Everybody who knows me knows my feelings on doing complex WebGUI. In short i think it is stupid - and also i have never met a developer yet who can show me a robust and simple way of managing the events of a web page. It is always, always fixes like; hidden fields, setting stuff in prerender etc etc.

So my personal opinion of this is - don’t do it! Web is for simple stuff. The moment a request about a tab control or thing posting back is being said I would raise a big warning flag. You’ll get into trouble. (Of course I can only speak for ASP.NET, and love to be convinced otherwise).

Luckily there is help on the way.

  • You could either stick with simple HTML and use [ASP.NET MVC](http://weblogs.asp.net/scottgu/archive/2007/10/14/asp-net-mvc-framework.aspx) which removes all the crazy event-handling from the ASP.NET WebForm model. Basically...
Read More

Design patterns II

During the last three weeks or so I’ve been reading a great book, Head First Design Patterns. Now i have finished it!

As i said earlier; This is the best, funniest and most informative IT-related book I’ve ever read - and that is quite a few if you count my years at the university.

I have tried to wrap my brain around Design Patterns many times but failed, often due to the very academical language that is used when you speak about such abstract thing. I cannot count the number of times i got an “aaah”, “so it was this simple?” or “finally!”-feeling while reading this book.

Thank you!

Now if the Head First team only could put out some .NET stuff and I’ll be buying lots and lots of those.

Read More

Sweet brass bander

I can’t withhold this sweet picture. It is from the Youth Brass Band Championships in Great Britain held last weekend. Note that she’s not even holding a normal cornet, it is smaller than a regular cornet. But she is still playing a singing E. What a concentrated face!

Read More