Code Metric

Hits-of-Code Badges

3 minute read Published:

Building a web service for readme badges
There are few metrics that try to evaluate a codebase. Some give a glimpse about the code quality like cyclomatic complexity, code duplication, dependency graphs and the most accurate of all, WTFs per minute (WTFs/min). Others are less well fit to actually evaluate the quality of a code base such as souce lines of code (SLoC). Counting SLoC might seem like a good metric for the amount of work invested in a piece of software at first, but when you think about it, things like refactorings and removal of duplicate code through new abstractions might reduce the SLoC even if work was invested.