My public PGP key

If you ever feel the need to contact me securely, please download and use my public PGP key.

Beware where you are POSTing!

Recently I had the pleasure to work with Highcharts, a Javascript library for creating dynamic diagrams. Recommended!

The client also wanted the ability to download the data that is used in the diagrams as a CSV file. A quick browse in the documentation learned that Highcharts supports this scenario. There are multiple ways to do this but the one I've seen the most involves POSTing your diagram data to a page that resides within the Highcharts domain.

That csv.php page only adds the headers to create a download:
This means that if you use this construction all your diagram data will be passed to a page that is within the control of Highcharts. Remember, I'm not claiming that Highcharts will do anything malicious with your data!
On the contrary, Highcharts even advises in their documentation that you should create your own page if you don't want to expose your data. Not to mention that they explicitly tell you that the page could disappear at any moment.

However, a qu…

Small tip: use QueueBackgroundWorkItem for asynchronous work in ASP.NET

This is a small tip that I'm mainly publishing as a reminder to myself, but it could come in handy for someone else.

Background processing tasks in ASP.NET are hard. At any time IIS could decide to recycle the application lifecycle. The usual solution is to farm out these tasks to a (Azure) queue and let some other machine (for example an Azure worker role) process that queue.

However, with ASP.NET 4.5.2 Microsoft introduced the QueueBackgroundWorkItem method. This makes it possible to create small background processing tasks within the application lifecycle context.

See the following (extremely simple) example:

A task started this way will only delay the recycling of the app pool for 30 seconds. So you need to complete your work within those 30 seconds. If not, the task will be killed.You need ASP.NET 4.5.2. 
See for more detail the following links:…

Using NUnit for your tests in Team Foundation Service with a Git repository

Since quite some time now it is possible to create a new project in Team Foundation Service (the cloud variant, not to be confused with Team Foundation Server) using Git for your version control. Since I'm an avid Git user I decided to see how the newly released Git tooling would work within Visual Studio and how easy it would be to migrate a project I've hosted on Github to Team Foundation Service.

I cloned my repository that I'm currently hosting on Github. This project already contains a MSBuild file for building the entire project. It also contains some unittests, written using NUnit. First of all you create a new project in your Team Foundation Service. This is simply an empty project, you only indicate that you want to use Git.

Next you clone that empty project using the new Git tooling in Visual Studio 2010 update 2. For more detailed information on how to use the new Git tooling, check out the following post. Great, now I have an empty local repository. Now to fill th…

Hoe je een Google Nexus 10 in het buitenland koopt

In Dutch since this article only makes sense to Dutch readers. Sorry international audience ;-)

 Ik had al enige tijd mijn zinnen gezet op een Google Nexus 10. Google brengt echter de Nexus 10 niet in Nederland uit. Nederland is blijkbaar niet zo belangrijk voor Google. Diensten als Google Music zijn hier in ons kikkerlandje ook (nog) niet beschikbaar.

Wat te doen? Kopen in het buitenland! In Duitsland en in de UK is de Nexus 10 wel beschikbaar. Ik zou naar Duitsland kunnen rijden en daar proberen of ik een Nexus 10 kon scoren. Helaas hoorde ik van meerdere mensen (en wat zoeken op het internet) dat er praktisch geen winkels zijn met de Nexus 10 op voorraad.

Via Google Play kun je direct bij Google bestellen. Het nadeel daarvan is dat je als Nederlander daar de Nexus 10 niet zult aantreffen.... Tenzij je onderstaande instructies opvolgt.

Je hebt nodig:

Een buitenlands afleveradres waar je bestelling naartoe gestuurd kan worden. Ik koos ervoor om te bestellen in de UK. Ik maak gebru…

Using Dropbox or Google Drive as a backup for your Git repository

I’m currently working on a small hobby project in my spare time. I’m using Git as my DVCS. Most of the development is done on my laptop. And I would like to have a backup of my repository in a secure, remote location.

Sure, I could use Github to host my repository (and I plan to publish it there in the future), but for now my code is not yet stable enough to show it to the rest of the world. I’m a strong believer that you should have something useful before showing it to the rest of the world. I dislike open source projects that do not work out of the proverbial box.

Dropbox or Google Drive can help with that. When you install the client an extra folder is created on your system. All files you copy to this folder will be synced to Dropbox/Google.

This in combination with Git makes for a perfect, cheap back-up solution. I started by cloning my Git repository in the Dropbox folder.

Here I created a bare (without working directory) clone of my Git repository in the Dropbox folder. Drop…

Why you should use git merge --no-ff when rebasing.

When working with Git my normal workflow was to create my feature/bugfix in a branch. When I'm ready to integrate it, I rebase the branch and merge it into master. This ensures that the master branch has a linear history.

This gives you a clean history which is easy to bisect.
However, when reading the help for git merge I came across the --no-ff parameter. It says:
Create a merge commit even when the merge resolves as a fast-forward. I decided to use it for my 0.2 version of my software. This created the following graph in gitk:
This code was first rebased, then merged with git merge --no-ff. An explicit merge commit is now created (where the tag 0.2 points to). Because the branch was already rebased, this merge commit does not contain a diff - it only exists to merge the two branches together.

This gives you several advantages on top of the advantages you have using git rebase:
You can see the name of the branch you merged back into master.
The name is part of the commit message of…