The itenium Bliki

This is what usually is the very first blog post. With links to some new-old posts, migrated from my 2012 blog.

Personal Reference Bliki

Everyone who has worked with me for a while knows I’m really hyped about the Pragmatic Programmers. My original idea back in 2012 was to blog about their pragmatic tips, but this blog has instead turned into more of a “personal reference bliki”.

20 Jun 2019

Autohotkey Debugging

If you are like me, you just started writing Authotkey scripts without ever really taking the time to learn the language properly. This blog post contains some scripts and tools to help you try make some sense of what is going on.

23 May 2019
autohotkey testing debugging

Rubber Duck Debugging

Talk to the Duck

When confronted with a problem, don’t ask the person next to you for help right away, he’s probably doing something important as well!

Instead, first tell the duck about it - out loud. If you don’t get to a solution, start explaining your problem in more and more detail until it hits you. If the mere explanation led to a solution, you avoid unwillingly turning your colleague into a CardboardProgrammer.

27 Feb 2019

Create a new blog post

This is something for me (or anyone else really) because I keep forgetting all this stuff.

  • Use {: .hide-from-excerpt} to do just that.
  • img size must be 360x300. bigimg is 1400x262.
  • A
  • Pragmatic Tips
25 Feb 2019

Autohotkey DynaRun

Run any Autohotkey script on the web with a single.. Autohotkey hotkey.

17 Feb 2019

Autohotkey Use Case: Submitting a Form

A simple Autohotkey use case you can start using in your application right away:
Filling in an entire form with predefined values.

31 Jan 2019

Programming Mnemonics

Mnemonics - helping developers remember intrinsics since 1973.

A mnemonic
a system such as a pattern of letters, ideas, or associations which assists in remembering something.

12 Jan 2019

Yaml tutorial

Everyone happy when the downfall Xml was a fact with the widespread use of Json. Less tags, more data. What’s there not to like. It’s also just so much easier for a human to read.

If it wasn’t so straightforward to parse JSON in the omnipresent JavaScript, Yaml might have had a good chance to take over the world being the most readable data serialization language.

13 Aug 2018

Autohotkey Tutorial - hotkeys

First we’ll cover the basic Autohotkey hotkey syntax. Which is arguably already pretty confusing for newcomers in and by itself.

But we don’t stop there as after adding more and more hotkeys, it will also become harder and harder to think of new key combinations that are somehow still memorable. There is only so much you can do with the # (Windows) key etc.

Time for some creative hotkey combinations! ‘Advanced Hotkeys’ covers code snippets on how to run different scripts on single, double or triple key presses as well as how to differentiate between long(ish) key presses or mouse clicks. And more…


; Single line hotkey
^#D::MsgBox Pressed Control + Win + D (%A_ThisHotKey%)

; Control + Win + C: Multi line script
Run, notepad.exe
WinWait, Untitled - Notepad, , 3
Send, Dear sir,{enter}{enter}
2 May 2018

Advanced Windows Explorer

A listing of handy but less known shortcuts in Windows Explorer and some Autohotkey examples on how to add extra functionality.

Open Windows Explorer, the most direct way:

Win + E : Open Windows Explorer

22 Apr 2017
autohotkey powershell windows

Pragmatic Tip 2: Think! About Your Work

Turn off the autopilot and take control. Constantly critique and appraise your work.
— The Pragmatic Programmers

2 Dec 2012

Pragmatic Tip 1: Care About Your Craft

“Why spend your life developing software unless you care about doing it well?”
— The Pragmatic Programmers

Yet Another Blog

Scott Hanselman said “Now, go write, create, commit.”. It took a while but here we are, blogging about “Programming and stuff”. I will be writing about languages and platforms I’m working on or learning about, solutions to problems I’ve struggled with and really any CS related topic I’m otherwise curious about.

1 Dec 2012


VSCode: Editor Settings and Shortcuts

VSCode Editor

Pragmatic Tip 22: The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.

17 Jul 2019
cheat-sheet tutorial pragmatic-tips

Pragmatic Tip #22 : Use A Single Editor Well
A Sublime Goodbye

VSCode Editor

Pragmatic Tip 22: The editor should be an extension of your hand; make sure your editor is configurable, extensible, and programmable.

As a long time Sublime user, the infrequent updates and missing support for new-ish stuff started to become quite apparent. Like all plugin maintainers have turned to Visual Studio Code.

And so I finally decided to leave Sublime Text 3 behind. Welcome Visual Studio Code, the new goto editor.

17 Jul 2019
cheat-sheet tutorial pragmatic-tips

Git Hooks with Husky

