Mocking LINQ Expressions

Hello and welcome In today's post, we will discuss mocking/stubbing lambda expressions so that we can have a bit more control over our unit tests. Keep in mind that I'm by no means versed in expression trees so I will try my best to explain. What is an Expression and how to use it Going … Continue reading Mocking LINQ Expressions

The rise of the Null-Object pattern in C# 8

Hello and welcome, As I probably mentioned in some of my older posts, I'm a big fan of code restrictions that can be imposed by the IDE. I think this is a reason why stylecop was/is so popular (I don't know since I mostly use Rider nowadays and Resharper for Visual Studio). Because of this, … Continue reading The rise of the Null-Object pattern in C# 8

Enhancing Asp.Net Core logging pipeline with Serilog

Enhancing Asp.Net Core logging pipeline with Serilog Hello and welcome :), Today I want to show how we can switch out the default logging pipeline in favor of Serilog which has a lot more providers implemented by the community and also provides a way to log structured data. The backstory For those of you who … Continue reading Enhancing Asp.Net Core logging pipeline with Serilog

Automation testing dogma and exploration

Hello and welcome :), In a previous post I hinted about today's topic. So in this post, I want to discuss two topics: Automated tests dogma - this is based on my opinions of things we as developers need to loosen our grip on. Exploratory testing - why and where should we introduce randomness and … Continue reading Automation testing dogma and exploration

Securing Ids on web applications

Hello and welcome 🙂 Recently I have been reading through the documentation and articles about how to protect our web applications from tampering when giving a form to the user. Looking at this, one realizes that the cause for these security measures is due to the inherent nature of HTTP, in that being stateless, we … Continue reading Securing Ids on web applications

Performance with IDisposable, outside the box

Hello and welcome, Today I wanted to share with you a technique I used in the past, though by all means not an impressive feat. But first a little story about IDisposable and why I chose this approach. The IDisposable interface is mainly used as a way for the Gargabe Collection to release unmanaged resources, … Continue reading Performance with IDisposable, outside the box

Enums, Flags and Binary Literals

Hello and welcome, Today we're going to look at the enum value types, how they can be composed as flags and how C# 7 makes it easier for us to use and understand. We touched upon enums during the post The hidden side-effect of enums and values. Now we're going to have a more in-depth … Continue reading Enums, Flags and Binary Literals

FileSystem Syncher – Part 3

Hello and welcome, I thought it's just about the time we continue from where we were in the last part of this project. As always if you want to follow along, the source code from last time can be found here. The reason there is a new release and not just continuing from last time … Continue reading FileSystem Syncher – Part 3

Errors, the black sheep of the family

Hello and welcome, Today we will take a look at the so called "black sheep" of the family of development and those are errors, namely compiler errors and exceptions. The reason I consider them as black sheep is that they often get a bad reputation even though the reason why they exist is to keep … Continue reading Errors, the black sheep of the family

C# modifiers use and abuse – Part 2

Hello and welcome to part two of the use and abuse of the C# modifier keywords, Last time we looked at the access modifiers that apply to types (class, struct, and enums) and members (fields, methods, nested classes, etc.), this time we will have a look at some additional keyword modifiers that are used and … Continue reading C# modifiers use and abuse – Part 2