Hacker News new | ask | show | jobs
by nwmcsween 3622 days ago
Quality as in no bugs is good but that doesn't mean it's quality _code_. I've seen bloated and horrible code pass static analysis as well as less bloated but just as horrible pass cyclomatic complexity tests. Sadly I don't think there is an automated way to gauge quality from the perspective of a programmer.
1 comments

And the reason for that is quality is a relative metric which is almost impossible to quantify.

    * Static analysis looking for bugs per thousand lines of code
    * Idiomatic code adopting language specific preferences
    * Code that is easy to maintain but is slow as molasses
    * Code that works well enough and was written super fast
    * Code that is microoptimized to the extreme, is super fast, but difficult to maintain due to inline ASM
For certain cases, each of these could be considered quality or atrocity. It is all about context.
> I once had an engineering professor who claimed that the answer to every engineering question is “it depends”

http://danluu.com/julialang/

Clearly you learned from a wise professor! Also a huge fan of virtually all of Dan Luu's writing.