Daily DevOps & .NET - Where Code Meets Culture

Stop Parsing the Same String Twice: CompositeFormat in .NET

Stop Parsing the Same String Twice: CompositeFormat in .NET

Every time you call string.Format() with the same format string, .NET parses it again. And again. And again. CompositeFormat changes that: parse once, reuse forever. The result? Up to 30% faster formatting, fewer allocations, and a one-line code change. Here’s why this matters and how to use it.
How SearchValues Saved Us From Scaling Hell

How SearchValues Saved Us From Scaling Hell

While you’re busy optimizing database queries and adding cache layers, thousands of string searches per second are quietly eating your CPU budget. The problem isn’t visible in your APM dashboard because it’s distributed across every request. But it’s there. Compounding. Scaling linearly with load.

I discovered this the hard way when a log processing API started choking under production traffic. The bottleneck? String validation and sanitization. The fix? A .NET 8 feature that delivered a 5x performance improvement and let us shut down servers instead of adding them. And it’s gotten even better in .NET 9 and 10.

Clean Code: A Lip Service, Not a Standard

Clean Code: A Lip Service, Not a Standard

Clean Code is often praised but rarely practiced effectively. This article explores how misunderstood ideals and over-engineering harm .NET systems, how to recognize such failures early, and which C# best practices and official guidelines truly support maintainable software.
ConstantExpectedAttribute: Unlocking Performance Through Compiler Awareness

ConstantExpectedAttribute: Unlocking Performance Through Compiler Awareness

The ConstantExpectedAttribute, introduced in .NET 7, provides a powerful mechanism to signal compiler expectations about constant values. This enables better performance optimizations, enhanced IDE tooling, and clearer API contracts. Learn how to leverage this attribute to build more efficient and maintainable .NET applications.
Retiring Legacy .NET Projects — Balancing Risk, Cost, and Forward Value

Retiring Legacy .NET Projects — Balancing Risk, Cost, and Forward Value

In every mature .NET landscape, legacy projects represent both heritage and hazard. They once powered entire business models — now they silently consume time, budget, and attention. The decision to retire or modernize them isn’t about technology fashion. It’s about sustaining the organization’s capacity for value creation.