有没有一本书概述了不同类型的源代码指标?

发布于 2024-08-20 15:56:42 字数 157 浏览 2 评论 0原文

我必须提交一篇关于软件工程过程中源代码度量的使用的论文。我认为首先介绍一些源代码指标的分类(例如使用平面 LOC 计数与对代码进行一些静态分析)会很好,但我找不到一本可以介绍不同类型的书籍或文章指标以及可能的一些历史背景信息(我的导师比网站更喜欢书籍和文章)。

有人知道这样的来源吗?

I have to submit a paper about the usage of source code metrics in software engineering processes. I thought it would be nice to start by introducing some categorization of source code metrics (for example using plane LOC count Vs doing some static analysis of the code) , but I can't find a book or article that will present the different types of metrics and possibly some historical background information (books and article are favored by my instructor over web sites).

any one knows of such a source ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

东走西顾 2024-08-27 15:56:42

Patrick Smacchia 的 NDepend 网站有一组很好的定义:指标定义。他的 NDepend 工具(适用于 .NET)提供了许多不同的量化代码库的方法。

指标有多有用,这是一个更有争议的问题。它们非常适合获得代码库的天空级视图,但是它们在日常中有用吗?有多少商店每周使用(或关心)指标?我怀疑大多数人更关心错误数量:修复的错误数量和报告的错误数量。

当然,诸如内聚性和耦合性之类的度量可以提供可能的重构点的指标。

另一个重要指标:有多少测试,以及这些测试大致代表了多少代码覆盖率。在没有测试和良好的测试覆盖率的情况下进行重构是一件有风险的事情。

软件指标

代码指标概述

Patrick Smacchia's NDepend site has a good set of definitions: Metrics Definitions. His NDepend tool (for .NET) provides many different ways of quantifying a codebase.

How useful metrics are, well that is a bit more contentious. They are good for getting a sky level view of a codebase, but are they useful day-to-day? How many shops out there use (or care about) metrics on a weekly basis? I suspect most are more concerned with the bug count: number of bugs fixed and number of bugs reported.

Certainly measures like cohesion and coupling give indicators of possible refactoring points.

Another important metric: How many tests are there, and roughly how much code coverage do those tests represent. Refactoring without tests and good test coverage is a risky business.

Software metric

Code Metrics Overview

时光是把杀猪刀 2024-08-27 15:56:42

Pressman 的软件工程:从业者的方法有很多关于软件指标的好信息(除其他外) )。

关于指标的关键建议可能是要小心你所衡量的内容。如果你衡量LOC,那就是人们会关注的。

“并不是所有可以计算的东西都重要,也不是所有重要的东西都可以计算。”

--阿尔伯特·爱因斯坦

“通过代码行数来衡量软件生产力就像通过飞机的重量来衡量飞机的进度一样。”

--比尔·盖茨

Pressman's Software Engineering: A Practitioner's Approach has a lot of good information on software metrics (among other things).

Probably the key piece of advice on metrics is to be careful what you measure. If you measure LOC, that's what people will concentrate on.

"Not everything that can be counted counts, and not everything that counts can be counted."

--Albert Einstein

"Measuring software productivity by lines of code is like measuring progress on an airplane by how much it weighs."

--Bill Gates

惟欲睡 2024-08-27 15:56:42

软件质量工程中的指标和模型

Stephen H. Kan

alt text

读起来并不总是很有趣,但它是一本很棒的书其中深入涵盖了软件质量和指标。

Metrics and Models in Software Quality Engineering


Stephen H. Kan

alt text

Not always very fun to read, but it's an excellent book that covers software quality and metrics in depth.

相权↑美人 2024-08-27 15:56:42

Halstead's "Elements of Software Science" was the seminal work in this area. As I recall the tale, he defined some 15 different metrics, all purporting to measure different qualities of a piece of code.

Unfortunately, van der Meulen & Revilla showed that a couple of key metrics are very strongly correlated with SLOC (source lines of code). (This was not the first time this had been demonstrated, but it was the first paper I could find quickly.) Since SLOC is far easier to measure than the other things, SLOC is what should be measured - and managed.

清君侧 2024-08-27 15:56:42

另请检查 SLOCCount。这不是一本书,而是一套用于计算物理源代码行数的工具。浏览其用户手册以及网站中有关使用 SLOCCount 进行估算的论文Linux 内核大小将使您深入了解 SLOC 指标的有效性、将其用作指标的问题、COCOMO 模型中用于工作量估计的 SLOC 指标的使用情况。

Also check SLOCCount. This is not a book but a set of tools for counting physical Source Lines of Code. Going through its user manual and the papers in the site about the usage of SLOCCount for estimating Linux kernel size will give you insight about effectiveness of SLOC metrics,issues in using it as metric, usage of SLOC metric in the COCOMO model for effort estimate.

高冷爸爸 2024-08-27 15:56:42

这不是一本书,但 Sonar 使用的指标提供了实用的代码指标的良好列表。这是指标定义页面。

It's not a book, but the metrics used by Sonar offer a good list of practically useful code metrics. Here's the metric definitions page.

夜雨飘雪 2024-08-27 15:56:42

正如我刚刚在 我关于可视化更改的问题中提到的在指标中,有书籍面向对象的指标:复杂性的度量< /a> 由 Henderson-Sellers 和早期的面向对象的软件指标我已经拥有很多年了。

软件质量工程中的度量和模型,第二版,这是唯一一本可在 Safari 上找到的书籍,其具有 章节讨论上述指标和一些行业结果。

我还刚刚找到一本 2006 年的书 面向对象的指标实践:使用软件指标来表征,评估和改进面向对象系统的设计 那里没有评论(不是一个好兆头),但听起来很有趣。

As I just mentioned in my question on visualizing changes in metrics, there are the books Object-Oriented Metrics:Measures of Complexity by Henderson-Sellers and the earlier Object-Oriented Software Metrics which I've owned for years.

There's Metrics and Models in Software Quality Engineering, Second Edition, the only one of the books available on Safari which has a chapter discussing the above metrics and some industry results.

I also just found a 2006 book Object-Oriented Metrics in Practice: Using Software Metrics to Characterize, Evaluate, and Improve the Design of Object-Oriented Systems which has no reviews there (not a good sign) but sounds interesting.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文