About:

Hey, I'm Steven, a .NET Developer and Freelancer in Zurich, Switzerland. I am a Microsoft MVP. Also, this blog is open source on GitHub.

Website:

Specializations:

Subscribe to RSS:
The article critiques the use of ArrayPool<T>.Shared in benchmarks, arguing that many benchmarks are flawed due to improper usage and assumptions. It explains how ArrayPool allows for renting and returning arrays to reduce garbage...
This post humorously examines the challenges of creating excessively long strings in C# and offers a workaround through a custom exception class.
The post critiques the use of the 'new Random()' method in .NET, arguing that it can lead to identical results when multiple instances are created in a tight loop due to its reliance on system clock. The author explains the differ...
Improvements in .NET 11 enhance async state machine performance and memory management, leading to better efficiency and fewer allocations in asynchronous programming.
The post clarifies the output of a C# code snippet involving records and inheritance, highlighting changes introduced in C# 10 for method sealing.
A Full Outer Join feature is expected in LINQ for .NET 11, allowing for comprehensive data retrieval from both sequences, including unmatched elements.
A solution for managing partial updates of entities in TypeScript and C# using extension methods to handle optional properties with varying nullability.
C# 15 may allow users to pass arguments to collection expressions, enhancing performance and usability in creating collections.
C#'s Task.Delay cannot handle delays exceeding 49.7 days, but a workaround is provided for scheduling longer tasks.
Using GitHub runners for benchmarking can lead to unreliable results due to environmental variability, as demonstrated through a simple Pi calculation comparison.
.NET 9 has introduced new methods, Guid.CreateVersion7() and Guid.CreateVersion7(DateTimeOffset), for creating sortable UUIDs/GUIDs based on their creation time, which is beneficial for maintaining chronological order in databases...
The blog post discusses the importance of using CancellationTokens in APIs, particularly in the context of long-running SQL queries. It explains how CancellationTokens can help manage resources effectively by allowing the server t...
The post discusses performance benchmarks for different methods of slicing a list in C#. It compares three methods: SkipAndTake, Take, and GetRange, highlighting that GetRange is the fastest with the least allocations. The author ...
The blog post discusses a database improvement strategy for efficiently handling large datasets, specifically BLOB data, in a project requiring visualization of over 25,000 rows. The author shares their experience with performance...
The post discusses the performance differences between two ways of initializing lists in C#: using collection expressions versus collection initializers. It explains that collection expressions preallocate the list with the exact ...
The post discusses a limitation of Entity Framework's SqlRaw method, which requires that all properties of an entity type be included in the SQL query results. It provides a workaround for this limitation by demonstrating how to e...
This blog post discusses the concepts of inlining and structs in C#, focusing on how inlining can optimize performance by replacing method calls with method bodies, thus avoiding the overhead of method calls. It explains the use o...
The February update of the .NET Toolbox introduces new features for generating C# options, DI configurations, and analyzing class responsibilities.
The 'Toolbox' is a free, open-source tool designed to simplify .NET development for beginners with features like JSON conversion and middleware design.
The blog post discusses the behavior of the ToDictionaryAsync method in Entity Framework Core, highlighting that it retrieves the entire object from the database rather than just the selected fields. It explains the importance of ...
ToListAsync is faster than ToArrayAsync in Entity Framework due to the latter's additional overhead of creating a list before converting it to an array.
The post discusses the changes in xUnit v3 regarding console output capturing, specifically the introduction of the CaptureConsoleAttribute, which simplifies the process compared to v2. It highlights how this attribute can be appl...
The post discusses the new helper features in .NET 11, specifically MediaTypeMap.GetMediaType and MediaTypeMap.GetExtension, which simplify web development by allowing developers to easily retrieve MIME types from file extensions ...
Handy is a powerful open-source speech-to-text tool that operates locally, ensuring privacy and versatility across different applications.