However, many empirical studies have shown that, historically, cyclomatic complexity is strongly correlated with the number of lines of code. Lower the cyclomatic complexity, and improve the testability of your code. Developers can and often do use it to measure their notion of “cognitive” complexity, and use it to target their refactoring efforts. Originally designed to estimate the number of unit tests a method needs, cyclomatic complexity is built into a lot of metric tools and static analysis tools. Broadly speaking, cyclomatic complexity is derived by counting the number of potential paths through the system (typically at the method level). McCabe's cyclomatic complexity is one such metric. Metrics can be actionable, but not empirically useful at the same time. Meneely, in Perspectives on Data Science for Software Engineering, 2016 Cyclomatic Complexity: An Interesting Case
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |