Making Code Easier to Understand with Mermaid Diagrams and CodeRush

The author emphasizes the utility of CodeRush by DevExpress for refactoring, particularly its feature for embedding images in source code. Using Mermaid's flow diagrams, the author illustrates complex methods visually, enhancing code comprehension. Despite limitations in image handling, the combination of Mermaid and CodeRush promotes clear, maintainable code effectively.

Microsoft .NET Code Analysis: Properly Formatting Class Files

The article discusses the importance of consistent formatting in Microsoft .NET class files for improved code readability and collaboration among developers. It provides tips on how to set up formatting rules using Visual Studio's features and the EditorConfig file, covering various formatting options such as new lines, indentation, spacing, and wrap preferences. The article also highlights the use of CodeRush, a code refactoring tool, to enhance code formatting and organization.

Real World Coding Issues: Part 3 – Design, Diagnostics, and Other Common Code Issues

The article discusses real-world coding issues encountered in a contract project. Part 3 covers common coding issues related to design, diagnostics, and other areas, such as globalization, code duplication, and Linux-based development challenges. It emphasizes the importance of code quality, performance, and prioritizing code reviews to ensure a maintainable and efficient solution.

Microsoft .NET Code Analysis: Use Auto-Implemented Property

The article discusses the use of auto-implemented properties in Microsoft .NET code analysis. While the author generally advises against their excessive use, they highlight a real-world example where utilizing an auto-implemented property is advantageous due to its conciseness, readability, encapsulation, and ease of maintenance. The author recommends using tools like CodeRush from DevExpress to streamline the refactoring process.

Real World Coding Issues: Part 2 – Style and Performance Issues

The author is nearing the end of a contract and wants to discuss coding issues they encountered during the development of a particular solution and other projects. Their goal is to provide valuable insights to improve the codebase of the current project. They reflect on the initial state of the codebase when they joined the team and how it has evolved during their tenure. The author's objective is to leave the code, project, and team in a better state than when they started. They were hired to enhance performance and code quality. The author also mentions that they have noticed common coding issues in multiple projects and this article aims to provide statistics and highlight these prevalent issues.

Microsoft .NET Code Analysis: Always Add Braces {} in C#

The discussion centers around the usage of braces in C# statements and their criticality in maintaining code readability and structure. Using braces helps delineate code blocks, groups statements, controls flow and scope and avoids unintended errors. The author promotes regular refactoring with tools like CodeRush and suggests integrating specific settings into the EditorConfig file. He also recommends his books for additional guidance and insights.

Microsoft .NET Code Analysis: Proper Using Directive Placement

The recommended practice in .NET is to place using directives outside of the namespace in code files. This improves code cleanliness, readability, and helps avoid confusion, while also potentially optimizing performance and facilitating maintenance and refactoring tasks. Placing using directives outside the namespace enables efficient refactoring capabilities provided by tools like Visual Studio and CodeRush.

Microsoft .NET Code Analysis: Enhancing Code Quality & Performance by Removing Unused Parameters

Removing unused parameters in code is important for several reasons. Firstly, it improves code readability and makes it easier for others to understand. Secondly, it helps with code maintenance, enhances performance, avoids bugs, and promotes better API design. Tools like CodeRush can be useful in automatically removing unused parameters and refactoring the code accordingly, streamlining the process.

Microsoft .NET Code Analysis: Remove Unnecessary Value Assignments

For optimal performance, it is crucial to eliminate unnecessary value assignments.

Microsoft .NET Code Analysis: Remove Unnecessary Using Directives

I always remove unnecessary using directives for a few reasons that I discuss in detail in my coding standards book and conference session. This article discusses the reasons why this is important.