October 10th, 2013
I was fun to present today at Campus Days 2013 in Copenhagen, Denmark. The talk was about how to instrument software by using frameworks like TraceSource, EventSource, Event Tracing for Windows and how to perform post-mortem debugging via Visual Studio and PerfView.
Here is a great resource for enabling diagnostics in Azure.
August 7th, 2013
If you do not know Polly, you are missing out! I did not know about it until a couple of days ago and you properly never heard about it either, as this wonderful little library only has 63 downloads on NuGet at the time of writing.
Polly is an easy to use retry and circuit breaker pattern implementation for .Net – let me show you.
Start by specifying the policy – what should happen when an exception thrown:
var policy = Policy
.Handle<SqlException(e => e.Number == 1205) // Handling deadlock victim
.Retry(3, (exception, retyCount, context) =>
The above policy specifies a SqlExeption with number 1205 or OtherException should be retried three times – if it still fails log and bobble the original exception up the call stack.
var result = policy.Execute(() => FetchData(p1, p2));
It is also possible to specify the time between retries – e.g. exponential back off:
var policy = Policy
.WaitAndRetry(5, retryAttempt =>
Or the circuit breaker safeguarding against the same error occurs again and again if an external system is temporarily unavailable:
var policy = Policy
Go get it – I’m already using it
June 26th, 2013
Do you need access to the bare HTTP request in ASP.NET Web API to access custom header etc.? Then add the HttpRequestMessage:
public class CalculatorController : ApiController
public int Add(HttpRequestMessage requestMessage, int x, int y)
var accessToken = requestMessage.Headers.Authorization.Parameter;
// use the HTTP header
return x + y;
The HttpRequestMessage is automatically bound to the controller action, so you can still execute the action like http://localhost/calculator/add?x=3&y=2
Simple and easy.
October 2nd, 2012
I followed a couple of sessions the continuous delivery by Sam Newman, Michael T. Nygard (author of Release It) and Jez Humble (author of Continuous Delivery).
Continuous Integration is a prerequisite of Continuous Delivery, but many still don’t use apply Continuous Integration to their solution, with daily incremental check-ins, automated build and unit tests.
To simplify Continuous Delivery, everything must be automated. To ease the task of automation, things must be simplified. To simplify, start by decomposing the system into manageable pieces, so each can be deployed separately. How?
Decompose the system into disconnected services makes it easier to deploy a subset of the system. This limits the impact of a deployment. It even makes it possible to mitigate the risk further by making small incremental changes by only deploying one subsystem at the time.
These services have to be structured as application silos and share nothing, not even the database schema.
By automating and decomposing your system into disconnected application silo services you too can do Continuous Delivery.
I’m looking forward to the last day of the conference tomorrow.
October 1st, 2012
The day started with a keynote from @Falkvinge from the Pirate Party. I wasn’t expecting much from this keynote, but I was pleasantly surprised. First of all, I assumed that I knew quite a bit about the Pirate Party – I was wrong! Facts: the Pirate Party is present in 150 countries and has 2 European Union parliament members. These guys are serious and not just a protest party wanting to legalize sharing copyrighted material. They are fighting the problems with limiting access to knowledge and ideas. They are emphasizing that exclusive right like patents, copyright and subsidizing are counterproductive. That’s so true! @Falkvinge disrupted my brain – that’s great, because that is why I’m here!
Next up was great presentation of graph databases by Jim Webber – fast speaking provocative British architect from Neo4J. He (re)spiked my interest in ‘other’ databases and stressed that each type of database like relational, object, key-value stores, document, graph etc. databases each fit their problem domain. So you shouldn’t just pick RavenDB because it is the new hot think in .Net sphere (or because Ayende aka Oren Eini says so). I will definitely take a look Net4J with the .Net client library Neo4jClient . Another great point from Jim Webber was; ACID does scale (though many claims otherwise), but he stressed it was distributed ACID with 2PC that doesn’t scale.
From then on I attended a couple of unfortunate sessions (not worth mentioning). Now it is time for the conference party where the beer is sponsored by Atlassian.
September 27th, 2012
Soon I’ll be joining a bunch of great people from the Danish developer community and abroad at this year GOTO Conference in Aarhus next week.
I’ve been looking at the conference schedule trying to create my schedule… the line-up of international fame speakers are impressive, but I’ll go for the odd sessions to expand my horizon. During breaks I’ll discuss and share ideas with my fellow attendees – I might even skip sessions for interesting discussions in the hallways.
Here is my tentative schedule:
August 28th, 2012
Are you going to GOTO Aarhus 2012 conference October 1-3 in Aarhus, Denmark?
I prefer conferences where I get inspired… a conference where all the participants; speakers and fellow participants plant seeds in my head for new ideas and alternative approaches to solving problems.
That’s why I’m going to the GOTO Aarhus conference.
June 21st, 2012
While writing and posting this post I’m currently flying from Copenhagen, Denmark to London, United Kingdom over the North Sea with Norwegian airlines using the free online Wi-Fi connection onboard. The Internet connection is slow, but that’s expected as the traffic is routed through satellites and the fact that I share the connection with the 250 or so other passengers; all trying to access Facebook
A ping request to Google.com show that a roundtrip takes around 800 ms with some fluctuations into the 1200 ms
Pinging google.com [126.96.36.199] with 32 bytes of data:
Reply from 188.8.131.52: bytes=32 time=681ms TTL=43
Reply from 184.108.40.206: bytes=32 time=869ms TTL=43
Reply from 220.127.116.11: bytes=32 time=705ms TTL=43
Reply from 18.104.22.168: bytes=32 time=750ms TTL=43
An Internet connection speed test reveals my upload was around 400 Kbit/s download and 15 Kbit/s upload.
A trace route didn’t disclose much information; therefore not included in this blog post.
The Internet connection is very unreliable making it impossible to work, but IM and light sites are browsable. Internet on a flight is a welcome initiative making it more pleasant to fly.
I just hope the competitors will do the same and the quality of the connection will improve.
May 11th, 2012
I enjoyed the Community Day immensely and I am looking forward to next year.
Download the presentation together with the C# client, jQuery web client and Solr configuration files.
Download Solr separately from Apache Foundation.
February 29th, 2012
I’ll be discussing specifically in the context of knowledge workers who “think for a living” such as software developers, lawyers, business analysts and the likes. I will use software developers as an example, but it applies to other knowledge workers too.
You might have success outsourcing if you find talent, but you will fail without!
Businesses neglect the importance of finding skilled and talented software developers when outsourcing, which will almost certainly lead to problems or failure in the long run.
It doesn’t matter if it is a project or IT services being outsourced – the people in the other end have to have skills and preferably talent.
Obtaining a degree or completing a certification does not proof that a person has skills. Just as managers never will employ a developer based on resume only, neither should outsourced developers. The business should setup quality parameters in the outsourcing contract or interview the developers themselves – but that is rarely feasible.
There are other essential parameters that should not be neglected like creativity, motivation and talent nurturing. All the regular personal management things needed, also applies for outsourcing.
Offshoring to low-cost countries just complicates things even further… as you have to consider the language barrier, culture differences and time zones also.