Log levels explained

I’m always struggling with the method/level to use when logging from my application. In his Modern Structured Logging With Serilog and Seq pluralsight course Jason Roberts explains it this way:

Level Explain Example
Verbose how technical “calculated hash {hash} for order {id}”
Debug how functional “applied vip discount to user {user}”
Information what “created order {id}”
Warning problems “save of order {id} failed, will retry in 5 sec”
Error unexpected failure “saved of order {id} failed”
Fatal critical/stop “unhandled exception”

We have adopted this and have improved our logging quality.

If everything seems to be going well, you have obviously overlooked something
Murphy’s law

Posted in Development | Tagged , | Leave a comment

I’m Eric Tummers, Software Architect at Statistics Netherlands, and this is how I work

My jobs description says Software Architect. I’m guiding my team through the technical hurdles and do some programming/testing/analysing myself. We follow the scrum guide and are working towards continuous integration and deployment. We do this in small steps. Every sprint we complete means the retrospective is done in the pub.

I expect the best and I give the best. Here’s the beer. Here’s the entertainment. Now have fun. That’s an order!
RasczakLocation: Sittard, NL
Current Gig: Devops Teamlead, CBS
Word that best describes how you work: Teamwork
Current mobile device: iPhone se
Current computer: MacBook 15 inch

What apps/software/tools can’t you live without? Why?

Wunderlist: work tasks, chores, groceries, planning, every task is there. I’m aware of the acquisition by Microsoft and the planned end-of-life.
Evernote: I’m a fan for years now.
Parallels 11: Running Windows on my MacBook is a must. And of course visual studio, team foundation server, build, release manager, sql server management studio, remote desktop, powershell, and some other tools I need for work.
Alfred: keyboard shortcuts for everything. I bought the powerpack and advise you to do the same. Still on v2 though.

What’s your workspace setup like?

Work at the office is on a thin client with 24 inch screen and (wired) mouse and keyboard. The desk and chair comply with all regulations. We have a great coffee machine.


My home workspace is still my Macbook 15 inch. I’ve a new setup with logitech keyboard and mouse (MX800) and Benq 24 inch monitor (BL2420PT). Nothing fancy but the extra screen space is very welcome.

What’s your best time-saving shortcut/life hack?

Timebox. Start on a task and spent the time you’ve got to get the best result. Get someone to look at it, get feedback. Then decide if the result is final or to spent some more time.

Besides your phone and computer, what gadget can’t you live without and why?

I replaced my Magellan Echo with the Garmin FR235. It has smart watch features and a optical heart rate monitor. My phone is on mute since the Garmin notifies me of everything.
My Apple Airpods. Easy to use, small and good sound. Never leave the house without them.

What everyday thing are you better at than everyone else? What’s your secret?

Learning new things. My current project lets me implement new things (joy) Also I try to learn the things I know to my team or anyone who listens.
I have a basic understanding of how things work and try to map new things on there. For the details I have a Pluralsight subscription and black belt google skills.

What do you listen to while you work?

My alarm clock plays classical music to wake me up in the morning. The car stereo plays about everything (grunge, rock, kids stories) driving to work. When I need some focus I play drum and bass on my headphones. My ringtone is still Run riot by Camo & Krooked, although it is muted since I got the Garmin.

What are you currently reading?

The Hard Thing About Hard Things. It gives an insight into the problems a CEO has and how to overcome these. I enjoyed reading it on my last vacation and plan to read it again after I finish it.

How do you recharge? What do you do when you want to forget about work?

Spending quality time with my wife and daughters. Phone on silent, no screens, no work. Mostly piggyback riding and tea parties
Also sports like running, fitness, climbing and snowboarding to keep me fit and healthy.

Fill in the blank: I’d love to see _________ answer these same questions.

DC Rainmaker (Ray) has been on my reading list for years. His reviews about sport gadgets is amazing. If you don’t know who this is I urge you to click the link. For the rest; you know why.

What’s the best advice you’ve ever received?

someecards.com - Make a shit first draft you cannot edit a blank page
I believe this is a variant on a Hemingway quote.

Is there anything else you’d like to add that might be interesting to readers?

Learn Powershell. There is so much possible with Powershell. If you can learn one thing this year pick Powershell.

Original idea from Lifehacker.com.

Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

TFS tips #2 – CodedUI with testagent

💡 This post is part of my TFS tips where I write about how we make the most of TFS (on premise)

During release in our CI/CD we want some codedUI tests to run. In TFS we have the “Visual Studio Test Agent Deployment” and “Run Functional Tests” steps but some extra work is needed to get the tests running every time.


Since we use the same dedicated machine for every codedUI test the setup is done manual. There are two things that need to be configured:

  1. screensaver timeout, make sure it is long enough (10 min+) or disabled
  2. autologon (sysinternals), provide the credentials and after every reboot this user is automatically logged in.


The first step in the release definition will reboot the codedUI machine. Then the artifacts are deployed to the first environment (during which the codedUI machine is rebooting) When it is time to start testing the codedUI machine is done booting and the autologon makes sure it is able to interact.

Posted in Development, Tooling | Tagged , , , | Leave a comment

TFS tips #1 – Install Java runtime on local server

💡 This post is part of my TFS tips where I write about how we make the most of TFS (on premise)

We are currently working on a project that needs the Java runtime to be installed on our local servers. As lazy developers we want to script this once and let TFS Release handle it from then. This way we can expand our OTAP or scale out in productie with ease.


