---
title: "Blog — Ivan Kahl"
description: "Articles by Ivan Kahl on .NET, C#, PostgreSQL, architecture and AI."
url: https://ivankahl.com/blog/
---

# Blog

Practical guides and deep dives on software engineering, architecture and AI.

## 2026

13 Oct 2026

### [Why AI Slop Is a Human Problem](https://ivankahl.com/blog/why-ai-slop-is-a-human-problem/)

AI slop comes from skipped judgement, not from the tools themselves. Better review habits and real expertise are the fix, not abandoning AI altogether.

5 min read

23 Mar 2026

### [Beyond CRUD: A Practical Guide to Modeling Business Processes in REST APIs](https://ivankahl.com/blog/practical-guide-to-modeling-business-processes-in-rest-apis/)

Five patterns for modeling complex business processes in REST APIs, from nesting sub-resources to accepting RPC-style verbs when CRUD falls short.

10 min read

12 Mar 2026

### [8 NDepend Rules to Enforce Domain-Driven Design in .NET](https://ivankahl.com/blog/8-ndepend-rules-to-enforce-domain-driven-design-in-dotnet/)

Eight NDepend CQLinq rules automate Domain-Driven Design enforcement in .NET, protecting architectural boundaries, entities, and aggregate roots.

13 min read

## 2025

17 Dec 2025

### [Decompiling the New C# 14 field Keyword](https://ivankahl.com/blog/decompiling-the-new-csharp-14-field-keyword/)

The IL code behind the C# 14 field keyword reveals how it removes property boilerplate, and which caveats matter before refactoring an existing codebase.

11 min read

13 Oct 2025

### [Mastering the C# Dispose Pattern](https://ivankahl.com/blog/csharp-dispose-pattern/)

Reliable resource management in C# depends on IDisposable. Implementing it correctly cleans up unmanaged resources like file handles and connections, and prevents leaks.

9 min read

02 Oct 2025

### [Stop Spaghetti SQL: Simplify Complex Queries with Postgres CTEs in Supabase](https://ivankahl.com/blog/stop-spaghetti-sql-simplify-complex-queries-with-postgres-ctes-in-supabase/)

Postgres common table expressions break tangled queries into clear, named steps. A music streaming app on Supabase demonstrates how much more readable they become.

15 min read

10 Sept 2025

### [What's New in C# 14: Null-Conditional Assignments](https://ivankahl.com/blog/csharp-14-null-conditional-assignments/)

C# 14 adds null-conditional assignment, a feature that safely assigns values to properties or indexers without long chains of if statements.

4 min read

04 Aug 2025

### [What's New in C# 14: User-Defined Compound Assignments](https://ivankahl.com/blog/csharp-14-user-defined-compound-assignments/)

C# 14 lets types define their own compound assignment operators, avoiding unnecessary object creation. The feature is explained along with the pitfalls to avoid.

4 min read

16 Jan 2025

### [Google Gemini Receipt Parser for YNAB](https://ivankahl.com/blog/google-gemini-receipt-parser-for-ynab/)

Logging expenses in YNAB by hand is tedious. A Docker-based service now uses Google Gemini to read receipt images and import and categorise transactions automatically.

4 min read

06 Jan 2025

### [Beyond the Random Class: Cryptographic Randomness in .NET 6+](https://ivankahl.com/blog/beyond-the-random-class-cryptographic-randomness-in-net-6/)

Security-sensitive code needs true randomness. Here, .NET's RandomNumberGenerator class is used to produce cryptographically secure random values instead of Random.

7 min read

01 Jan 2025

### [C# Null-Conditional (?.) & Null-Coalescing (??) Operators Explained](https://ivankahl.com/blog/csharp-null-conditional-and-null-coalescing-operators-explained/)

C#'s null-conditional and null-coalescing operators handle null values gracefully, resulting in cleaner and more robust code. Each is explained with examples.

4 min read

## 2024

03 Jun 2024

### [Introduction to Mapster in C#: Benefits and Quick Start Guide](https://ivankahl.com/blog/introduction-to-mapster-in-csharp/)

Mapster is a high-performance object mapping library for .NET. A beginner-friendly introduction highlights the key features behind efficient data mapping in C#.

7 min read

