Programming

C# Interfaces: Default Implementations

Posted on

The C# 8.0 announcement included a note on default implementations of interface members. If you’ve been programming for long enough, this might make you a little nervous at first thanks to the hangovers of multiple inheritance. Before you chuck out this idea, though, let’s look at it from a different perspective. I’m going to talk […]

Programming

Traits vs Mixins

Posted on

Here is a quick disambiguation between Traits vs Mixins for programmers. Mixins are now fairly well known. You can use mixins to add shared methods to your classes without inheriting from the class they live in. It’s an increasingly popular technique for sharing and extending code. Instead of inheriting from a single parent, you can […]

Opinion

Grinders vs Growers: Millenial Falcons Fly Free

Posted on

There is an emerging theme of videos and articles aimed at millennials, telling them that they need to stay in jobs longer and learn “grit and perseverance”. This is the modern equivalent of the patronising change management book “Who Moved My Cheese”, which is handed out by lazy managers when they are performing radom acts […]

Programming

TypeScript Dictarray Options

Posted on

This is one of those cases where a question keeps cropping up, so lots of people are trying to do something that the TypeScript Compiler doesn’t like very much. Yes, it’s time to talk about the TypeScript Dictarray! What’s a Dictarrary? It’s a dictionary that’s also an array. You know… one of these: const dictarray […]

Programming

C# Recursive Patterns: Power If Statements

Posted on

One of the new features in C# 8.0 is Recursive Patterns, or Power If Statements. The easiest way to explain this new feature is to unpack the example from the Building C# 8.0 article. IEnumerable<string> GetEnrollees() { foreach (var p in People) { if (p is Student { Graduated: false, Name: string name }) { […]

Programming

TypeScript Mixins Part Three

Posted on

Don’t worry, the mechanism for creating TypeScript mixins hasn’t changed, but I just wanted to demonstrate that the technique described in TypeScript Mixins Part Two is valid for use with static properties. Reusing the original example, let’s see what happens if we add static properties to our Flies and Climbs mixins. Not only does this […]

Process

Risk Management – Materialisation vs Crystallisation

Posted on

  Risk Management was first made interesting by Tom DeMarco and Timothy Lister in Waltzing with Bears. If you want to know more about the subject, that’s a good place to start. But what is the difference between Risk Materialisation and Crystallisation? I will answer this question shortly, but let’s start from the beginning! Risk […]

Programming

Who Deleted Rows from SQL Server

Posted on

Want to know who deleted rows from your SQL database? The script below joins up delete transactions with users in order to find out who just deleted something. Because this comes from the transaction log, you’ll only find stuff that is still available in there. This means it will be affected by retention/recovery modes. If […]

Process

Passing Audits with Azure DevOps

Posted on

Azure DevOps (previous Visual Studio Team Services, Visual Studio Online, and Team Foundation Server) has many great features. We talk about the features all the time; source control, continuous integration, release management, task boards, reports! One of my favourite features is how it helps us to pass audits. There are two ways to pass an […]