The default proces of Release is get agent from pool, collect artifacts, install artifacts on target. So the first thing we did was add the Java runtime installation to an artifact on the build.
The build makes one archive (zip) from the installation files and scripts. That zip file is published as an artifact on the server. This way everything is available to TFS, no hassle with access rights to fileshares.


Our standard for script installation (and checking) of software is Desired State Configuration.
The complexity with this DSC is the required reboot after the Java runtime installation. There is a way to do this with DSC by allowing the DscLocalConfigurationManager to reboot if needed and to signal that a reboot is needed.
For this we create one Dsc script and one powershell script that applies this Dsc. The important part of powershell script is below:

# create mof
DscJavaServer -ConfigurationData $ConfigData -Verbose
# allow the server to be rebooted
Set-DscLocalConfigurationManager .\DscJavaServer -Verbose -Force
# apply DSC (install java if needed)
Start-DscConfiguration DscJavaServer -Wait -Verbose -Force

The contents of the Dsc file:

configuration DscJavaServer
  Import-DscResource -ModuleName 'PSDesiredStateConfiguration'
  Node $AllNodes.NodeName
    Write-Verbose "Configuration for $NodeName"
    Write-Verbose "Installation files should be in $DeployLocation"
    # This allows the reboot
      RebootNodeIfNeeded = $true
    Script Java
      GetScript  = { return @{} }
      TestScript = { return Test-Path 'HKLM:\SOFTWARE\JavaSoft\Java Runtime Environment' }
      SetScript  = {   
        $installer = "$($using:Node.DeployLocation)\jre-8u144-windows-x64.exe"
        Start-Process $installer -ArgumentList '/s' -Wait
        # signal reboot
        $global:DSCMachineStatus = 1


The release definition will push the artifact to the target server, unpack the archive (zip) and execute the powershell script.
Now we have a release pipeline that can make sure the Java runtime is on a target machine. If it is not the installation will be done including the required reboot.

Posted in Development, Tooling | Tagged , , , | Leave a comment

SDN event June 2018 – My scrum experience

The SDN – Software Development Network – is a special interest group for dutch developers. Four times a year they organise an event where people present and talk about their passion.

As a member of the SDN you are aware of the latest developments. You are part of a network of professional developers who assist each other in word and deed. This means there is a technical helpdesk at your fingertips so you can book considerable time savings in solving problems.
sdn.nl with Google translate

I’ve been working in a scrum team for two years now at the Statistics Netherlands. Today I shared my experience with the audience. Slides direct download (dutch).
Eric presenting

Slides and recordings of all talks available at SDN.nl.

Posted in Conference | Tagged | Leave a comment

Adding SonarQube to TFS build

We’re moving toward DEVOPS with our team and want to automate code quality checks. Another team already installed a SonarQube server for their python development and advised us to try it for our dotnet development. Now we know why the other team is stocked about SonarQube. We are sure you will be setting this up for your own team when you see how easy the setup is and the huge quality gain it brings.

Service Endpoint

First add a new service endpoint to your TFS by going to settings > services. Put in the url (root of the sonarqube server: http://your_sonar_server) and your token (generated in sonarqube, hover over the icon at the end of the input) and give it a suitable name.


After installing the sonarqube build tasks on TFS and adding javaruntime to your build agents you can add sonarqube to your builds. There are three tasks you should add: prepare, run and publish. Only the first task (prepare) needs to be configured to the service endpoint you created before. The project key and project name are up to you and will be created if they don’t exist (like the first time you run the build) We’ve set the project version to the buildnumber which is not the case in this screenshot.


Now queue a build and watch sonarqube do it’s magic in the logging. You’ll notice the actual analysis is done on the build agent, not on the sonarqube server. This is why you need the java runtime on the build agent. After the publish you can browse to the sonarqube server and find your project in the list of projects. Open the details page and find something like below:

The bugs are mostly caused by not validating parameters like assuming not null.
Vulnerabilities are about known security issues.
Code smells tell you about to much nesting of to much if statements.
Code coverage from unittests is reported.
Duplication reports duplicate code.
Everything combined gives you the technical debt.
You can setup rules (or use the default) that determined the quality gate result. Make sure you’re in the green :mrgreen:


SonarQube VSTS/TFS documentation
SonarQube build tasks

Posted in Tooling | Tagged , , , , | Leave a comment

Powershell extension method

We are testing our Powershell Module with Pester. Since the data is some sort of graph we need to work with indexers / lists all the time. After a small brainstorm session we decided on an Extension Method approach.

Reading the post Extension Methods in Windows PowerShell from Bart de Smet we started to develop. After some attempts we ended up with an XML containing the scriptmethod we needed. Important tip is to handle the $args in a special way: assign to local variable to prevent getting lost …

<?xml version="1.0" encoding="utf-16"?>
      switch ($args.Count) {
       1 { $req = $args[0];[System.Linq.Enumerable]::First($this.Children, [System.Func[Company.Node,System.Boolean]]{ param($x) $x.Id -eq $req })}
 default { throw "No overload for Uses takes the specified number of parameters." }

You can load the extension method into powershell with the following command, where RootNodeExtensions.ps1xml is the name of the file containing the xml

Update-TypeData -prependPath RootNodeExtensions.ps1xml

Now the RootNode has the extension method GetById, so we can use $root.GetById(“12345″) that returns the first node in the Children property that has the Id==”12345” or throws an exception. Sounds like testing 😉

Posted in Development | Tagged , , , | Leave a comment