February 13, 2018
The Code is the Model
My article The Code is the Model has been published in the latest issue of the Journal of Microsimulation. In it, I argue that non-trivial computational models are best specified by their source code. This bold claim has prompted two critical replies, one by the editor Matteo Richiardi and one by computer scientist Dan Tang. But most importantly, Matteo has taken the opportunity to adjust the submission policy of the Journal of Microsimulation. In future, authors will be asked to submit source code and executables along with their papers. This is a big step forward, and I hope that more editors will follow Matteo’s lead.
Abstract: Conventionally, agent-based models are specified in a combination of natural language and mathematical terms, and their implementation seen as an afterthought. I challenge this view and argue that it is the source code that represents the model best, with natural language and mathematical descriptions serving as documentation. This modeling paradigm is inspired by agile software development and adopting it leads to various - mostly beneficial - consequences. First, discrepancies between the specification documents and what the model actually does are eliminated by definition as the code becomes the specification. Second, replicability is greatly improved. Third, object-oriented programming is recognized as an integral part of a modeler’s skill set. Forth, tools and methods from software engineering can support the modeling process, making it more agile. Fifth, increased modularity allows to better manage complexity and enables the collaborative construction of large models. Sixth, the way models are published needs to be reconsidered, with source code ideally being part of the peer review. Seventh, the quality of source code in science is improved as it enjoys more importance, attention and scrutiny.