NDC 2014

June 16th, 2014 1 comment

ndclogo2014I attended this year’s NDC (Norwegian developer conference) in Oslo. It was a very interesting conference, but as a short summary, it saw something like a consolidation. JavaScript – as some people say in its fourth generation (Simple Scripts, AJAX, MVC-Framworks, SPA) – is finally accepted as a language like C# or Java. Also in the agile world there is no hype anymore about Scrum or Kanban. It was more how and when to use it.
One major topic, which I saw in several sessions was maintainable code. Code has to be readable, clear and simple. This is something, what I try to teach my team-members also since a few years (yes, I was also once a geek who tried more or less any new fancy framework).
The highlights were for me the sessions “Seven ineffective coding habits of many programmers” with Kevlin Henney, “Code that fits your brain” with Adam Tornhill and “Beautiful builds” with Roy Osherove.

Here the sessions I attended:




Beside the fun presentation of Scott Hanselman about JavaScript, there was another last funny presentation: “History of programming, Part 1″. You can watch all recorded sessions on vimeo.
After the conference I stayed for the weekend in Oslo. And yes, it is a really nice place to be and the people are really friendly.

If you like this, follow me on twitter…


Build your private git infrastructure

April 22nd, 2014 3 comments

gitlogoI’ve got for several years a virtual server to put my own projects under version control. I started with CVS, then migrated to SVN and now I’m start thinking to migrate all the old projects to git. This because I like git very much and I use it personally for several years now.
The first question but was: “Not invented here”-syndrom? Why not using github or codeplex or any other public platform which offers git support. Well, some of my own little projects are just not worth it to publish or some of them are not meant to be published. So still existing the question why not buy a private account at github or somewhere else. At this point I was much more interested to see how hard it is to build your own little github environment. So, the requirements are:

  • remote repository for git vcs
  • simple user management
  • website to browse the repositories

Fortunately the documentation for git is currently very good, specially this site helps a lot.

Setup a new repository on the server

First you need of course git installed on your server. The second important thing is to add a new user “git”. You can add the user by command line or through your preferred tool, like webmin. The user git is just a service account and it should not be allowed to log in with this account. So therefore just change the shell to “/usr/bin/git-shell”.

To push some changes to my git-server, I need to initialize the repository on the server. It is a convention that the directory name of a bare-repository has the suffix “.git”. So the command looks like this:

git init --bare Project.git

After that I updated the rights for the created directory:

chown -R git.users Project.git


I decided to use the simplest way to communicate with the remote repositories which is by ssh. To add a new user, you must have his public key (here a short documentation how to generate a new public key). When you received the public key of a new user, it is easy to add it to the allowed users:

cat publickey_id_rsa.pub >> home/git/.ssh/autorized_keys

Browse the git repositories

The next step was to fulfil the website requirement. I chose gitweb, which is just good enough to start and it fulfils my current needs. On my linux (debian) machine, it was an easy task:

apt-get install gitweb

Also the configuration of gitweb was really easy. First I defined a root directory, where I plan to store all my git repositories. This directory I had to specify in the configuration file /etc/gitweb.conf:

$projectroot = "/vcs/git";

The last step was to protect the gitweb site with basic authentication (I use an apache web server, so the following lines are in the configuration file of the gitweb site):

AuthType Basic
AuthName "gitweb"
AuthUserFile /www/gitweb.example.com/auth.db
require valid-user

Finally I added the allowed users in the auth.db file.

Using the remote repository

The easiest case is to clone the remote repository:

git clone git@example.com:/vcs/git/Project.git Project

Another way is to add the remote repository to an existing git repository:

git remote add origin git@example.com:/vcs/git/Project.git

To get the latest changes from the remote repository you’ll use the command

git pull origin master

To save the local changes in the remote repository you’ll use the command

git push origin master

If you like this, follow me on twitter…


Migrate a VSS repository to TFS

August 2nd, 2012 No comments

Visual StudioRecently I had to migrate parts from a Microsoft Visual SourceSafe 2005 repository to a Microsoft Team Foundation Server 2010 repository. In this blog post I show what I had to do and what the pitfalls were.

The tool

To migrate a repository you have at least two possibilities: Migrate the latest snapshot or the whole history. Normally you prefer a migration of the whole history, so you don’t loose the gained advantage of an version control system.

To migrate a repository from Visual SourceSafe (VSS) with the complete history, there exists a tool, which comes with Visual Studio: vssconverter.exe. You find the tool in the following directory: C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE.

To migrate a repository or just a part of it from VSS to Team Foundation Server (TFS), you have to process two steps: Analyse and Migrate.

There is quite a good documentation about the process and the tool itself at the MSDN.

Analyse step

In the Analyse step the VSSConverter tool checks if there are any problems and creates an user mapping file.

To start the analyse step, you have to enter the following at the command line:

vssconverter.exe analyze analyzesettings.xml

The analyzesettings.xml file looks like the following:

<?xml version="1.0" encoding="utf-8"?>
     <Source name="VSS">
          <VSSDatabase name="\\server\vss"/>
          <UserMap name="Usermap.xml"/>
          <Project Source="$/Project/Scripts/Func"/>
          <Project Source="$/Project/Scripts/Proc"/>
          <Project Source="$/Project/Scripts/Trig"/>
          <Project Source="$/Project/Scripts/View"/>
     <Output file="AnalysisReport.xml"/>

The result of the execution of the command line are two files: Usermap.xml and the AnalysisReport.xml. You can open the AnalysisReport.xml to see if there are any problems. The Usermap.xml file you have to modify before you can continue with the next step.

In the user mapping file (Usermap.xml) you map the VSS users to the users you use with the TFS. This file looks like the following:

