Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Ben Witt
The Most Dangerous Bias of Your AI Assistant Is That It Agrees with You – Part 2: Why We Also Need to Remove Rules Again
The first part of this series was about diagnosis: Part I a reflective layer at the end of a session that makes sycophancy drift visible — that is, the model’s trained tendency to agree with the user instead of pushing back — and writes suggestions into a file. For human review, not for automatic adoption. What I deliberately left open there was this: What happens to those suggestions afterwards?
Durable Workflows Are Great, and the Wrong Choice for Short Pipelines
With the Microsoft Agent Framework and its Durable Task extension, durable execution is once again a major topic in the .NET world. The idea is tempting: define agents and workflows in ordinary code, then let the runtime handle persistence, crash recovery, state management, distributed scaling, and observability. That is strong technology.
RabbitMQ Dead Letter Queues in .NET: Why We Chose This Approach and Where It Hit Us
In a message-based system, one of the first questions you have to answer is this: What happens to a message that cannot be processed? The naive answer is: catch the exception, log it, and move on. That works until you realize what it really means: you are silently losing messages in production. No rollback, no second chance, no audit trail. RabbitMQ's Dead Letter Exchange, DLX, is a good answer to this problem. But it is not magic, and it is not a complete failure-handling strategy by itself.
MCP Design Patterns: 6 Architectures for Your AI Tools
The Model Context Protocol is everywhere right now. Everyone is building MCP servers, connecting tools to agents, and exposing internal systems to AI clients. What gets less attention is the architecture behind those servers. An MCP server is not just a template you set up once and forget. Depending on the use case, the right structure can be completely different.
Local AI Pipeline: Why Certain Workloads Never Leave the Machine
The default assumption is still this: AI means cloud API. You send your text, your audio, or your document to an endpoint, pay per token, and get a result back. For many tasks, that is perfectly valid. For a specific class of tasks, it is the wrong default. In my setup, those tasks run locally, on my own hardware, inside my own network. No document or transcript content is sent to an external AI endpoint. This is not a religious argument about local versus cloud. It is a decision logic.
A Generic Table API with Dapper in 80 Lines of C#
Sometimes you quickly need a read-only API on top of a PostgreSQL database. No Entity Framework setup. No code generation. No endpoint per table. Just query a known table and return the result. The tempting version is fully dynamic: GET /api/{table} That is useful for demos, but dangerous if it means every table in the database suddenly becomes reachable from HTTP.
Semantic Search with PostgreSQL: Pragmatism Beats Hype - Most of the Time
When you start adding semantic search to an application, the obvious options are often Pinecone, Weaviate, Qdrant, Milvus, or another dedicated vector database. That can be the right choice. But many applications already have a PostgreSQL database running. And for a large class of semantic search use cases, that database can do the job directly. The key is pgvector, an open-source PostgreSQL extension that adds vector types and vector similarity search to Postgres.
Stop Loading Your Entire Instruction System Into Every Session
Most people talk about better prompts. Hardly anyone talks about what happens before every prompt: the instructions the assistant loads into the context before the actual work begins. Depending on the system, you pay for that in different ways: input tokens, latency, reduced available context, or simply more noise in the assistant's active instructions.
The Most Dangerous Bias of Your AI Assistant Is That It Agrees With You
We talk a lot about hallucinations. But there is another failure mode we should take just as seriously: AI assistants are optimized to be helpful, polite, and cooperative. Over a longer session, that can quietly turn into agreeableness. In a system that is supposed to help you think, this is not a cosmetic problem. It is the core problem. An assistant that agrees with you simply because you are the one asking is worthless as a sparring partner.
Building your own local AI app
Press enter or click to view image in full size The era of artificial intelligence is in full swing. But the prevailing dependence on cloud-based services raises important questions: What about data protection? How do the running costs scale? And how high is the latency for real-time interactions? The answer to these challenges is increasingly local AI.
Load balancing in C#
In modern web applications, load balancing distributes incoming requests across multiple servers to prevent overload and ensure high availability. While external components such as NGINX, Azure Load Balancer or hardware appliances are often used for this purpose, a load balancer can also be implemented entirely at the application level — e.g. in a .NET web API. Why would you do this?
Transitive Dependency
Challenges and Approaches in .NET Ben Witt · Follow 5 min read · -- Imagine you are developing a .NET application that runs perfectly at first. Suddenly, however, unexpected runtime errors occur – even though your main project does not explicitly include any additional packages. How can this phenomenon be explained? Often, the cause is a transitive dependency: a library such as Entity Framework Core is silently included in your project via another NuGet package.
Efficient Debugging and Precise Logging in C#: Using Caller Attributes
Ben Witt · Follow Published in .Net Programming · 5 min read · -- Photo by Zan Lazarevic on Unsplash How often do you wish, while debugging a complex application, to instantly see where in the code an error was triggered? Often, you are left with basic error messages that lack valuable context or exact code lines. This is where the C# attributes [CallerMemberName], [CallerFilePath], and [CallerLineNumber] come into play.
Asynchronous HTTP Requests - Explained Simply
Ben Witt · Follow Published in .Net Programming · 4 min read · -- Photo by Ferenc Almasi on Unsplash Imagine a waiter taking your order and waiting in the kitchen until your food is ready. During this time, the waiter cannot serve other guests. This is how a synchronous HTTP request works — it blocks the process. An asynchronous HTTP request, on the other hand, allows the waiter to serve other guests while your food is being prepared.
A Critical Look at Cancellation Management in .NET Applications
Ben Witt · Follow Published in .Net Programming · 7 min read · -- Photo by Markus Spiske on Unsplash The CancellationToken and its related types provide a unified and effective way in .NET to gracefully cancel tasks, threads, or asynchronous operations. But how often is this feature actually used in practice, and what risks come with improper handling? This article explains how the CancellationToken works and offers concrete recommendations for its efficient use.
HybridCache in a console application with Redis
In modern applications, the efficient management of data and the avoidance of unnecessary database queries is essential. An effective way to achieve this is to use a HybridCache, which utilises both a MemoryCache and a Distributed Cache such as Redis. In this article, I will present an implementation of a HybridCache in a console-only application and explain when to query which cache to achieve optimal performance.
Implementing the Cached Repository Pattern in C#
Introduction to the Concept of a Cached Repository A cached repository is a design pattern aimed at enhancing application performance by storing data in a fast-access memory area known as a cache. This reduces the number of database accesses, thereby improving response times and the application's scalability. A repository abstracts data access and provides uniform interfaces for CRUD operations (Create, Read, Update, Delete).
Artificial Intelligence with ML.NET for text classifications
Recently, Artificial Intelligence (AI) has been gaining popularity at breakneck speed. OpenAI’s ChatGPT was a breakthrough in Artificial Intelligence, and the enthusiasm was huge. ChatGPT triggered a trend towards AI applications that many companies followed. You read and hear about AI everywhere. Videos and images of celebrities performing strange dance moves appear, or you hear interviews and songs by artists who have “actually” been dead for several years.
Wpf Application with Plugin Architecture
WPF APPLICATION I'd like to delve into an exciting topic: WPF and plugins. We'll go beyond the basics and explore how you can enhance your WPF apps with a plugin architecture. Trust me, this will elevate your applications to a whole new level! WPF and Plugins - What Makes Them So Special? You're probably familiar with Microsoft's WPF. It's fantastic for desktop applications. But you know what's even better?
Cached Repository in C#
Introduction to the Concept of a Cached Repository A cached repository is a design pattern aimed at enhancing application performance by storing data in a fast-access memory area known as a cache. This reduces the number of database accesses, thereby improving response times and the application's scalability. A repository abstracts data access and provides uniform interfaces for CRUD operations (Create, Read, Update, Delete).
Artificial Intelligence with ML.NET for text classifications
ARTIFICIAL INTELLIGENCe Recently, Artificial Intelligence (AI) has been gaining popularity at breakneck speed. OpenAI's ChatGPT was a breakthrough in Artificial Intelligence, and the enthusiasm was huge. ChatGPT triggered a trend towards AI applications that many companies followed. You read and hear about AI everywhere. Videos and images of celebrities performing strange dance moves appear, or you hear interviews and songs by artists who have "actually" been dead for several years.
Interceptors: The basics and their use under Entity Framework
Introduction to interceptors: understanding the basics In the complex world of software development, it is crucial to make code not only efficient, but also extensible and easy to maintain. Interceptors offer an elegant approach to meeting these requirements. But what are interceptors? Definition of interceptors: Interceptors are mechanisms that make it possible to intercept and influence actions before or after methods are called.
Result Pattern
The use of exceptions in C# is basically okay, but you should be careful not to use too many exceptions. If exceptions are constantly used for all possibilities, the code can become slow and inefficient. These exceptions are actually meant to be used when something unexpected happens or the normal program is messed up. It would be good to use these exceptions only for such special cases so that the code remains efficient.
Task vs ValueTask
Why is asynchronous programming important? In today’s software development, many tasks are time-consuming, especially those based on input/output operations, such as reading or writing data to files, databases, or establishing network connections. In such cases, synchronous code can bog down the application and affect the user experience as they have to wait for these tasks to complete. This is where asynchronous programming comes into play.
The problem with “async void”
The problem with using “async” and “void” in programming languages like C# is that it can lead to unexpected behavior and difficulties in error handling. Let’s take a closer look at why this is a problem: We develop a small console application with the following flow: 1.) First, we issue a message (“Start”) on the console. 2.) Then, we start an asynchronous task that waits for one second before issuing the message “Wait one second” on the console.
Compiled queries under Entity Framework as a performance enhancement
Most of the applications we create today are database-driven. Here, efficient query performance is an important aspect. One powerful option EF offers here is compiled queries. But what are they exactly? And how do they work? Compiled queries If the same queries are used repeatedly within an application, e.g. to create lists or load individual values from the database, compiled queries can achieve a significant increase in performance here.
Domain Events
ABOUT DOMAIN EVENTS Basics, MediatR and CQRS Definition of domain events: Domain events are events that occur in a specific area or domain and are important for the business logic of an application. They represent significant state changes or activities within the system. In contrast to system-wide events, which can affect the entire application, domain events are closely linked to the specific domain or specialist area of your application.
Mid South 2024: Ben’s Not-a-Sklar, Not-a-Tall Bike – Jarrod Bunk & Ben Witt
Tall as this bike may be it’s not a traditional tall bike, and although it was made by Adam Sklar, it’s not a traditional Sklar. Jarrod Bunk couldn’t resist getting a few snaps of Ben and his quirky not-tall bike at this year’s Mid South. Let’s take a closer look… A project that maybe wasn’t intended to see the light of day found its way to the Facebook marketplace, and the link was sent over to the homie Ben Witt.
The Responsibility of Chain pattern
In this article, we dive into the basics of this pattern, also known as Chain of Responsibility, and highlight its importance and use cases in C# development. The essence of the Responsibility of Chain pattern: The Responsibility-of-Chain pattern is a design pattern that allows code to be structured to route requests through a series of handlers. Each handler has the ability to process a request or pass it on to the next handler in the chain.
Introduction to Lazy Objects in C#
This article provides an in-depth exploration of the concept of Lazy Objects in C#. Lazy Objects serve as highly beneficial tools for efficient resource provisioning and initialization, especially in cases where these processes are costly or time-consuming. It offers a comprehensive examination of how Lazy Objects function, their purpose and optimal use cases, as well as practical implementation strategies. 1. Introduction to Lazy Loading Concept What is Lazy Loading?
DBConcurrency with EF Core
What is concurrency in the database? Concurrency is the simultaneous processing of data by multiple users or processes. In a database environment, this can lead to conflicts if two transactions attempt to access the same data at the same time. Concurrency control is important to ensure that multiple processes or threads can run simultaneously in a system without causing unexpected problems.
MS SQL: Temporary table and its use under EF Core
Temporal tables are a functionality of Microsoft SQL Server that allows you to record and manage the history of data. This allows you to track changes and retrieve previous versions of the data. A temporal table is essentially a conventional table that has an integrated system versioning mechanism. This mechanism automatically records changes to the data and saves a history of these changes.
Interceptors: The basics (with AutoFac) and their use under Entity Framework (without AutoFac)
In the complex world of software development, it is crucial to make code not only efficient, but also extensible and easy to maintain. Interceptors offer an elegant approach to meeting these requirements. But what are interceptors? Definition of interceptors: Interceptors are mechanisms that make it possible to intercept and influence actions before or after methods are called. They act as a kind of middleware between the caller and the target function.
Result Pattern
The Result pattern introduces its own result type, which represents the success or failure of an operation. This can be represented by a generic class: public class Result<TValue,TError> { public readonly TValue? Value; public readonly TError?
Android 7 by BlackBerry
BlackBerry hat mit dem KEYone Android 7 als Betriebssystem eingeführt. Die restlichen BlackBerry Android Smartphones werden bald per Update auf Android 7 angehoben. Was ist neu in Android 7 by BlackBerry? Homescreen und App Drawer Homescreen App Drawer Hier sind kaum Änderungen zu bemerken. Einzig zwei neue Apps tauchen auf: Akku-Center und Aktualisierungen.
BlackBerry Hub+ for Business: Apps auf Non-BlackBerry Geräten für Android for Work verteilen
BlackBerry bietet mit dem Hub+ eine Produktivitätssuite auf Android an. Diese Suite besteht aus mehreren Anwendungen, welche spätestens nach dem EOL von Google´s Divide auch für Non-BlackBerry Geräte mit AfW (Android for Work) interessant sind. Derzeit ist es schwer, bezahlpflichtige Android Apps außerhalb der USA und Canada für den Android for Work Bereich zu verteilen. Wie also bekommt man die BlackBerry Android Apps in den geschäftlichen Bereich?
Samsung Galaxy S9: Geleaktes Video zeigt Enterprise Edition / Daten
Heute abend wird das Samsung Galaxy S9(+) offiziell vorgestellt. Samsung konzentriert sich mit den Geräten auch auf Enterprise Kunden, wie nun ein geleaktes Video zeigt. Für Enterprise Kunden interessant: Unification von Android Enterprise und KNOX, wir berichteten Neue DeX Station. Es reicht ein angeschlossener Bildschirm, Tastatur und Maus wird über das Galaxy realisiert. Bisherige Sicherheitsfunktionen / Services bleiben bestehen.
Zusammenfassung Sicherheit des Android by BlackBerry / BlackBerry Secure
BlackBerry bietet “BlackBerry Secure” in Lizenz an: ein besonders gehärtetes Android. Dies gilt für alle BlackBerry Android Smartphones und auch alle Geräte mit “BlackBerry Secure” Label. Doch was unternimmt BlackBerry in Sachen Sicherheit zusätzlich zu den Sicherheitsmaßnahmen von Google wie in z.B. Android Oreo?
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Ben
Contact Ben, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack