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.

A Large-Scale Study of Programming Languages and Code Quality in GitHub (2014)

189 pointsby pk2200over 7 years ago

16 comments

hellofunkover 7 years ago
Don&#x27;t be fooled by the October 2017 date of this article. There should be a 2014 in the title, since this appears to be a re-print of a prior study:<p><a href="http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~filkov&#x2F;papers&#x2F;lang_github.pdf" rel="nofollow">http:&#x2F;&#x2F;web.cs.ucdavis.edu&#x2F;~filkov&#x2F;papers&#x2F;lang_github.pdf</a>
definedover 7 years ago
Although this is interesting, we should perhaps not hold a high degree of confidence in the results, because the methodology relies on the content of commit messages and the number of commits (if I read this correctly).<p>- The content of commit messages varies widely in expressiveness and meaningfulness, from &#x27;Fix bug&#x27; to a detailed explanation. This confounds the classification of a commit.<p>- The number of commits can be very misleading depending on the committer&#x27;s workflow. Some committers merge topic branches to include all their intermediate work in progress commits, which could overrepresent commits flagged as errors. Other committers rebase their topic branches into fewer, or even single, commits before merging. Or, some commits may fix multiple defects.<p>This kind of analysis is conceptually a worthy endeavor; it would be more meaningful if the metrics it employed were more strongly correlated with the attributes it was trying to analyze.
评论 #15382271 未加载
rixedover 7 years ago
Figure 2 suggests another possible bias favoring functional, managed languages: a lot of errors for C&#x2F;C++ are related to concurrency and performance. But those are mostly non-bugs for other languages, since when concurrency or performance are a requirement then most of those studied languages would not be considered anyway.<p>It seems similar to the paradox that makes the best medicine appear to have a lower survival rate just because it&#x27;s given to most serious patients.
评论 #15381999 未加载
评论 #15380510 未加载
评论 #15380202 未加载
评论 #15380337 未加载
RickHullover 7 years ago
Uh, where is it shown how &quot;software quality&quot; or &quot;code quality&quot; is measured or determined? Can anyone provide a succinct definition of <i>quality</i> which the paper uses?<p>As best I can tell, they use commit messages to identify bugfixes, and later they jump to &quot;defective commits&quot;. Presumably the bugfix commit is not the defective commit. There is no explanation I can find that shows how they arrive at a defective commit from a bugfix commit.<p>This specific methodology seems rife with weakness, all of which should be explained clearly and admitted up front.
评论 #15380257 未加载
foolfoolzover 7 years ago
curl is an extremely successful tool&#x2F;library, I would consider it high quality without knowing the ratio of Normal patches to bug fixes. Skyrim is well known to crash and corrupt save games but regarded as one of the greatest RPGs ever made. the game programmers obviously did a lot of things right to produce such a hit. I&#x27;m not saying you need to be a worldwide success to write quality code, just that low bug count doesn&#x27;t always mean high quality and the other way around. quality is measured by user experience
评论 #15380137 未加载
kccqzyover 7 years ago
I’m mildly surprised by how well Clojure performs here. It isn’t statically typed yet fares much better than Haskell&#x2F;Scala! From my experience Clojure is also a joy to write, sometimes even more than Haskell.
评论 #15381673 未加载
评论 #15381682 未加载
yogthosover 7 years ago
I think it&#x27;s a good starting point to look at a large number of open source projects in the wild. The individual differences in skill, size, etc. average out between them. It&#x27;s important to establish whether any statistically significant trends exist before anything further can be discussed meaningfully.<p>If we see empirical evidence that projects written in certain types of languages consistently perform better in a particular area, such as reduction in defects, we can then make a hypothesis as to why that is.<p>For example, if there was statistical evidence to indicate that using Haskell reduces defects, a hypothesis could be made that the the Haskell type system plays a role here. That hypothesis could then be further tested, and that would tell us whether it&#x27;s correct or not.<p>However, this is pretty much the opposite of what happens in discussions about features such as static typing. People state that static typing has benefits and then try to fit the evidence to fit that claim. Even the authors of this study fall into this trap. They read into the preconceived notions that are not supported by the data in their results. The differences they found are so small that it&#x27;s reasonable to say that the impact of the language is negligible.
评论 #15380737 未加载
euskeover 7 years ago
I think the meta-conclusion that we&#x27;re getting is that &quot;this kind of study is extremely haarrrd!&quot;
hoytechover 7 years ago
&gt; For example, in languages like Perl, JavaScript, and CoffeeScript adding a string to a number is permissible (e.g., &quot;5&quot; + 2 yields &quot;52&quot;). The same operation yields 7 in Php. Such an operation is not permitted in languages such as Java and Python as they do not allow implicit conversion.<p>Regarding Perl, the quoted statement is wrong:<p><pre><code> $ perl -E &#x27;say &quot;5&quot; + 2&#x27; 7 </code></pre> Furthermore, this is not an implicit conversion. The + operator is an <i>explicit</i> numeric conversion. Here&#x27;s a more detailed description:<p><a href="https:&#x2F;&#x2F;codespeaks.blogspot.ca&#x2F;2007&#x2F;09&#x2F;ruby-and-python-overload-operator-for.html" rel="nofollow">https:&#x2F;&#x2F;codespeaks.blogspot.ca&#x2F;2007&#x2F;09&#x2F;ruby-and-python-overl...</a>
评论 #15381342 未加载
评论 #15381486 未加载
j2kunover 7 years ago
They use... varying p-values? Can you do that? It almost looks like they&#x27;re choosing p after the analysis is done...
评论 #15380241 未加载
davedxover 7 years ago
Fascinating study, but I think a lot of the conclusions in this study are self-evident. For example:<p>&quot;However when compared to the average, as a group, languages that do not allow implicit type conversion are less error-prone while those that do are more error-prone.&quot;<p>A lot of the conclusions are along these lines: languages with explicit type conversion have less [type conversion] errors. Well, of course...<p>Still worth a read though, and makes a strong case for functional, statically-typed languages.
评论 #15381995 未加载
评论 #15382962 未加载
PleaseHelpMeover 7 years ago
Summary :<p>&gt; The data indicates that functional languages are better than procedural languages; it suggests that disallowing implicit type conversion is better than allowing it; that static typing is better than dynamic; and that managed memory usage is better than unmanaged. Further, that the defect proneness of languages in general is not associated with software domains. Additionally, languages are more related to individual bug categories than bugs overall.
评论 #15381209 未加载
hellofunkover 7 years ago
This article is dated October 2017 and claims to be the first large-scale evidentiary study. But I have definitely seen either this exact study or another one nearly identical, also using GitHub and also having similar results for the languages, and that was at least 1 year ago. So perhaps this article is a re-print of a prior study?
评论 #15383105 未加载
评论 #15381921 未加载
评论 #15382280 未加载
neilwilsonover 7 years ago
Interesting that the social element isn&#x27;t mentioned.<p>Smarter programmers are likely to be able to get their head around the strict requirements of functional languages and they are the ones using the languages at the moment.<p>Java, on the other hand, is pretty much the COBOL of this generation.
评论 #15382332 未加载
评论 #15382459 未加载
hellofunkover 7 years ago
There are several points made about typing in another related post here yesterday:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15378800" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15378800</a>
monster2controlover 7 years ago
Basically, they didn&#x27;t figure out shit. What a waste of a read.