
Is there a readability metric for source code? - aratno
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?
======
magixx
I believe cyclomatic complexity is related to what you're looking for.
[https://en.m.wikipedia.org/wiki/Cyclomatic_complexity](https://en.m.wikipedia.org/wiki/Cyclomatic_complexity)
There are tools/plug-ins available which try to measure this which could
result in less complex and thus more readable code.

