On .NET Live: How Coding Standards Supercharge .NET Quality & Performance

For the second time, I’m excited to be a guest on On .NET Live on May 18th at 9 AM PST! I’ll be talking about one of my favorite subjects: coding standards and how they can supercharge .NET code quality, performance, maintainability, and consistency across your projects. Join us live and bring your burning questions. … Continue reading On .NET Live: How Coding Standards Supercharge .NET Quality & Performance

Collection Performance: AddRange() vs. InsertRange() When Populating Lists

When populating collections in .NET, choosing the right bulk operation improves both clarity and efficiency. Methods like AddRange() and InsertRange() allow multiple items to be added in a single call, reducing overhead compared to repeated individual inserts and clearly expressing intent. When combined with proper capacity planning, these approaches help produce predictable, maintainable code—whether items are being appended or inserted at a specific position.

Microsoft .NET Code Analysis: Avoid Out Parameters in Methods

The excerpt emphasizes the importance of clarity and maintainability in designing APIs and methods in Microsoft .NET. It explains that while out parameters can be useful, they often lead to reduced readability and increased complexity. Their use should be limited to specific scenarios, particularly the Try pattern, for clearer, more maintainable code.

String Performance: Avoid Unnecessary Conversions with StringBuilder

The excerpt from "Rock Your Code" advises caution when using StringBuilder with non-string types, highlighting that unnecessary conversions can hinder performance.

General Performance: Comparing Methods for Retrieving Process File Path

The excerpt from "Rock Your Code" explains two methods for retrieving the initiating file's path in .NET.

General Performance: Exploring Thread ID Retrieval Methods

This article explains two methods to obtain the current thread ID in .NET and shows which method is more performant.

Regular Expression Performance: Supercharge Your Match Counting

String manipulation is crucial in modern applications, significantly impacting performance and memory usage in .NET. learn how to achieve nearly double the speed and zero memory allocations when a count is required from a regular expression.

dotNetDave Says… Clear Naming Standards Create Clearer Code and Clearer Code Leads to Better Software

Clear naming standards in software development significantly enhance code readability, maintainability, and overall quality. Consistent naming reduces cognitive load, facilitates collaboration, and lowers long-term maintenance costs. Ignoring these standards leads to confusion, longer development times, and increased technical debt. Investing in robust naming conventions is essential for professional-grade software development.

Inside the Azure SDK for .NET: A Code Quality Reality Check

A review of the Azure Core SDK reveals alarming code quality issues, including significant code violations and inadequate unit testing. Key problems include improper IDisposable implementations, performance anti-patterns, and a lack of globalization support. Although it received a grade of C, reliance on this SDK poses risks for .NET developers.

Microsoft .NET Code Analysis: Efficient String Prefix Checks — StartsWith() vs. IndexOf()

Using IndexOf() for checking if a string starts with a specific value in .NET is inefficient and unclear. This approach performs unnecessary work and obscures intent.