[ weird things ] | why don’t we just keep our code to ourselves?

why don’t we just keep our code to ourselves?

Releasing climate change modeling code to people who can't run it, don't understand it, and are paid to disagree with it and libel you a fraud doesn't do computer scientists any favors.
js code
Photo by Irvan Smith

Here’s a topic I’ve been meaning to point out, but didn’t have the chance to cover until news from the scientific and political worlds settled down for a bit. In last month’s comment in Nature, programmer Nick Barnes urged his fellow coders to release their work to the public, especially work that has to do with climate research to expose every part of the modeling and analysis process to the public. On the surface, it sounds like a pretty straightforward proposition and a goal very much in tune with the spirit of scientific research. Remember that infamous “trick” mentioned in the CRU e-mails and widely misconstrued to mean something sinister instead of what it actually was, just an algorithm for organizing temperature data? Just imagine how easily the clichéd accusations of evil-doing by climate researchers would vanish if we could show exactly what the trick was in a code snippet, Barnes argues. Well, unfortunately, a deluge of open-source code can’t help climate research.

As someone who spends plenty of time with code, I can attest to Barnes’ reiteration of a very open secret. The code we use every day is messy, needlessly repetitive and over-complicated far more often than not. With the advent of test-driven development procedures, new generations of software are being tested better, but again, the tests are only as good and as thorough as the person who writes them, and often times, big changes and tweaks to software packages aren’t updated in the test scripts. In fact, to quote one of my professors, software is kind of like sausage. You can really enjoy its UI design and functionality, but you probably don’t want to see how it’s made because you’ll never look at it quite the same away again. And it’s on this fact that Barnes tries to spend the majority of his time, telling scientists that it’s ok if your code isn’t perfect, impeccably written, and every algorithm is optimized to at least O(n), and ideally O(log n) because that’s often impossible given some of the problems scientists use computers to solve. According to his appeal, if even professional coders can’t write perfect code, scientists needn’t concern themselves with how pretty or readable their programs are.

But somehow, I don’t think that making sure their code is ready for its close-up is what makes scientists feel uneasy about publishing their apps for the public, and it seems odd that Barnes’ main argument, that giving your programs to the public at large will help you avoid charges of fraud, especially in climate research, gets so little elaboration in his op-ed. And as for the main argument itself, I would call it somewhat naive when we factor in denialists’ attitudes and zeal. Far from giving them less room to call climate research fraudulent, the scientific community would be giving them brand new tools in which to exercise their dishonesty. If denialists today scour studies and models for an imprecision of a hundredth of a decimal point and use the slightest or most inconsequential estimate, assumption, or error as proof that all climate research is a sinister plot by a nefarious, UN-led New World Order, imagine the kind of crap they could pull with access to source code. All they would need is for someone who knows, or could quickly learn, good old-fashioned Fortran to sift through the hundreds of thousands of lines of code, make a couple of slight tweaks according to denialists’ version of climate modeling, and they can claim to have “corrected” the scientists’ work.

And that’s the best case scenario. Denialists could just as easily accuse researchers of fraud based on what they saw in the code. Considering that they’re willing to spend hundreds of thousands of tax dollars to keep harassing climate scientists, charge their critics with gross scientific misconduct just because they had the audacity to disagree with their idols, and even threaten researchers with violence for daring to work in the climate field, giving them reign over climate modeling source code is a recipe for a PR nightmare. That’s how poisoned by ideology and dogma climate research has become. Scientists simply don’t feel safe giving out their algorithms even though in a much less noticed field, like astronomy or AI, sharing source code could be done without the constant dread of witch hunts against your model, and lead to a better understanding of a number of long-standing problems and questions. Ordinarily, I’d agree with Barnes, but in this case, I simply don’t know if the risk of giving your code to demagogues and polemicists desperate to discredit you by every and any means possible is worth it until we somehow get politics out of the scientific process and have a far better chance to review the models calmly and objectively rather than force experts to spend their time trying to debunk climate models based on political ideology instead of scientific fact.

# science // climate change / global warming / scientific research / source code


  Show Comments