Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good and bad are such boring descriptions for code. It tells me nothing about it. Readability is incredibly subjective and it needs a point of comparison.

What properties of the code need improvement or demonstrate what other should aspire to? -- Getting someone to really articulate that is quite difficult.



> Readability is incredibly subjective and it needs a point of comparison

Readability definitely has objective measures. One that I find especially interesting goes by the term "cognitive complexity" and measures, in part, comprehensibility. A 2003 article in the Canadian Journal of Electrical and Computer Engineering titled, "A new measure of software complexity based on cognitive weights", defines it as "the degree of difficulty or relative time and effort required for comprehending a given piece of software modelled by a number of BCS [basic control structures]" In 2018, "Cognitive complexity: an overview and evaluation" in Proceedings of the 2018 International Conference on Technical Debt gave a 3-part criteria for evaluating complexity.

Not that this is not the same as cyclomatic complexity, a measure best suited to gauge the effort needed to adequately test a system.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: