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.

Is there a readability metric for source code?

1 pointsby aratnoalmost 5 years ago
I’m imagining something like the Flesch-Kincaid test for source code: https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Flesch%E2%80%93Kincaid_readability_tests<p>I’m assuming it would have to be language-specific.<p>This is particularly interesting for contextualizing terse code, like Gocker shared here recently, which may have readability benefits in its brevity that is undone by use of obscure features and structure (like code golf).<p>Can anyone share existing discussion of this idea?

1 comment

magixxalmost 5 years ago
I believe cyclomatic complexity is related to what you&#x27;re looking for. <a href="https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Cyclomatic_complexity" rel="nofollow">https:&#x2F;&#x2F;en.m.wikipedia.org&#x2F;wiki&#x2F;Cyclomatic_complexity</a> There are tools&#x2F;plug-ins available which try to measure this which could result in less complex and thus more readable code.