Avoid pushing changes that break the build with githooks and Husky.

typicode/husky : 🐺 Git hooks made easy

13 Apr 2019

Exotic Git Snippets

Some git commands and scripts that come in handy from time to time.

5 Apr 2019

Git Assume Unchanged

Ideally one would create a new gitignored file to configure an application to fit his local development environment but when you do have to revert to modifying a committed configuration file, at least there is “git assume unchanged” to avoid committing your changes in these files accidentally.

Assume Unchanged

# Git assume a file
git update-index --assume-unchanged fileName

# And unassume with
git update-index --no-assume-unchanged fileName
18 Feb 2019

Developing with LocalDb

Tutorial on how to use LocalDb as a lightweight Sql Server substitution for development purposes.

8 Oct 2018
sql tutorial

Git-NumberedAdd for PowerShell

After copying file paths from git status output and pasting them after a git add quite a few times by now, I’ve written a small PowerShell script to manipulate the working directory and staging area with fabricated indexes.

30 Aug 2018
git powershell product

Less for your git pager

A git diff or git log starts the less program. Perhaps not the fanciest tool but more powerful than you might expect.

This post details the arguments that can be passed to less and also how to navigate once less is running. Things not relevant for git are omitted.

Your current configuration:

git config --get core.pager

If this returns nothing, there is room for improvement there!


Configure something sensible:

# Short version
git config --global core.pager "less -eFiJM~ -j3 --tabs=3"

# Not so short version
git config --global core.pager "less --LONG-PROMPT --tabs=3 --quit-at-eof --quit-if-one-screen --tilde --jump-target=3 --ignore-case --status-column"
h : See all less commands.
18 Aug 2018

PowerShell and Git for the colorblind

My PowerShell, Posh-Git and .gitconfig color configuration because of some red-green troubles with the default configurations.

21 Apr 2017
powershell git

Managing Environment Variables with PowerShell

Working with environment variables in Windows is as easy as:

Win + Pause > "Advanced system settings" > "Environment Variables..."

After which you get a tiny, unresizable, form where you can view and manage them. Something better eventually arrived with Windows 10 but still, PowerShell :)

Use Autohotkey to open the window with Left Alt + Pause:

LAlt & Pause::Run % "rundll32 sysdm.cpl,EditEnvironmentVariables"
12 Apr 2017
powershell windows

PowerShell profiles

Reload PowerShell profile

. $profile
11 Apr 2017
powershell windows

Package Manager Console Entity Framework 6 Migrations profile

This tutorial is about adding the following functionality to the Entity Framework Migrations CLI:

  • Execute commands against the project containing the migrations by providing the most likely -Project parameter value
  • Allow updating the database using a numeric TargetMigration (-2 = migrate to the third last migration)
10 Apr 2017

Synchronize Additional Folders With Dropbox Using Junction on Windows

Dropbox is great! I’m pretty sure you’ve already heard of it but for those who have not: It allows you to synchronize about 2 gig (and up to 16 gig with some effort) worth of documents, pictures or other files between your different computers, laptops or other mobile devices. The files are kept on your machine(s) and in the cloud, but they are also accessible from anywhere with a browser and shareable with everyone you’d like.

4 Mar 2013

Notepad++ double click PHP variable including the $ sign

Built-in in Notepad++ since 2016:

Settings > Preferences > Delimiter > Add you character as part of word > $

7 Dec 2012

Notepad++ Bookmarks

In many text-editors there are means to easily jump with the cursor between different points in the code and this is no different in Notepad++. Bookmarks have their own margin where they can be toggled with a mouse click.

4 Dec 2012


.NET Regex Tutorial

Not nearly as confusing as it is in JavaScript.

using System.Text.RegularExpressions;

bool mach = Regex.IsMatch("input", @"\w+", RegexOptions.None);
Match match = Regex.Match("input", @"\w+");
IReadOnlyList<Match> matches = Regex.Matches("input", @"\w+");
string result = Regex.Replace("input", @"(\w+)", "$1");
19 Apr 2019
cheat-sheet regex

Debugging in Visual Studio

Basic Shortcuts

F5 : Start debugging
Control + F5 : Start without debugging
Shift + F5 : Stop debugging
Control + Shift + F5 : Stop, rebuild and start debugging
Control + Alt + P : Attach to process

Control + Alt + Break : Break (Debug > Break All)
F10 : Step over
F11 : Step into
Shift + F11 : Step out
Control + F10 : Run to cursor
Control + Shift + F10 : Set next statement
Alt + Num * : See current statement

24 Feb 2019
tutorial cheat-sheet debugging

NSubstitute Tutorial

