Saturday 05 April 2025
For mathematicians, writing a paper is only half the battle. The other half involves sharing their work with others, and that’s where code comes in. Code is like a blueprint for a computer to follow, allowing researchers to reproduce results and build upon existing knowledge. But what happens when this code isn’t up to par? It can lead to errors, inconsistencies, and even the replication crisis.
In recent years, mathematicians have been grappling with the problem of software peer review. Just as papers are reviewed by experts in the field, so too should the code that accompanies them. The issue is that many reviewers lack the expertise to properly assess the code, leading to a lack of transparency and reproducibility.
To tackle this problem, researchers have proposed guidelines for writing and reviewing mathematical software. These guidelines cover everything from metadata and installation instructions to readability and correctness. By following these best practices, authors can ensure that their code is transparent, reliable, and easy to understand.
One key aspect of the guidelines is ensuring that the code is publicly available. This means hosting it on a platform like GitHub or Zenodo, where others can access and review it. It also means providing clear installation instructions and metadata, such as the operating system and programming languages used.
Another important consideration is readability. Good coding practices make all the difference in whether someone can easily understand and modify the code. This includes using descriptive variable names, commenting on functions, and structuring files sensibly.
But what about correctness? How can reviewers be sure that the code produces the right results? One approach is to test the code on smaller examples and verify its performance. Another is to include sanity checks or verification files that ensure the results are accurate.
The guidelines also emphasize the importance of reproducibility. This means not only providing the code itself, but also ensuring that others can reproduce the results using the same inputs and parameters. This requires careful documentation and testing, as well as making sure that the code is flexible enough to accommodate different scenarios.
By following these guidelines, researchers can increase transparency, reproducibility, and trust in their work. It’s a simple yet powerful step towards building a stronger, more collaborative mathematical community.
The impact of this change will be felt across many areas of mathematics and computer science. From computer algebra to machine learning, reliable and transparent code is essential for advancing knowledge and solving complex problems.
Cite this article: “Code of Conduct: How Mathematicians Can Improve the Reproducibility of Their Research”, The Science Archive, 2025.
Mathematics, Software Peer Review, Code Quality, Reproducibility, Transparency, Guidelines, Metadata, Installation Instructions, Readability, Correctness, Github, Zenodo
Reference: Jeroen Hanselman, “Guidelines for writing and reviewing software in computer algebra” (2025).







