TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Applying the ABC Metric to C, C++, and Java [pdf]

22 pointsby alokraialmost 4 years ago

2 comments

rualcaalmost 4 years ago
For the lazy like me who are interested in the topic but googling for it is too exhausting:<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ABC_Software_Metric" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;ABC_Software_Metric</a><p>Long story short: instead of counting lines of code, the ABC software metric accounts for<p>A) assignments ,<p>B) branches,<p>C) conditionals.<p>I would argue that the ABC metric nowadays fails to do a good job as a software metric, mainly due to the inception and prevalence of declarative frameworks and tools.
评论 #27416316 未加载
theszalmost 4 years ago
Author includes comments (irrelevant to code to some extent) and braces (enforced by compiler) and particulars of code style into LOC and calls it unreliable.<p>I think it is not quite honest.<p>The rules themselves vary between languages and, frankly, contemporary C++ is a different language than C++ circa 1997. Often, use of C++ is different between parts of projects and it is the case for contemporary Java too.<p>Should we develop different ABC rules for different flavors of C++ and&#x2F;or Java?