Preventing dependency version conflicts in .Net libraries

What is the issue? Dependency version conflicts happen when you have multiple libraries referencing the same dependency, but with different version numbers. This is in fact quite common, so much so that Microsoft has done a lot to try and automatically resolve the issue. You might even be affected by it without knowing. The way […]

Read More »

DevOps: Automating pushing your GitHub project to NuGet

I recently set about updating some of my .NET Framework projects to .NET Standard 2.0, as I wanted to support both the “old” .NET Framework, as well as .NET Core. In doing so I also wanted to push new NuGet packages of the .NET Standard version, so others can benefit from these projects as well. […]

Read More »

C# based simple service locator

I’ve always loved the Service locator pattern – why ? Because it requires so little maintenance, and it’s a very crucial point if you want somewhat automatic dependency injection.

As you can read in my blog post “Staying DRY: Mind those switch statements” a service locator can replace cumbersome multiple switch statements which require each one to be changed whenever a new case comes along.

Read More »

Finding unused indexes on MS SQL server

Do you ever find yourself not getting rid of old indexes, when they’re no longer needed ?

I guess we all do sometimes, but luckily SQL server keeps track of the usage of indexes, which allows you to find those unused indexes easily.

Read More »

SOLID principles – Part 4: Interface Segregation Principle

This is the fourth of a five part series, where I go over the 5 principles which make up the SOLID principles by Robert C. Martin.

The fourth one is I: Interface Segregation Principle (ISP)

This principle states that interfaces should only contain the absolutely required properties/methods needed.
If an interface contains properties/methods the client code does not need, it should be split into more smaller interfaces.

Read More »

SOLID principles – Part 3: Liskov’s Substitution Principle

This is the third of a five part series, where I go over the 5 principles which make up the SOLID principles by Robert C. Martin.

The third one is L: Liskov’s Substitution Principle (LSP)

This principle states that if S is a subtype of T, then objects of type T may be replaced with objects of type S without altering the desirable properties of the program (includes correctness, task performed, etc.)

Read More »

Staying DRY: Mind those switch statements

As a developer you probably know the DRY abbreviation already: Dont Repeat Yourself.
This is one of the better known principles, and it’s fairly easy to comprehend too: Don’t implement the same logic twice.

However one place where most people slip with DRY, is the switch statement.

Read More »