Programming Style: Suggested Guidelines for Writing Code

Joe Hirschberg,Jenny Lye
DOI: https://doi.org/10.1111/1467-8462.12567
2024-06-07
Australian Economic Review
Abstract:Since computer code has become elemental in current research it has become imperative that code should be written clearly and in good style. A program written in a clear, well‐written style is easier to debug and is more useful to those who may want to replicate your work, extend it, speed it up or borrow from it. Clearly, written code is also a useful tool in the training of future researchers. In this paper, we suggest a set of style guidelines and we provide examples of how particular elements of code can be done using the statistical packages Stata, SAS and R. We also present recommendations for how to write code.
economics
What problem does this paper attempt to address?