科学是开放软件
Science Is Open Software

原始链接: https://jepedersen.dk/blog/202505_research/

现代科学极其依赖计算,然而科学软件往往处于隐藏、不可复现且不透明的状态。作者认为,由于计算结果完全取决于生成它们的代码,因此开源软件不仅是一种工具,更是科学方法本身的一个基本组成部分。 真正的科学需要系统且可验证的知识。如果代码无法获取或缺乏文档,研究人员就无法验证、修改或建立在现有发现之上,从而使这种“科学”失去意义。通过采用开源实践——公开代码、确保环境完全可复现(例如使用 NixOS),并以协作方式维护模型——科学可以借鉴开源开发中迭代与透明的成功经验。 作者展望了一个研究成果可以即时复现、科学模型像全球社区驱动项目一样不断演进的未来。为实现这一目标,学术界必须转变文化:研究人员必须从第一天起就优先分享稳定且有文档记录的代码,而学术机构必须正式认可软件开发是科学进步的核心贡献。通过将开源软件等同于科学方法,我们可以加速发现进程,增强信任,并确保我们的集体知识保持持久可靠。

这篇 Hacker News 的讨论探讨了一个引发思考的观点,即“现代科学等同于开源软件”。该观点主张建立一种标准,使科学成果能够通过可访问的数据和代码实现即时复现。 **核心论点:** * **可复现性目标:** 支持者主张论文应包含容器或存储库的链接,以便重新运行、验证和修改分析过程。这将推动科学向“可执行”知识转变。 * **现实差距:** 批评者指出,学术界深受激励机制错位的影响。高质量的开放获取研究往往不如“操纵数据(p-hacking)”得出的结论受重视。此外,许多实验科学涉及无法轻易容器化的物理、非数字变量。 * **采纳障碍:** 除了技术挑战(如软件失效或依赖冲突)之外,还存在深层的结构性问题:专有数据囤积、严格的知识产权/专利法以及高昂的出版成本。 * **拟议解决方案:** 建议包括为数据管理职业提供更好的资金支持、增加使用 Zenodo 等平台,以及转向要求公开数据的法律强制措施。 尽管一些参与者担心将科学比作“软件”过于简化了科学复杂且具有探索性的本质,但共识反映出人们对日益数字化的世界中陈旧学术实践的挫败感与日俱增。
相关文章

原文

TL;DR I claim that modern science is synonymous with open source software. This post explains why, why it matters, and what you can (and should) do next.


Why do you care about (open source) software? - Everyone

I spend a lot of my time working on software. I have been asked why software matters more times than I can remember. Software is, people say, not science. It’s a time sink, something to rush past in the pursuit of what really matters: results (and papers if you’re in academia). Publish or perish.

Well. I think software matters. In fact, I think open source software is science. Or, at least computational science. And this post tells you why. Why we as scientists must insist on the scientific method and why that means working on open and reproducible software. This post is not easy to write. It challenges many of the current trends in academia, but it is an important move towards better science that doesn’t turn us all insane.

What is science?

If you look up science on Wikipedia, here’s what hits you:

Science is a systematic discipline that builds and organises knowledge in the form of testable hypotheses and predictions about the universe. - Wikipedia

Now, go and grab a random arXiv paper. It clearly contains “knowledge” of some sort. But, does the paper contribute predictions that are testable and can by systematically organized? Can you test it? Can you systematize it?

The answer is never a flat no, but it’s hard. You rarely have direct access to that knowledge.

The good explanation - inner models

If the organism carries a 'small-scale model' of external reality and of its own possible actions within its head, it is able to try out various alternatives, ... and in every way to react in a much fuller, safer, and more competent manner to the emergencies which face it.

In his excellent book The Nature of Explanation, Kenneth James Williams Craik posits that we use small simulations of reality to explain and predict the world outside.

This point seems obvious today, but it highlights the goal of pursuing science in the first place: you, as an acting entity, improves your inner model to the point that you can make better predictions than before. The inner model here is critical: if the arXiv paper does not help their readers predict the world, it is not science. This is why computational reproducibility matters–software is how we encode and share predictive models.

What is reproducibility?

Recall that according to Wikipedia, it is not enough to demonstrate results alone. Results have to be (1) systematic and they have to be (2) testable.

