Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to VSTS Introduction to Visual Studio 2008 Development Edition Understanding code complexity using Code Metrics.

Similar presentations


Presentation on theme: "Introduction to VSTS Introduction to Visual Studio 2008 Development Edition Understanding code complexity using Code Metrics."— Presentation transcript:

1

2 Introduction to VSTS Introduction to Visual Studio 2008 Development Edition Understanding code complexity using Code Metrics

3 Visual Studio Team System

4

5 Development Edition Features Unit testing with code coverage Static Code Analysis Code Profiling Code Metrics

6 Integrated Unit Testing Integrated Static Code analysis Security Errors Localization problems Memory issues … Integrated Profiler Performance problems Memory problems Potential Sql Injection attack Object not Disposed Localization Issue Improving Code Quality

7 Who allocates the most Objects Who allocates the most memory Who is called the most? Who runs for the longest What do you have the most of? What is taking up the most memory Improving Quality: Profiler

8 Performance Report Summary

9 Gives a snapshot of software health Understand your code complexity Quickly compare code to find potential trouble spots Reduce risk & improve maintainability Understand complexity of inherited code Code metrics

10 # of Dependencies Between Types

11 Ripple effect?

12 # of Executing Lines of Code 1234512345 static class Program { #region Application Entry Point /// /// The main entry point for the application. /// [STAThread] static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Workflow(args); } #endregion #region Static Methods /// Primary workflow for the application. /// Command line arguments. private static void Workflow(string[] cmdargs) { // Collect the list of command line arguments List args = new List (cmdargs); // Show usage syntax if the user so asks if (UseArg(args, "/?")) { ShowAbout(); return; }

13 1 2 3 4 5 6,7 8 9 10 11 bool ParseCommandLine(string[] args) { if (args.Length == 0) ShowHelp(); return; for (int i = 0; i < args.Length; i++) switch (args[i]) { case "/?" : ShowHelp(); return false; case "/input" : if (args.Length > i && File.Exists(args[i + 1])) InputFile = args[i++]; break; case "/c" : Colapse = true; break; } return true; } # of branches of Code

14 Overall indication of complexity by aggregation of several factors Lines of Code Cyclomatic Complexity Computational Complexity Used on the Windows Code Base Metric: Maintainability Index

15 Demonstration

16 Questions

17 Thank You


Download ppt "Introduction to VSTS Introduction to Visual Studio 2008 Development Edition Understanding code complexity using Code Metrics."

Similar presentations


Ads by Google