Introduction One of Playwright's most useful features is its Trace Viewer. This blog post explores what Playwright’s Trace Viewer is, how it can be used, and how it can help…
The foreach Loop Best Practices and Common Pitfalls
Introduction The foreach loop in .NET is a powerful and commonly used construct that simplifies iterating over collections. While its simplicity and readability are undeniable, there are nuances and potential…
HashSet v List
Introduction In .NET, collections are fundamental to data storage and manipulation. While List<T> is a go-to choice for many developers, HashSet<T> is a powerful alternative offering unique performance benefits. This…
Asynchronous Task.Delay
Introduction Task.Delay is a method in the .NET framework that creates a task that completes after a specified time period. Asynchronous programming often uses this method to introduce a delay…
Optimising Performance by Defining the Length of a C# List
Introduction When working with collections in C#, especially List<T>, understanding how they grow and the implications on performance is very important. This blog post looks into the inner workings of…
Using Custom ID Classes
Introduction Managing identification fields (IDs) is crucial to data integrity and application design. For years, I have done what most people do and defined most IDs as Ints, Longs, Strings,…
Guard Clauses
Introduction Ardalis.GuardClauses is a package in .NET created by Steve Smith (also known by his alias, Ardalis), who is an experienced software architect and developer. The package is designed to…
The Bulkhead Pattern
Introduction In microservices and distributed systems, resilience and fault tolerance are not just buzzwords but essential components of system design. The Bulkhead Pattern, borrowed from naval architecture, offers an approach…
Understanding Task.Yield
Introduction Asynchronous programming has become a cornerstone in modern C# development, especially for applications that require high responsiveness and scalability. Among the plethora of tools and keywords at the disposal…
Underused Moq Features
Introduction One of the most underused features of Moq, is its ability to handle callbacks and custom method implementations. While many developers are familiar with the basic setup and verification…