<?xml version="1.0" encoding="utf-8"?>
<UserMappings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <UserMap From="michael" To="DOMAIN\michael"/>
  <UserMap From="john" To="DOMAIN\john"/>
  <UserMap From="ADMIN" To="DOMAIN\michael"/>

I had some troubles here with the correct domain name. The problem result that the user mapping didn’t work during the migration and all history entries had me as user. So I had to destroy the migrated items in the TFS repository with the following command line statement:

tf.exe destroy $/Project/Main/Source/Data/Project/SQL

After that, I corrected the Usermap.xml file and started the migration step again.

Migration step

For the migration step you need a migration setting file. A such file looks like the following:

<?xml version="1.0" encoding="utf-8"?>
     <Source name="VSS">
          <VSSDatabase name="\\server\vss"/>
          <UserMap name="Usermap.xml"/>
          <Project Source="$/Project/Scripts/Func" Destination="$/Project/Main/Source/Data/Project/SQL/Func"/>
          <Project Source="$/Project/Scripts/Proc" Destination="$/Project/Main/Source/Data/Project/SQL/Proc"/>
          <Project Source="$/Project/Scripts/Trig" Destination="$/Project/Main/Source/Data/Project/SQL/Trig"/>
          <Project Source="$/Project/Scripts/View" Destination="$/Project/Main/Source/Data/Project/SQL/View"/>
	 <TeamFoundationServer name="tfs" port="8080" protocol="http" collection="tfs/DefaultCollection"/>
     <Output file="MigrationReport.xml"/>

This setting file looks quite similar to the analyse setting file. But in the ProjectMap section you have the destination attribute where you define the directory in the TFS repository where you want to migrate the VSS data.

In the Settings section there is an important entry TeamFoundationServer. For TFS 2010 you have to define the attribute collection. It wont work without this attribute.

You start the migration with the following command line statement:

vssconverter.exe migrate migratesettings.xml

As a result of this statement you will receive a MigrationReport.xml file, which you can watch in a browser if there were any problems. I recommend also to have a look in the VSSConverter.log file. There are some valuable additional information.

If you like this, follow me on twitter…

Categories: .NET, Good practices Tags:

VDD – the new programming manifesto?

July 17th, 2012 1 comment

VikingLawsWhen I was at the NDC, I had also the possibility to visit with colleagues the city of Oslo. During a stop in front of a little shop, a colleague discovered a post card about Viking laws. When I read it, I was really surprised how well the laws fit to today’s software practices.

The Viking laws are grouped in four paragraphs. I pick the most interesting laws for each paragraph and try to make some relations to the software engineering.

Be brave and aggressive

Here you can read laws like "Be versatile and agile", "Attack one target at a time" or "Don’t plan everything in detail". Those laws are valid for agile software projects too. But one of the more interesting laws is "Use top quality weapons" – just replace the word "weapons" with the word "tools".

Be prepared

In this paragraph you can read laws like "Keep weapons in good conditions", which means in software development to keep your code and tools in good conditions. Another laws is "Keep in shape", which means to do continuous learning and improve your skills. Also the law "find good battle comrades" is interesting, because learning from other programmers or engineers in our industry is very important (by practicing pair programming for example).

Be a good merchant

This paragraph is maybe about business orientation and business value for the customers in the software industry.

Keep the camp in order

When I read this paragraph I thought about the "Boy scout rule", which fits quite well. Also team work is an important point here.


So there are so many well fitted laws here – why don’t we do Viking Driven Development ;-)?

If you like this, follow me on twitter…

Categories: Agile Tags:

My personal wrap-up of the NDC 2012

June 21st, 2012 No comments

I was at the Norwegian Developer Conference (NDC) 2012 in Oslo. It is one of the best conferences I know in Europe. One reason is, that a lot of alpha-geeks are speaking there.

There were during three days 8 parallels tracks, so you have to manage your program. My program looked like this:

Wednesday, 6.6.2012

Keynote, Aral Balkan

Decisions, Decisions, Dan North

Professional Software Development, Robert C. Martin (Uncle Bob)

Agile Estimating, Mike Cohn

Modeling Distributed Systems with NServiceBus Studio, Udi Dahan

Fakes, Isolation Unit Tests, Jonathan “Peli” de Halleux

Social Clairvoyance, Gary Short

Thursday, 7.6.2012

The process, technology and practice of Continuous Delivery, Dave Farley

Busting the BDD myths, Gojko Adzic

Reinventing Softare Quality, Gojko Adzic

Moving from Scrum to Kanban, Rachel Davies

The surprising science behind agile leadership, Jonathan Rasmusson

Dealing with Dynamically-Typed Legacy Code, Micheal Feathers

Deep Design Lessons, Micheal Feathers

Friday, 8.6.2012

Developers: The Prima Donnas of the 21st Century, Hadi Hariri

RabbitMQ Hands On, Alvaro Videla

NDC Cage Match: NodeJS vs. ASP.NET, Rob Conery, Damian Edwards, Jon Galloway

Clojure for the Web, Bodil Stokke

Responsive Web Design, Bruce Lawson

Caring about Code Quality, Venkat Subramaniam


One highlight was the speaker Gojko Adzic. I knew him already, because I read his blog. But I didn’t know how entertaining he could be without loose a bit of useful information. I liked also his sarcasm. Another highlight was the rant of Hadi Hariri about not getting things done. But one of the biggest highlights was the keynote by Aral Balkan. It was a fresh clear and motivating keynote, just great.


There were a lot of talks about software quality, which was nice to see. This is a topic which is also very important for myself. But there weren’t that much new fresh talks about the topic itself. The only exception here was the second talk of Gojko.

If you like this, follow me on twitter…