Posts about Patterns & practices

I shipped five products with my own AI agent. Then I built what it was missing.

Instructions in a prompt are requests. How I moved my rules out of the prompt and into tests, analyzers and decisions.

Skills, not docs

Documentation tells an agent how a library works. A skill tells it what it will get wrong from habit. Keeping the two apart is what makes either one useful.

Should I create an interface for my entity (i.e. a User object)?

I got the question above in my ADO.NET done right article. I hope that my answer can help others and therefore it got this dedicated post.

Communicating business rules with methods

Do you use anemic models? i.e. having business classes like “User” without any methods but just properties instead? Do you want to do better but do not know…

When is a logger a dependency?

There is some discussion about whether loggers should get injected into your classes (dependency injection) or if you should use the logger facade (like…

Service locator is not an anti pattern

(This article has been rewritten since it didn’t seem like I managed to communicate my thoughts properly)

Double check pattern

I just answered a question on SO about lazy loading which involved the double check pattern. It’s a really useful pattern for lazy loading since it hurts…

Get injected into the world of inverted dependencies

I’ve just written a new article on CodeProject. It’s an introduction to Inversion Of Control containers and Dependency Injection. It can be found here.

SOLID principles with real world examples

The following article aims to explain the five SOLID principles with real world examples. The SOLID principles are five programming principles which are…

Liskov’s Substitution Violation in the real world

I was creating an integration between my own users table (or document since I use RavenDB) with the MembershipProvider in ASP.NET. I’m using the default SQL…