The creators of NSubstitute craved a mocking framework with comparable capabilities to the alternatives but with a shorter, more succinct syntax. They have not failed to do so and I loved the NSubstitute syntax right away.

12 Aug 2018
tutorial testing

Excel formulas cheat sheet

Companion to the EPPlus series, specifically to Part 2: Formulas.
Covering the EPPlus syntax and implemented functions.

28 Mar 2018
excel cheat-sheet

Create Excels with C# and EPPlus: Miscellaneous

Miscellaneous features

EPPlus can do a whole lot more for you. This post covers some interesting stuff that didn’t really fit anywhere else.

2 May 2017
excel tutorial

Create Excels with C# and EPPlus: Import

IEnumerable objects

Exporting data to an Excel doesn’t get easier than this

using (var package = new ExcelPackage())
	var sheet = package.Workbook.Worksheets.Add("IEnumerable");
	var data = new[]
		new {Name = "A", Value = 1},
		new {Name = "B", Value = 2},
		new {Name = "C", Value = 3},
	sheet.Cells["A1"].SetHeaders("Name", "Value");
	package.SaveAs(new FileInfo(@""));
1 May 2017
excel tutorial

NSubstitute vs Moq

Comparing NSubstitute syntax with Moq, probably the most used mocking framework out there at the moment.



30 Apr 2017
tutorial testing

Create Excels with C# and EPPlus: Formulas & DataValidation

In case your users want to continue working with the Excels after generation.

Not a problem for EPPlus. Instead of calculating values and writing them to an excel, leverage the power of Excel formulas.

27 Apr 2017
excel tutorial

Create Excels with C# and EPPlus: A tutorial

Quick tutorial about creating xlsx Excels with C# and the EPPlus nuget package.

EPPlus Excel addresses are not zero based: The first column is column 1!

Also, before writing any loops, you might want to check out the LoadFromXXX methods. They are explained in depth in part 3 Import.

26 Apr 2017
excel tutorial

.NET Number and Date Formatting

A cheat sheet with everything there is to know about formatting the primitive types, DateTimes and TimeSpans in .NET.

20 Apr 2017

VB.NET vs C# Syntax differences

A cheat sheet outlining the syntax differences between VB.NET and C#. This post is written specifically for advanced C# developers with little to no VB.NET knowledge who need to do some VB.NET coding.

Because some things are just so similar but still confusingly different in VB.NET vs C#…

Along the way we’ll make some amazing discoveries like:

  • There are things VB.NET just can’t do (pointers, …)
  • There are a few cases where VB.NET code is shorter than its C# counterpart (gasp!)
  • VB.NET defaults are not what you might expect from a strongly typed language due to its VB6 legacy (Option Strict, Explicit)
  • There is some VB.NET only stuff that comes in handy from time to time
15 Apr 2017


AVA Tutorial

avajs/ava : 🚀 Testing can be a drag. AVA helps you get it done.

A concurrent test runner from the Andromeda galaxy. If I was to stray from Jasmine then it could only be for a project Sindre Sorhus is working on :) The screenshots on the project site promised extensive assertion failure output with clean stack traces and built-in Promise, async/await, Observable and React component support. So I tried it out and yup, AVA delivered.

Get Started

# Install
npm init ava

# Run tests
npx ava --watch --verbose
24 Apr 2019
testing tutorial

Vue.js Tutorial

vuejs/vue : Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

Why Vue

  • 100k+ ⭐: So many people can’t be wrong
  • Declarative rendering with a cool, terse syntax
  • Low learning curve
  • Reactive and composable view components
  • Optional official vue-router and vuex (statemanagement)
  • @vue/cli: Scaffold project with optional support for TypeScript, PWA, CSS Pre-processors, Linters, Tests, …
  • Automatic dependency tracking
  • Virtual DOM
  • Supports IE9+
19 Apr 2019

Moment.js Tutorial

Moment.js is a mutable wrapper with a fluent interface for the native JavaScript date object (property _d). Use .toDate() to convert back to a JavaScript date.

Dates are interpreted as local time. Unless instantiated with moment.utc().

const now = moment(); // current local time
const a = moment('2016-01-05');
const b = a.clone().add(1, 'week');
b.format('YYYY-MM-DD HH:mm:ss');

moment/moment : Parse, validate, manipulate, and display dates in javascript.

19 Apr 2019
cheat-sheet tutorial

JavaScript RegExp Tutorial

A cheat sheet for the regex syntax in JavaScript.

MDN RegExp Guide


'ok'.replace(/(.)(.)/g, '$2$1'); // $$, $&, $`, $'

const matchG = 'aaa'.match(/a/g);
matchG == ['a', 'a', 'a'];

const matchNoG = 'str'.match(/(st)r/);
matchNoG == Object.assign(['str', 'st'], {groups: undefined, index: 0, input: 'str'});
matchNoG == /(st)r/.exec('str');
5 Mar 2019
cheat-sheet regex

Array.prototype for .NET developers

The Array.prototype functions have been available for a long time but it’s since Arrow functions that “Linq lambda syntax”-like functionality is available in JavaScript.

This blog post explains the most common functions by comparing them to their C# equivalents.

A basic example:

// JavaScript
const result = [0, 1, 2, 3, null]
    .filter(x => x !== null)
    .map(x => x * 10)
    .sort((a, b) => b - a);

expect(result).toEqual([30, 20, 10, 0]);

// C#
var result = new int?[] {0, 1, 2, 3, null}
    .Where(x => x != null)
    .Select(x => x * 10)
    .OrderByDescending(x => x)
24 Feb 2019
cheat-sheet tutorial

Angular Pipes

Pipes: Chainable, declarative display-value transformations to use in your Html.

This post covers:

  • All Builtin Angular pipes (json, async, string, array)
  • How to install different locales (currency, decimal, date, percent)
  • How to generate, implement and test your custom pipes
  • Some examples of custom pipes (ngx-pipes and angular-pipes)

An example:

<!-- This does exactly what you'd think -->
{{ value | uppercase }}
20 Feb 2019
angular cheat-sheet tutorial

Angular Road Trip

Today I want to blog about my Angular(2 - 6) experiences the past years.

After 3 years of desktop development I’ve started with Angular 2+ in july 2016, when it was still in beta.

Back then

Back then the landscape was a lot more difficult than it is today.

22 Oct 2018
angular war-story

JavaScript Testing: Jasmine plugins

What would we be without some extra plugins. There are over 1000 Jasmine npm packages and we’ll cover them all here.

6 Aug 2017
tutorial testing

JavaScript Testing: Jasmine customization

Make your Jasmine experience even more luscious with custom matchers and global convenience methods.
Mock global variables in your modules with jasmine.getGlobal().pi = 3.14.

5 Aug 2017
tutorial testing

JavaScript Testing: Jasmine async syntax

Need to test async code? No problem for Jasmine. There is done() to inform Jasmine a test has finished running.

With jasmine.clock(), the value of new Date() can be manipulated.

Finally instructions on how to configure Babel for async/await in tests.

31 May 2017
tutorial testing

JavaScript Testing: Jasmine Spies

Spies, the Jasmine implementation for mocks featuring spyOn and the new spyOnProperty as well as jasmine.createSpy(Obj) and how to inspect calls made.

30 May 2017
tutorial testing

JavaScript Testing: Jasmine syntax

The basic example contains the general test suite structure and the two most used matchers toBe() (===) and toEqual() (deep compare), followed by all the other matchers that come out of the box.

To finish some helpers for your workflow: how to only have certain tests run and how to exclude tests.

30 May 2017
tutorial testing

JavaScript Testing: Getting started with Jasmine

Probably the most widely used JavaScript testing framework.

This tutorial covers installation, configuration and execution only. For the Jasmine syntax, see parts 2 to 4!

29 May 2017
tutorial testing


First Hack
... If you can call it that much.

A long, long time ago, when games like Utopia and Planetarion were all the rage, I started playing Ambar (since down) with a few friends. This could be the story of why one should have an IT-guy in the team.

27 Jan 2021
fun war-story

A Loving Relationship

A ramble against CQRS

A lot of interesting articles have been published about Command Query Responsibility Segregation.

This is a mere rant. Not necessarily against CQRS per se, but against when it is being applied in spite of Martin Fowlers cautionary words:

For some situations, this separation can be valuable, but beware that for most systems CQRS adds risky complexity.
Martin Fowler (CQRS Article)

19 Sep 2019

DateStart + DateEnd
And Their Evil Relatives


A ramble against objects containing DateStart & DateEnd pairs of properties.

Some of their equally evil relatives:

  • DateStart & TimeSpan or Day/Month only in DateTime, etc.
  • decimal Money & string Currency
  • decimal X/Y and/or Width/Height

This is the case for the ValueObject:

A small simple object, like money or a date
range, whose equality isn’t based on identity.
— Martin Fowler

19 Jun 2019

Robocode Tutorial

robo-code/robocode : Build the best - destroy the rest!

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.

18 Jun 2019

Robocode Installation & Debugging

robo-code/robocode : Build the best - destroy the rest!

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.

18 Jun 2019