On a quest for the silver bullet..

Tell, don’t ask

Tell, don’t ask is a way of thinking when you’re programming software, a mindset. It is something that should be in the back of your head every time you write a line of code, or a chunk of code that describes some functionality. It is not something you merely apply when trying to solve a [...]

August 16th, 2009 at 19:43 (863) | Comments & Trackbacks (1) | Permalink


Glue – the new mapping framework

I’ve spent this summer implementing a new mapping framework for the .Net plattform: Glue.
You’ll find examples and code here: http://glue.codeplex.com
Glue is a general purpose, bidirectional automatic mapping for the .Net platform, with strong verification and testing tools.
I’ve seen quite a lot of less than optimal handling of mapping issues in quite a few projects over [...]

August 10th, 2009 at 11:57 (540) | Comments & Trackbacks (6) | Permalink


ASP.NET MVC: DefaultControllerFactory is not thread safe!

I am not sure if this is a bug or a “feature” of the ASP.NET MVC framework. Either way, this is something you should be aware of as it can cause some very hard to track concurrency issues which might leak information between your HttpRequests.
In my last project we used the ASP.NET MVC framework along [...]

July 3rd, 2009 at 11:05 (503) | Comments & Trackbacks (2) | Permalink


ASP.NET MVC: Let StructureMap create your controllers

For those of you already familiar with StructureMap and want to use it to configure your objects in ASP.NET MVC, read on.
The ASP.NET MVC framework has a default controller factory (DefaultControllerFactory) that requires all controllers to have a parameterless constructor. So, if you want to inject your dependencies to the constructor, you can’t do it. [...]

June 28th, 2009 at 12:09 (548) | Comments & Trackbacks (4) | Permalink


Understand, don’t just follow

It still surprises me, and scares me, how many people in our industry that just follow ideas and practices just because “someone” says it is the way to go, and how those same people do not understand why they are actually doing it.
Let me give you an example.
When Kent Beck and his extreme programmers started [...]

May 2nd, 2009 at 15:52 (703) | Comments & Trackbacks (1) | Permalink


Recommended Books

I just added a new page on my blog: Recommended Books. I will update it regurarly. You can also subscribe to the recommendations (feed at the bottom of that page).

April 27th, 2009 at 13:53 (620) | Comments & Trackbacks (0) | Permalink


Unit tests should not test software

Register your claim
When I refactor or make changes to code I need somehow to verify that the changes do not break anything. I want to do it with unit tests. Unit tests are my safety net. My philosophy on unit testing is something like, if you do not want me to change some of your [...]

March 20th, 2009 at 7:32 (355) | Comments & Trackbacks (0) | Permalink


The importance of code that communicates

One of the major reasons that our industry produces software that is full of bugs, with a massive cost of change and with a short life expectancy is that developers do not understand the importance of writing code that communicates. Yes, one of the most important aspects of software development is to write code that [...]

March 10th, 2009 at 21:03 (919) | Comments & Trackbacks (1) | Permalink


Interviewing Clemens Vasters

In december Lars Wilhelmsen and I made an interview with Clemens Vasters. We talk about different topics around the new Azure and Cloud technologies from Microsoft. Clemens Vasters works as a Program Manager in the .NET Online Services team and is responsible for the ‘Service Bus’ feature area of Microsoft’s upcoming Cloud Platform.
Børge Hansen from [...]

March 4th, 2009 at 14:09 (631) | Comments & Trackbacks (0) | Permalink


Refactoring

To make it clear: “Refactoring” (as the term made famous by Martin Fowler in his great book with the same name), means to change the code without changing its behavior. Too many people talk about refactoring when changing some of the behavior of a system. This interpretation is just plain wrong.
This distinction is not just [...]

January 19th, 2009 at 20:54 (913) | Comments & Trackbacks (0) | Permalink