![]() The tool is however somewhat hidden among the many options of Visual Studio, which is why we describe how to use it in this blog post. Luckily Microsoft has integrated code analysis in Visual Studio. Because developers are used to work mostly in this environment, tools that work inside this environment are easiest to use. Most developers who use this platform, use C# as main language (supported by all modern technologies such as html, css and javascript) and use Visual Studio as development environment. NET platform created by Microsoft is one of the most popular development platforms. ![]() Using code measuring tools makes this a whole lot easier. Microsoft’s IDE Visual Studio contains useful code quality analysis tools that can be easily enabled. This guide tells you how to get started. Writing code that is easy to understand and maintain is important. This entry was posted in code analysis and tagged code analysis, software development, software metrics, statistics, visual studio. Standard errors for both data sets are low.Both data sets are extremely right-skewed.LOC’s coefficient of variation is higher than CY’s.There is a high amount of variation in both variables.The coefficient of correlation is positive at: 0.587919083, so this is a good indication of a relationship.Note: Complete data is included for MI and CC as well, for further analysis.ĭescriptive statistics for LOC and CY for our example solution: LOC – Descriptive Statisticsīased on the above, some general conclusions can be made: Selected variables for analysis: Independent The crux of this study is to explore and test this intuitive relationship. This statement is backed up by the suggested programming practice of limiting a function’s LOC to a particular maximum length, as stated in the popular book Code Complete. ![]() It would seem “conventional wisdom” among programmers that the more lines a code function has, the greater its inherent complexity (a.k.a., it’s CY). Note: Unfortunately, the data for Halstead Volume is not available.Since MI includes both CY and LOC in its formula, it is a known causal relationship that we will exclude.A high value indicates better maintainability.MI - Maintainability Index - Calculates an index value between 0 and 100 that represents the relative ease of maintaining a given code function.A high coupling value indicates a design that is difficult to reuse and maintain because of its many dependencies on other code files.CC - Class Coupling - Count of the number of code files to which a given code file is “coupled” or linked, either through parameters, local variables, return types, related function calls, inherited code files, interface implementations, and other attributes.A program that has complex control flow will require more tests and thereby be less maintainable. Created by calculating the number of different code paths in the flow of the function. CY - Cyclomatic Complexity - Measures the structural complexity of each code function.LOC - Lines of Code - Simple count of non-blank lines in each code function.The four variables in this Code Analysis output that are included in the data set for this project are: It contains a feature known as Code Analysis which calculates and produces (exportable to Excel) a set of numeric measures relating to various aspects of the program code that makes up a given software application. Microsoft’s Visual Studio is a primary software development tool.
0 Comments
Leave a Reply. |