如何可视化大型代码库质量中的更改? [英] How can I visualize changes in a large code base quality?

查看:67
本文介绍了如何可视化大型代码库质量中的更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在想很多事情的一件事是,我们如何使用某种指标来衡量变化,我们是否倒退?这是在我们正在改进的大型旧代码库的背景下进行的.大部分代码是具有C传统的C ++.一些新功能和GUI用C#编写.

One of the things I’ve been thinking about a lot off and on is how we can use metrics of some kind to measure change, are we going backwards or not? This is in the context of a large, legacy code base which we are improving. Most of the code is C++ with a C heritage. Some new functions and the GUI are written in C#.

首先,我们至少可以检查一下简单复杂性级别是否随时间在代码中发生变化.难点在于要有一个表示形式-我们可以做一个3D表面,其中2D贴图代表代码,而我们有一个颜色热图代表复杂性,其中3D表面凸出并显示变化.

To start with, we could at least be checking if the simple complexity level was changing over time in the code. The difficulty is in having a representation – we can maybe do a 3D surface where a 2D map represents the code and we have a heat-map of color representing complexity with the 3D surface bulging in and out to show change.

一旦您可以生成一些数字矩阵,就会有大量的数学系统来处理诸如此类的事情.

Once you can generate some matrics of numbers there are a ton of math systems around to take care of stuff like this.

随着时间的流逝,我想在那里拥有更多复杂的数字,但是使用相同的可视化技术来表示变化.

Over time, I'd like to have more sophisticated numbers in there but the same visualisation techniques used to represent change.

我喜欢 Crap4j 中关注比例的想法在复杂度和覆盖该代码的单元测试数量之间.

I like the idea in Crap4j of focusing on the ratio between complexity and number of unit tests covering that code.

我还想加入 Bob叔叔的SOLID指标以及一些Chidamber和Kemerer OO指标.困难的部分是寻找工具来为C ++生成这些工具.唯一的选择似乎是 Krakatau基本指标(我不反对购买工具).我希望使用CK指标的部分原因是来自对象-面向指标:亨德森·塞勒斯(Henderson-Sellers)和早期的

I'd also like to include Uncle Bob's SOLID metrics and some of the Chidamber and Kemerer OO metrics. The hard part is finding tools to generate these for C++. The only option seems to be Krakatau Essential Metrics (I have no objection to paying for tools). My desire to use the CK metrics comes partly from the books Object-Oriented Metrics:Measures of Complexity by Henderson-Sellers and the earlier Object-Oriented Software Metrics.

如果我们开始使用这些指标中的许多指标,则最终可能会得出十个左右的数字,这些数字会随时间变化.我对统计数据一无所知,但是跟踪一堆这样的指标然后注意哪些指标可能会有所变化似乎很有趣.

If we start using a number of these metrics we could end up with ten or so numbers that are varying across time. I'm fairly ignorant of statistics but it seems it could be interesting to track a bunch of such metrics and then pay attention to which ones tend to vary.

请注意,相关问题与测量代码有关大型代码库的质量.我对衡量更改更感兴趣.

Note that a related question is about measuring code quality across a large code base. I'm more interested in measuring the change.

推荐答案

我考虑使用基维亚图表示随时间变化的多个软件指标维度.这些图表示围绕中心点的凹壳中的多个数据点.目视检查将显示特定指标的上升或下降位置,并且应该能够使用一些启发式面积计算来计算受指标值偏差的总面积比率.

I'd consider using a Kiviat Diagram to represent multiple software metrics dimensions evolving over time. These diagrams represent multiple data points in a concave hull around a centerpoint. Visual inspection will show where a particular metric is going up or down, and one ought to be able to compute an overall ratio of area biased by metric value using some hueristic area computation.

这篇关于如何可视化大型代码库质量中的更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