Hacker News new | ask | show | jobs
by KolmogorovComp 1076 days ago
Correlation is not causality. Swearing in the comments will not magically make your code better, but fixing a hidden bugs that you have been chasing for weeks will certainly make you swear when fixed.
3 comments

> Correlation is not causality.

I'm fond of pointing out, despite every time I get downvoted, that causation is the thing we have no knowledge of, and therefore correlation is all we have. As Feynman said about gravity, there is no how or why to gravity, as far as we know it's simply a property of matter. But of course, that means we only know that because of the perfect correlation between matter and gravity, including every time we conduct an experiment about it; but still we have no cause to point to.

A reasonable working definition of causality, used by almost all scientists today, is that X causes Y if a change in X, unaccompanied by any other change, changes Y. At root, this is indeed a statement about correlations, but it's a special kind of correlation, which is hard to estimate from observational data where many other things may change along with X.
While that may be the case, the correlation coefficient of matter and gravity is so close to 1 that we can't tell the difference and the correlation coefficient of swearing in code to good code is far less.
Maybe gravity causes matter.
gravitas matters, if you will ;)
Sounds like you're suggesting a causal relationship the other way, though. As per this explanation, putting effort into debugging edge cases will statistically cause the comments to swear more.
From the article:

> This means that swearing will not automatically improve the quality of your code.