3 ms·
I'm the author of this post. It would be interesting to see if one could find some objective way to measure a correlation between defects and stylistic sloppyne
by cortesi 15y ago
I'm the author of this post. It would be interesting to see if one could find some objective way to measure a correlation between defects and stylistic sloppyness. A few years ago, I whiled away some time by extracting a huge amount of data from Github projects and writing a post showing some interesting differences between languages:
http://corte.si/posts/code/devsurvey/index.html http://corte.si/posts/code/devsurvey/index.html
It shouldn't be too hard to use the same sort of technique in this case. One idea would be to use the number of unclosed bugs on Github per line of code as a proxy for software defects. Then you could ask if there's a correlation between unclosed bugs and, say, inconsistent indentation or formatting. There are all sorts of sampling issues here, but it might be interesting to play with - if anyone wants to collaborate on something like this, drop me a line.
As for mechanisms and causation, this is of course harder. It's not difficult to come up with hypotheses - it seems trivially obvious that code that is harder to read would cause coders working with it to make more mistakes and address issues more reluctantly. Proving it is something that probably should be tackled somewhere more formal than a blog post, though.