Don’t use Regions in .NET

One thing that annoys me when reading other people’s C# or VB.NET code is the use of regions. The main reason why anyone should wrap a piece of code inside a region is that there is something inside that they don’t want you to see. Visual Studio’s default behavior is, as you know, to collapse [...]

First contact with Refinery CMS

I am about to finish my first CMS project based on the open source Ruby on Rails based CMS framework Refinery. It has been a pleasure to work with it and I will explain why in this post. I have some previous experience with the commercial CMS product EPiServer. It is a very polished product [...]

Small Projects are no Excuse for Sloppy Process

In the past few years I have been involved in a few small development projects. By small I mean a project with two or maybe three developers and a timeframe of four to eight weeks. Some of the projects have been very successful and others have been more troubled. In retrospect I found that the [...]

Migrating from Visual SourceSafe to Mercurial

If your organization use Microsoft SourceSafe as your version control tool, there are several reasons to stop doing that as pointed out in these blog posts: Visual SourceSafe Version Control: Unsafe at any Speed? Visual SourceSafe: Microsoft’s Source Destruction System Which version control system should you use instead? Well, there are a lot of tools [...]

NHibernate Session Handling Revisited

In an old blog post I described how you can implement the Open Session in View pattern using Contextual Sessions. Since then I have discovered even easier way to handle the NHibernate sessions in an ASP.NET web application. The approach I have used recently is the one proposed by Ayende in this blog post. His [...]

Code Metrics Statistics with TeamCity

Code metrics can be a very useful tool for monitoring some aspects of code quality. To get the most out of it you need to calculate the metrics on a regular basis in order to find trends. Code quality tend to go down during intense phases of a development project and also when a product [...]

Test-Driven Developers have more fun

I started using TDD a couple of months ago and what strikes me now is how much more fun it is to develop in this radically new way. There are several reasons for this. A common frustration when developing in the traditional way is that the progress is not immediately visible. This is particularly true [...]

NHibernate Session handling in ASP.NET – the easy way

EDIT: Take a look at a new blog post of mine on this subject. When I first started using the popular ORM framework NHibernate, I was a bit confused about the best way to manage NHibernate sessions in a web application. The official documentation did not provide much guidance, but I did find out that [...]

Deploying ASP.NET Web Applications using NAnt

We have started implementing Contiuous Integration at our company. We began with Cruise Control.NET but have decided to try with TeamCity instead. One thing that we would like to do is to deploy ASP.NET web applications as part of our Continuous Integration process. We use the Web Application Project template in Visual Studio. One problem [...]

Here is my blog

After having thought about it for a long time, I finally decided to start my own blog. I will blog about things that are related to my work as a .NET developer, such as: Solutions to technical problems that I have encountered Technical books, blog posts and articles I have read Reports from conferences and [...]

Follow

Get every new post delivered to your Inbox.