Showing posts from May, 2011

Remove those pesky source control bindings

So you took the plunge. You decided to migrate your source code away from Team Foundation Server into Git, Bazaar or Mercurial. You either started from fresh or you actually converted all your history.
Anyway, life is good. You open your new repository and open a Visual Studio solution, only to be confronted with this:

Visual Studio embeds source control bindings in your solution and project files. Those have to be removed so that will you no longer see this message. You could open each solution and select ‘yes’ to remove the bindings.
However, because I had a large number of solutions I didn’t want to this manually. So, I wrote a small Powershell script that automatically removes all those bindings in a given directory structure.
My small way of saying thanks to the Git community. Patches are welcomed through the usual Github channels.

It’s shit like this, developers

This week I was changing some contact details for a large company I’m dealing with when I encountered this gem of user interface design:

Here I was trying to enter my new zip code. When clicking ‘confirm’ the website informed me that this was an invalid zip code. The error message (in Dutch) says:

The zip code must contain 4 digits and two characters.
Hey, my zip code does have 4 digits and two characters. Why is this not being accepted? Well, because of the space between the digits and the characters.
Every time I see this kind of behaviour, I’m thinking of the Robustness principle.

Be conservative in what you send; be liberal in what you accept.
The programmer who created this probably just used a regular expression (something like \d{4}[A-Za-z]{2}) without considering the fact that people often write zip codes with a space. You know, like they do on regular letters.

The programmer had several options:
Create two input boxes (one for the digits, one for the characters) so I had visua…