Moving to a new Kingdom

After 3.5 years at Avega Group, I have decided to move to a new Kingdom.  As of the 6th of October I will start the next chapter of my professional saga. I will take employment at King in Stockholm as an internal coach.


It has been 3.5 awesome years at Avega Group. I have been very lucky to work with some of the best people in the industry. I have learned so much from all of you. You have made me grow and develop. I will miss you all!

I have also had the greatest privilege to represent Avega Group at many different conferences and events around the world. It has been very rewarding and I have learned a lot.

Nevertheless, it is now time for me to venture into the new and exciting King Kingdom.

Continue reading

Kanban Method in a Nutshell


Start where you are, create a shared and visual understanding of flow of work and then evolutionary improve. In short; this is the Kanban Method.

With the Kanban Method you have a proven approach for moving towards your state of excellence.

Start where you are

StartWhereYouAreThe Kanban Method builds on both small and large organizations current strengths; including current roles and processes. It acts as a catalyst for evolutionary change towards excellence – it’s a method for introducing a continuous improvement (kaizen) culture. It is proven approach for knowledge worker organizations to go Lean.

Create a shared and visual understanding

SharedAndVisualUnderstandingThe starting point is a shared and visual understanding of the current flow of work. To create a shared understanding of the inherently invisible flow of knowledge work it has to be made visible. The saying; “a picture is worth more than thousand words” really applies when it comes to understand the flow of knowledge work. To even further deepen your understanding of the flow of work a pull system is established by limiting the work-in-process. Contrary to common reflexes, the technique of limiting the work-in-process usually has the added benefits of improving the flow and reducing stress.

Evolutionary improve

EvolutionaryImproveWith a shared understanding of the flow of work the Kanban Method encourages small evolutionary changes, changes towards a state of excellence. The method encourages the knowledge worker to apply a scientific approach and run experiments to strive towards excellence. The method itself does not define the state of excellence or the specific improvement method to use. The state of excellent has to be defined based on the organizations context and business philosophy.

Common models used to move towards excellence are; The Theory of Constraints, The System of Profound Knowledge and Lean Economic Model. And common improvement methods used are; Improvement Kata/Coaching Kata and A3 Thinking.


Time to move towards excellence – Stop Starting, Start Finishing!


NDepend your guide to Kaizen your codebase

From time to time I have used a tool called NDepend to help me analyze the codebase I have been working on. Most of the times in the past I have been working in codebases where I was part of the project from the beginning or near its inception. This time I get to work on a codebase that has been developed for a few years and most of the people who started the development is long gone.

CQL the Sensei that let you find your way

When working with code I always try to follow “The Boy Scout Rule” and leave the code in a better state than when I started. I usually do this by refactoring and cleaning up when I touch the code for specific reason like a change request or bug fix. But some times you gets some slack or have quality improvement time scheduled. When this happens how do you know what part to go work on first? You need someone to guide you.

This is the area where NDepend really shines. NDepend really is like a Sensei that shows you the way. There are the standard reports and you get things like:

  • Methods with the most lines of code
  • Methods with the highest cyclomatic complexity
  • Methods with the most parameters
  • Methods with too many local variables

And the list goes on and on. The amazing and greatest thing however is that theses reports are not static. The reports are built with CQL – Code Query Language. This is more or less like having a SQL database that you can query, but the database is your codebase! In my case I needed to modify the most lines of code query to exclude the “InitializeComponent” method to see what methods to look into.

Here is the CQL query I used and the result(method names renamed to protect the guilty Smile ):

 WHERE !(NameLike “InitializeComponent”)  
methods # lines of code (LOC)
MethodName1 424
MethodName2 401
MethodName3 383
MethodName4 340
MethodName5 303
MethodName6 301
MethodName7 292
MethodName8 265
MethodName9 262
MethodName10 257
Sum: 3 228
Average: 322.8
Minimum: 257
Maximum: 424
Standard deviation: 57.844
Variance: 3 345

Here is one of the standard queries that gives me the most complex methods.

// <Name>Methods too complex (CyclomaticComplexity)</Name>
  CyclomaticComplexity > 20 
  ORDER BY CyclomaticComplexity DESC
methods Cyclomatic Complexity (CC) Full Name
Method1 147 Assembly.Class.Method1
Method2 125 Assembly.Class.Method2
Method3 119 Assembly.Class.Method3
Method4 118 Assembly.Class.Method4
Method5 107 Assembly.Class.Method5
Method6 103 Assembly.Class.Method6
Method7 92 Assembly.Class.Method7
Method8 91 Assembly.Class.Method8
Method9 88 Assembly.Class.Method9
Method10 88 Assembly.Class.Method10
Sum: 1 078  
Average: 107.8  
Minimum: 88  
Maximum: 147  
Standard deviation: 18.443  
Variance: 340.16  

With the standard reports and CQL I have Sensei that guides me in my Kaizen work on the codebase.

Visualize your codebase

Queries and tables with the results are very useful but with NDepend you can go to the next level by visualizing you codebase.


This visualization shows the number of lines of code per method in all classes analyzed. It is very easy to spot the problem areas in the codebase.


This is another diagram that help me spot potential problem areas of the codebase.

NDepend is really a great tool to give you a feel for your codebase and where your focus areas for you code Kaizen should be. Give it a try.  

Two previous post related to this topic: