Published on
December 10, 2007.
Recently TeamCity 3.0 was released. It has a bunch of new features, but the best of all: There is a free version now. And the free version already is quite powerful: up to 20 users, 20 build projects and 3 build agents. That is really a cool marketing strategy, because now there are no reasons anymore, why not to start with Continuous Integration, if even a easy-to-use software is for free.
Published on
August 30, 2007.
Three C# code snippets with the same meaning…
Variant 1: Using a full if/else clause
MyClass result;
if (input!= null)
result= input;
else
result= new MyClass();
Variant 2: Using the ?/: conditional operator
MyClass result = input != null ? input : new MyClass();
Variant 3: Using the ?? operator
MyClass result = input ?? new MyClass();
I did not know about the ?? operator, until Resharper 3 suggested to use variant 3 instead of variant 2
Published on
August 18, 2007.
What does Coca-Cola want to say us with it’s calculation!? Yes…it may be quite difficult to find out, that half a liter is twice as big as a quarter-liter!

I guess, Google is not the only one who can solve 2 x 0.25 liter.
Published on
June 6, 2007.
I wrote a small test, comparing the performance of case sensitive and case insensitive hashtables in .NET. The result is, that the case sensitive hastable is 3 times faster than the case insensitive hashtable …mmmh, quite a difference!
Case sensitive - 527 ms:
new Dictionary<string, string>()
Case insensitive - 1297 ms:
new Dictionary<string, string>(StringComparer.InvariantCultureIgnoreCase)
Source Code
Published on
May 3, 2007.
Today I stumbled over the following: There are a circular references in the .NET Framework. For example, System.Xml references System.Configuration and System.Configuration references System.Xml. See the following:

There are a lot of that artifacts in the framework and I’m wondering why? And how does Microsoft manage to build this?
Published on
February 11, 2007.
Some time ago I wrote I small program, just to play a little bit with .NET Remoting. That program should allow you to start executables on a remote computer. I thought it would be just for playing with Remoting, because there are enough good programs on the market that are doing that already - for example psexec.
But recently I started implementing automatic tests for our distributed server components. As they are distributed, the tests will have to trigger multiple computers. The tests are written using NANT files. To my surprise non of the freely available programs worked - it was not possible to start NANT on the remote computer. Only my tiny .NET remoting application worked. So maybe no bad idea to publish it…although it was initially intended only to be a test app.
Download it here.
Published on
January 23, 2007.
After reading a while ago about Google’s MapReduce design pattern for highly scalable applications, I now found some time to write my own small example implementation in C#. Ok, ok, this itself is not scalable at all, but it illustrates the concept. One can see that .NET’s generics and delegates are very useful.
Here’s the download: MapReduceCSharp.zip (7 KB)
(To run the unit test, you need to have NUnit installed)
Published on
January 14, 2007.
Recently I’ve set up a Continuous Integration environment in our company for all our .NET source code. Previously we only had a daily build. Our C++ code still is on that basis and maybe we can convince the C++ guys that it is worth doing it (and I’m deeply sure that it is worth).
As basis for our continuous integration, I’ve used TeamCity. Alternatively you also could use CruiseControl.NET, but TeamCity altogether has more features - inclusive a nice AJAX based UI for all the administration and the monitoring. In CruiseControl.NET you have to do all the administration via config-files.
Before doing continuous integration, our whole build already was done via MSBUILD files. This really made it easy to integrate the whole build process in TeamCity, because it has built-in support for them.
One difficulty was, to make it work with StarTeam - our Version Control System. TeamCity currently (I used 1.2) has no built-in support for it. To fix that, I had to write some script code that does the check-out via StarTeam’s command line interface.
Automating the Unit Tests was quite easy. We wrote some NAnt files, which call the NUnit tests and integrated them in TeamCity.
Beside that, we also integrated fxCop for doing static code analysis using NAnt files. One drawback has TeamCity: It does not allow to include custom web pages in their UI. So I had to implement separate page for displaying the fxCop results. The same applies, if you want to use NCover or NDepend (I plan that for the next time).
Published on
December 26, 2006.
During my Christmas holiday I had some time to write a small tool. Weather was not fine at all - it was mostly cloudy and skiing is not possible, because there is no snow.
What I did: I wrote a small tool which allows you to display all assembly references of a certain .NET assembly as directed graph. With that you can see with one sight, why you have problems loading certain assemblies - maybe some referenced assemblies are missing at all or only the versions are wrong.
Check-out the tool

Published on
December 20, 2006.
Yesterday I had to troubleshoot a ASP.NET based application which ran out of memory. Other than I thought, this was quite difficult, because some of the available .NET profilers had problems doing that - maybe because of the size of the web application.
- dotTrace crashed when trying to memory profile. This is disappointing because it is really a nice tool for performance profiling.
- ANTS showed totally wrong results. Instead of more than 200 MB allocated memory, it only showed 8 MB.
- Only Skitech’s Memory Profiler worked and allowed me to browse through the allocated memory. Really nice.