
Using Linq to refactor code
Here is some poorly written code that I had to review today and modify (i.e refactor). I have removed the domain of the code and renamed the variables, so that it remains anonymous, but the just of the code is…
Practical guides on AI agents, LLM security, C#/.NET and Cloud, from Taswar Bhatti

Here is some poorly written code that I had to review today and modify (i.e refactor). I have removed the domain of the code and renamed the variables, so that it remains anonymous, but the just of the code is…

Here is a nice little code I did recently, where the Command Pattern is used with a notification observer like pattern. First of the Command Pattern, a simple interface for task with an execute method public interface ITask { ///…
Read more: Command Pattern with Notification Event Delegates

Thanks to everyone who came to Unit Testing with Mocking Framework at the code camp today, I will get those Typemock license to the 2 winners. Here is the code if anyone is interested https://github.com/taswar/Ottawa-IT-Code-Camp-Unit-Testing-with-Mocking-Framework Here is the presentation. Mocking…
Read more: Ottawa IT Code Camp – Unit Testing with Mocking Framework

There are certainly many ways to stub out dependency, using constructor injection, etc etc. Here is one way to quickly stub out ServiceLocator rather than implementing ServiceLocatorStub. Lets say you have code that uses a helper and the dependency is…

In this Learn Series I am going to write about the Sprout Method which is in the book “Working Effectively with Legacy Code by Michael Feathers“, all I have to say is what a great book if you don’t have…
Read more: Learn The Sprout Method for adding new functionality