Improving Brownfield .NET Apps with Code Analysis and Metrics

Having the ability to analyze code quality and setup automated code quality checks can be invaluable. This course, you'll look at the Visual Studio tools to help you improve brownfield application quality with code metrics and static code analysis.
Course info
Rating
(33)
Level
Intermediate
Updated
Jun 7, 2017
Duration
1h 22m
Table of contents
Description
Course info
Rating
(33)
Level
Intermediate
Updated
Jun 7, 2017
Duration
1h 22m
Description

For many people maintaining brownfield software is a large part of their job. When you maintain this older code, having the ability to analyze code quality and setup automated code quality checks can be invaluable. In this course, Improving Brownfield .NET Apps with Code Analysis and Metrics, you'll look at the tools built into Visual Studio to help you improve brownfield application quality with code metrics and static code analysis. First, you'll explore what quality means to software and its users, along with different types of testing that can be utilized. Next, you'll discover the tools built into Visual Studio, such as the built-in code metrics that you can generate from your own code. Finally, you'll learn about how to setup and interpret the inbuilt static code analysis tools. By the end of this course, you'll have the necessary skills to efficiently use code metrics and static code analysis.

About the author
About the author

Stephen Haunts is an experienced Software Developer and Leader who has worked across multiple business domains including Computer Games, Finance, and Healthcare Retail and Distribution. Stephen has worked in languages ranging from Assembler, various forms of BASIC, to C and C++, and then finding his love of C# and .NET.

More from the author
Blockchain – Principles and Practices
Intermediate
2h 41m
14 Feb 2018
More courses by Stephen Haunts
Section Introduction Transcripts
Section Introduction Transcripts

What Is Quality?
Hello, and welcome to my course, Improving. NET Apps with Code Analysis and Metrics. My name is Stephen Haunts. This short course is split into four modules. By the end of it, you'll be familiar with the code metrics and static code analysis tools that are built into Visual Studio. In this first module, we're going to explore what software quality is by looking at what quality actually means when applied to software. We'll talk about different testing techniques used by developers to try and increase software quality. We'll also look at the cost of buggy software overall. In the second module, we'll introduce the software quality metrics that are available in Visual Studio. I'll discuss what they are and what I believe are sensible values to aim for. I will also show you some practical demonstrations on how to view these metrics and how changing your code will affect these metrics. I'll finish this module by discussing how you can incorporate metrics into your code review process. In the third module of this course, we'll talk about static code analysis. We'll cover what it is and what's available to you in Visual Studio. I'll also do another practical demonstration on how to set this up and create custom rule set. In the fourth and final module of this course, I'll wrap up the key findings from what we have learned so far. This course is aimed at experienced developers who are already experienced with C# and the. NET Framework using Visual Studio. I will not go into depth about any programming constructs using the demonstrations unless it directly relates to the use of code metrics or static code analysis. If you need to increase your skills in C# and. NET, then Pluralsight has a huge range of courses to help you out. Everything I demonstrate in this course has been done with Visual Studio 2017 Community Edition, which is the free edition of Visual Studio, so you don't need any of the more expensive editions to the tool set. So everything in this course is available to everyone. Let's get started with the course and take a look at software quality.

Using Code Metrics in Visual Studio
Hi, my name is Stephen Haunts. Welcome back to my course, Improving Brownfield. NET Apps with Code Analysis and Metrics. In this module, we're going to take a closer look at code metrics that are available to you within Visual Studio. We'll start out by discussing what the different types of metrics are. These include the maintainability index, cyclomatic complexity, depth of inheritance, class coupling, and finally, lines of code. We'll then finish up with a demo of using some of these code metrics so that you can see them in action. First of all, let's take a look at what code metrics are and where to find them. Code metrics in Visual Studio are a way to allow developers to help measure the quality of the code they are writing. These metrics give a visual indicator to the developer to help them understand what parts of their code could be refactored to aid readability. The metrics we're going to cover in this module help to give you immediate feedback on your code to allow you to see areas of code that might be the hardest to understand. Let's look at how to access these metrics now and look at where each of them are.

Using Static Code Analysis
Hi, my name is Stephen Haunts, and welcome back to my course, Improving Brownfield. NET Apps with Code Analysis and Metrics. In this module, we're going to take a closer look at the static code analysis tools that are available to you in Visual Studio. We will then be covering the following topics. First, we'll look at what static code analysis is, then we'll talk about why you'd want to use static code analysis, then we'll discuss how to enable the analysis tools, followed by a deeper look at the different categories of rules available. Next, we'll take a look at suppressing certain rules in your code base. And then we'll finish up with a demo. This is not meant to be an in-depth look at every single rule included in the rule sets. If we did that, then this course would be about 8 hours long. We'll look at the general categories as well as some specific examples and where to look in a documentation if you come across an unfamiliar error. Let's start by looking at what static code analysis is.