It is entirely possible that the given paper is too hard to understand or unaccessible to the audience for other reasons. That does not mean that there are no scientific insights to find—readers may find ways to systematize them on their second or third reading. No, it means that you specifically cannot take the idea as your own, test it, and use it to improve your world model.

Reproducibility, in this context, is not only the duplication of results. It is the ability to take the scientific idea, embed it into your own inner model, adapt it, and build upon it—or discard it because it reduces predictabilitly.

If an idea is not reproducible, the findings cannot be expanded. And are, therefore, useless.

This becomes clear if we do a quick thought-experiment where we replace “software model” with “mathematical model”. Just as we wouldn’t accept a physics paper that said our equations predict X but we won’t show the math, we shouldn’t accept (computational) science that hides its methods.

Why is software science?

How many fields have been held back, and how many people have had their careers disrupted, because of a buggy program? - Greg Wilson

Software is ubiquitous in modern science. Anything from CoVid models to search algorithms to lab protocols are build on software built by other people. Researchers are busy people. They don’t bother to look through all software dependencies to verify correctness, understand implementation details, or check for potential errors that could invalidate results.

From that follows that the scientific results depend on the software. If the software is wrong, the science is wrong. (Software bugs already cause numerous retractions, such as here, here, here, and several places here).

And that is well and good, because at some point we have to trust and rely on other’s work. For that to happen, it (software) needs to be reliable.

Why open source?

We found that software needs to be

  1. Reproducible, meaning executable, as well as modifiable, and
  2. Reliable, meaning that the results are consistently trustworthy

Modifiability is important for science for the same reason that equations are important for scientific predictions. Reliability is crucial because we want systematic improvement of our knowledge, not flaky and partial results that only work occasionally.

This is what open source software gives us. We can change code and retrofit it to suit our needs (just think about Hugging Face models) and we can iterate upon it to continue to improve it. It already generates trillions in value and there is room for much, much more.

Of course, open source software is not a perfect cure. There are IP and security concerns, bugs can still occur, and stability can be a problem. But at least the imperfections are on public record. They can be amended and improved, just like our scientific understanding. From that perspective, one can claim that open source software is the scientific method—just in simulation.

A vision for future science

If we accept these premises we can ask: what would truly open (computational) science look like?

Every result is instantly reproducible. When you read a paper claiming that a new drug reduces symptoms by 30%, you click a link and watch the exact analysis run in your browser. The data processing, statistical tests, and visualizations execute in seconds using the same environment the authors used—preserved perfectly through reproducible containers.

Scientific software evolves like Wikipedia. Climate models aren’t developed in isolation by single labs, but maintained by global communities. When a researcher in Kenya discovers a bug in atmospheric turbulence calculations, the fix propagates instantly to climate simulations worldwide. Models improve continuously rather than languishing in academic silos.

The pace of discovery accelerates. Instead of each researcher building from scratch, we stand on shoulders of giants whose work is not just readable, but runnable and modifiable. Scientific progress compounds at an unprecedented rate.

Trust in science strengthens. When climate models, economic forecasts, and medical recommendations are built on transparent, auditable code, public confidence grows. Science communication improves because the models themselves become part of the conversation—not just their conclusions.

This isn’t utopian fantasy. Every piece already exists—open source communities, reproducible environments, collaborative development platforms. We just need to shape them into a coherent vision for how science should work in the digital age.

The question isn’t whether this future is possible. The question is: how quickly can we build it?

What now?

I posit that open source software is a necessary condition if we are to science in a computerized world. Software is executable mathematical models that we should prioritize much higher.

We still have work to do and this is how you can help:

  • Share and document your code
    • Papers without code is less scientific because it is harder to build on the insights. In the ideal world any claim should be backed up by reproducible code. Always use code from day 1 and always share it.
  • Write stable code, use NixOS
    • Code should be reliable and work in perpetuity. That means making sure dependencies and environments are kept constant. The best way to do that is to use reproducible environments. NixOS is quickly becomming the biggest and best tool there is. It will guarantee that your code will run exactly the same way, even 100 years in the future. Docker, Conda, and similar tools are better, but NixOS gives more comprehensive guarantees.
  • Build on existing tools instead of creating your own
  • Promote academics that work on software
    • Given the huge importance of code, Academic promotions should value software contributions

The scientific revolution succeeded because it insisted on transparency, reproducibility, and constant scrutiny. The open source movement embodies these same principles for software, but there is much more work to be done.

Will you help make software scientific?

联系我们 contact @ memedata.com