## 2022

21 Mar 2022

### [Extension Methods in C#](https://ivankahl.com/blog/extension-methods-in-csharp/)

Extension methods let C# developers add functionality to existing classes, even sealed third-party ones, without resorting to inheritance or wrapper classes.

5 min read

## 2021

18 Dec 2021

### [Case-sensitive and Case-insensitive String Comparisons in PowerShell](https://ivankahl.com/blog/case-sensitive-and-insensitive-string-comparisons-in-powershell/)

PowerShell offers separate operators for case-sensitive and case-insensitive string comparisons, such as -eq, -ceq, -like, and -clike. Each is explained with examples.

1 min read

14 Dec 2021

### [Logging .NET to AWS CloudWatch: Using NLog](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-nlog/)

NLog can ship .NET application logs straight to AWS CloudWatch. This guide covers installation, CloudWatch configuration, and settings for better performance.

3 min read

11 Dec 2021

### [Logging .NET to AWS CloudWatch: Using Serilog](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-serilog/)

Serilog can write .NET application logs to AWS CloudWatch. Setup, CloudWatch integration, and log settings for better performance are covered in detail.

4 min read

10 Dec 2021

### [Logging .NET to AWS CloudWatch: Understanding the basics using AWS SDK](https://ivankahl.com/blog/logging-dotnet-to-aws-cloudwatch-using-awssdk/)

The AWS SDK can send .NET application logs directly to CloudWatch. Log groups and streams are created, and log messages are sent programmatically, step by step.

7 min read

17 Jul 2021

### [Introduction to Aspect-Oriented Programming (AOP) in .NET with Autofac Interceptors](https://ivankahl.com/blog/introduction-to-aspect-oriented-programming-in-dotnet-with-autofac-interceptors/)

Aspect-Oriented Programming improves modularity and readability in .NET. Autofac interceptors are set up and used to apply AOP principles in practice.

7 min read

## 2020

06 Dec 2020

### [Three Methods to Convert Strings into Enums in C#](https://ivankahl.com/blog/three-methods-to-convert-strings-into-enums-in-csharp/)

Three methods for converting strings into enums in C# are compared, with guidance on which approach best suits different performance and safety requirements.

5 min read

22 Oct 2020

### [Using Config.Net for .NET Application Configurations](https://ivankahl.com/blog/use-config-net-for-net-application-configurations/)

Config.Net offers an interface-based way to manage settings in .NET and .NET Core applications with minimal boilerplate. A follow-up to the App.config article.

5 min read

13 Jun 2020

### [The Comprehensive Guide to Custom DateTime String Formats in C#](https://ivankahl.com/blog/the-comprehensive-guide-to-custom-datetime-string-formats-in-csharp/)

C# offers several ways to turn a DateTime into a string. Custom format specifiers give full control over the output, and each one is explained with examples.

8 min read

20 Feb 2020

### [Backing Up and Restoring Native SQL Server Backups in AWS RDS](https://ivankahl.com/blog/backing-up-and-restoring-native-sql-server-backups-in-aws-rds/)

Native SQL Server backups can be created and restored in AWS RDS once an S3 bucket and the right access are in place, as this walkthrough shows step by step.

4 min read

## 2019

29 Oct 2019

### [Getting AWS Lambda Environment Variables in all supported languages](https://ivankahl.com/blog/getting-aws-lambda-environment-variables-in-all-supported-languages/)

Every language supported by AWS Lambda reads environment variables through its own native API. Code snippets for each are collected in one place, with no extra dependencies.

1 min read

23 Sept 2019

### [Send Slack messages from anywhere using Webhook Integration](https://ivankahl.com/blog/send-slack-messages-from-anywhere-using-webhook-integration/)

A Slack bot with an incoming webhook can notify a team channel when a process fails. Setup is shown step by step, with Postman used to send a test message.

2 min read

27 Mar 2019

### [Enabling and Disabling Hyper-V in Powershell](https://ivankahl.com/blog/enabling-and-disabling-hyper-v-in-powershell/)

Running VirtualBox or other virtualization software on Windows 10 often means turning Hyper-V off. Two PowerShell commands make enabling and disabling it quick.

1 min read

21 Feb 2019

