Many research papers include numerical results obtained through computation. Most of the time such computations are performed using software that is used by many mathematicians, i.e., Maple, Mathematica, or even C/C++ code. Should such code be included in the body of the published paper?
I've heard arguments from both sides:
- Including such code can greatly decrease the time taken by a referee to replicate the results,
- The code can be easily modified by further authors who wish to extend the result,
- The reader does not need to spend time searching the journal website or the Internet for any "auxilliary files" containing the code.
On the other hand,
- Pages of code degrade the aesthetic nature of the publication,
- The author might need to spend additional space explaining the coding decisions that were made in the algorithms,
- It is likely that there exist (much) better ways to write the same algorithms in the given, or any other, language.
So what is the standard in mathematical research papers that present numerical results, either as a main or as a side result? Should code be included within the body of the publication, as an auxilliary file, or not at all?
Best Answer
My answer is:
In fact, I am willing to make a more general argument: mathematicians should version control their papers as well. The reasons are the same: the original version still exists (with a timestamp) so that priority disputes can be settled easily, but the paper can be maintained and updated - no more errata for old papers / textbooks!
The underlying premise of this answer is that maintaining and distributing code is a software engineering problem, and to the extent that mathematicians need to solve it they should follow software engineers' lead. This has two advantages: on one hand software engineers have a much more severe version of the problem and will therefore solve it better, and on the other hand as the solutions inevitably change they will be accompanied by tools and strategies for migrating old code into new frameworks which is ultimately the best way to ensure that the code survives as long as possible.