dotNetDave Rocks Austin .NET User Group November 2025 Meeting

The dotNetDave No Rest for the Wicked World Tour will visit Austin on November 20, 2025, where I will present a session titled "Röck Yoür Cöde." This session addresses critical issues in memory management related to disposable types in .NET, offering practical techniques to enhance application performance and prevent slowdowns and leaks.

Defensive Programming Rule #3: Validate Your Enums (Every Time)

Enums enhance code readability but can lead to errors if not validated, as any integer can be cast as an Enum, including invalid values. Validating Enum inputs prevents silent data corruption, ensures meaningful defaults, and avoids processing impossible states. Always validate at method boundaries and define a zero value as "unknown."

Defensive Programming Rule #2: Always Validate Method Parameters

Parameter validation is crucial in programming, ensuring applications reject bad data before it causes issues. It safeguards data integrity, reduces bugs, and enhances developer satisfaction. The use of meaningful exceptions and tools like Spargine can standardize validation, while adopting strategies like nameof improves error messaging accuracy. Consistent validation fosters reliable APIs.

Defensive Programming Rule #1: Anticipate Errors and Eliminate Bugs

Defensive programming emphasizes anticipating potential failures in code, treating every line as a possible error point. Developers should use structured exception handling, provide meaningful error messages, and maintain system integrity. Tools like Spargine facilitate effective defensive programming by simplifying error handling and promoting resilience in applications by addressing unexpected scenarios.

Defensive Programming with Microsoft .NET: Anticipate Errors and Eliminate Bugs

This discusses the principles of defensive programming to enhance software development. It emphasizes error prevention strategies such as input validation, comprehensive error handling, and assumption checking. By adopting these practices, developers can create reliable, maintainable applications, reduce bugs and their associated costs, and improve overall code quality and user satisfaction.

Rock Your Code: Coding Standards for Microsoft .NET (20th Anniversary Edition)

The 20th Anniversary Edition of Rock Your Code: Coding Standards for Microsoft .NET, authored by David McCarter, is now available on Amazon. This comprehensive guide offers updated standards for .NET 10, best practices, and expert insights, making it essential for software engineers aiming for improved code quality and performance over two decades.

dotNetDave Rocks ØREDEV DEVELOPERS CONFERENCE 2025

dotNetDave will speak at the Øredev Developers Conference in Malmö, Sweden, from November 5-7, 2025. His session focuses on optimizing .NET code performance, sharing techniques to improve execution speed by up to 98%. Attendees will learn about effective memory management, enhancing application efficiency while gaining practical insights from his book series.

Rock Your Code: Object-Oriented Design Principles for Microsoft .NET

Today, I am excited to announce the release of my new e-book, Rock Your Code: Object-Oriented Design Principles for Microsoft .NET. This book builds upon a chapter from my previous coding standards work, delving into a crucial topic I often encounter in the code I analyze— the lack of solid object-oriented programming practices when designing … Continue reading Rock Your Code: Object-Oriented Design Principles for Microsoft .NET

Comparing Type Checking Methods in .NET: Performance vs. Readability

In .NET, type checking methods include GetType(), the is keyword, IsAssignableFrom(), and the as keyword. Each method varies in readability and performance.

Stop the Leaks: Properly Disposing Objects in .NET

Improper disposal of objects in .NET projects can lead to severe memory leaks, causing performance issues and crashes. A case study revealed a company spent over $25,000 to resolve these issues. Recommended practices include using IDisposableAnalyzers and custom extension methods like TryDispose() and DisposeFields() to simplify memory management and prevent problems.