### [Using SData 2.0 in Sage CRM: Part 5 - A word on authentication](https://ivankahl.com/blog/using-sdata-2-0-in-sage-crm-part-5-a-word-on-authentication/)

The final part of the SData 2.0 series for Sage CRM, comparing the available authentication methods and when each one is the best choice.

4 min read

19 Feb 2019

### [Using SData 2.0 in Sage CRM: Part 4 - Deleting records](https://ivankahl.com/blog/using-sdata-2-0-in-sage-crm-part-4-deleting-records/)

Part four of the SData 2.0 series for Sage CRM, showing how to delete records with the DELETE verb, using examples such as removing a company.

1 min read

17 Feb 2019

### [Using SData 2.0 in Sage CRM: Part 2 - Updating records](https://ivankahl.com/blog/using-sdata-2-0-in-sage-crm-part-2-updating-records/)

Part two of the SData 2.0 series for Sage CRM, showing how to update existing records with the PATCH verb and a JSON request body, using examples.

2 min read

17 Feb 2019

### [Using SData 2.0 in Sage CRM: Part 3 - Inserting records](https://ivankahl.com/blog/using-sdata-2-0-in-sage-crm-part-3-inserting-records/)

Part three of the SData 2.0 series for Sage CRM, showing how to insert new records with the POST verb, using examples such as creating a company.

3 min read

16 Feb 2019

### [Using SData 2.0 in Sage CRM: Part 1 - Introduction and Querying](https://ivankahl.com/blog/using-sdata-2-0-in-sage-crm-part-1-introduction-and-querying/)

The first in a series on SData 2.0 in Sage CRM, introducing the RESTful API, how it differs from SData 1.1, and how to query records with Postman.

5 min read

15 Feb 2019

### [SMTP, IMAP and POP Settings for Popular Email Providers](https://ivankahl.com/blog/smtp-imap-and-pop-settings-for-popular-email-providers/)

A quick reference of the SMTP, IMAP, and POP server addresses, ports, and security settings for popular email providers, handy for email integrations.

1 min read

08 Jan 2019

### [Relicensing Sage CRM](https://ivankahl.com/blog/relicensing-sage-crm/)

Renewing or upgrading a client's Sage CRM license means relicensing the system. The short process is laid out step by step, along with its prerequisites.

1 min read

08 Jan 2019

### [Sage CRM Exchange Integration: Sage CRM Setup](https://ivankahl.com/blog/sage-crm-exchange-integration-sage-crm-setup/)

Synchronizing contacts, appointments, and tasks between Sage CRM and Exchange/Office 365 starts with configuring the integration in Sage CRM, as shown here.

2 min read

07 Jan 2019

### [Sage CRM Exchange Integration: Office 365 Setup](https://ivankahl.com/blog/sage-crm-exchange-integration-office-365-setup/)

Before Sage CRM can sync with Exchange, Office 365 needs a dedicated user and an impersonation role. The setup is covered step by step.

1 min read

06 Jan 2019

### [Cannot process file because of mark of the web error in Visual C# project](https://ivankahl.com/blog/cannot-process-file-because-of-mark-of-the-web-error-in-visual-c-project/)

A build error caused by the Mark of the Web can block Visual Studio projects. Several fixes are covered, from unblocking files to more obscure solutions.

4 min read

## 2018

12 Nov 2018

### [Fixing "Authentication required, Browser session mismatch" error in Sage CRM](https://ivankahl.com/blog/fixing-authentication-required-browser-session-mismatch-error-in-sage-crm/)

Logging into Sage CRM over HTTPS with Internet Explorer can trigger a "Browser session mismatch" error. The cause and the fix are explained.

1 min read

23 Oct 2018

### [Fixing "Cannot create file" error when viewing Sage CRM report on screen](https://ivankahl.com/blog/fixing-cannot-create-file-error-when-viewing-sage-crm-report-on-screen/)

A domain change can leave the Sage CRM application pool without file permissions, causing a "Cannot create file" error in reports. Granting access fixes it.

1 min read

14 Aug 2018

### [The 'humbs.db' attachment in Sage CRM emails](https://ivankahl.com/blog/the-humbs-db-attachment-in-sage-crm-emails/)

A mysterious humbs.db attachment can get Sage CRM emails flagged as spam. Disabling thumbnail caching and removing existing attachments resolves it.

1 min read

08 Aug 2018

### [Enabling CORS in Nancy](https://ivankahl.com/blog/enabling-cors-in-nancy/)

A single line of code in a Nancy module enables CORS, allowing a REST API built with Nancy to be called from JavaScript hosted on other domains.

2 min read

03 Aug 2018

### [Disabling checkpoints in Hyper-V](https://ivankahl.com/blog/disabling-checkpoints-in-hyper-v/)

Hyper-V's automatic checkpoints can slow down shutdowns and corrupt virtual drives when merging fails. Disabling them per virtual machine avoids the problem.

1 min read

01 Aug 2018

### [Fixing "Class not registered" error in Sage CRM .NET pages](https://ivankahl.com/blog/fixing-class-not-registered-error-in-sage-crm-net-pages/)

A July 2018 Windows update can break Sage CRM .NET pages with a "Class not registered" error. A small IIS authentication change resolves it.

1 min read

01 Aug 2018

### [Fixing "UnexpectedEvent" when uploading documents in Sage CRM](https://ivankahl.com/blog/fixing-unexpectedevent-when-uploading-documents-in-sage-crm/)

Sage CRM document uploads can fail with an "UnexpectedEvent" error when document type codes are too long. The cause and the fix are explained here.

2 min read

13 May 2018

### [Fixing CredSSP encryption oracle remediation in RDP](https://ivankahl.com/blog/fixing-credssp-encryption-oracle-remediation-in-rdp/)

After the CredSSP security patch, RDP connections to unpatched servers fail with an encryption oracle error. A temporary registry change gets connections working again.

2 min read

01 Apr 2018

### [Sage CRM .NET Templates Visual Studio Extension](https://ivankahl.com/blog/sage-crm-net-templates-visual-studio-extension/)

A Visual Studio extension speeds up .NET development for Sage CRM, bundling project templates, item templates, and snippets for commonly used components.

4 min read

01 Apr 2018

### [Using SQL Server Cursors](https://ivankahl.com/blog/using-sql-server-cursors/)

SQL Server cursors process data one record at a time, much like a loop in code. A worked example imports companies and their people from a staging table.

4 min read

02 Mar 2018

### [Converting between different virtual drive formats](https://ivankahl.com/blog/converting-between-different-virtual-drive-formats/)

Moving a virtual machine between Hyper-V and VirtualBox often means converting its drive. StarWind V2V Converter handles VHDX to VHD conversion for free.

4 min read

29 Jan 2018

### [Using Reflection to execute assemblies at runtime in C#](https://ivankahl.com/blog/using-reflection-to-execute-assemblies-at-runtime-in-c/)

Reflection lets a C# application load DLL assemblies at runtime, extract methods from them, and execute those methods without compile-time references.

8 min read

24 Jan 2018

### [Creating Custom Configuration Sections in App.config](https://ivankahl.com/blog/creating-custom-configuration-sections-in-app-config/)

Custom configuration sections let a .NET app read structured settings from its App.config file. The classes needed to define and read them are demonstrated.

6 min read

## 2017

22 Dec 2017

### [Python Virtual Environments in Visual Studio](https://ivankahl.com/blog/python-virtual-environments-in-visual-studio/)

Python virtual environments keep project dependencies isolated, and Visual Studio makes them easy to manage. Creating and using them is covered step by step.

3 min read

02 Dec 2017

### [Python List and Dictionary Comprehensions](https://ivankahl.com/blog/python-list-and-dictionary-comprehensions/)

Python comprehensions build lists and dictionaries from existing data or generated sequences in a single readable expression, as these examples show.

7 min read

## 2015

22 May 2015

### [App Review: Pythonista](https://ivankahl.com/blog/app-review-pythonista/)

Pythonista brings a full Python editor and runtime to iPad and iPhone. A hands-on review of its code editor, custom keyboard, and other features for coding on the go.

6 min read

21 May 2015

### [Blog's up and running](https://ivankahl.com/blog/blogs-up-and-running/)

A short welcome to the blog, which was started to share thoughts, tutorials, and lessons learned on programming and other hobby-related topics.

1 min read
