{"title":"Programming Style: Suggested Guidelines for Writing Code","authors":"Joe Hirschberg, Jenny Lye","doi":"10.1111/1467-8462.12567","DOIUrl":null,"url":null,"abstract":"<p>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.</p>","PeriodicalId":46348,"journal":{"name":"Australian Economic Review","volume":"57 3","pages":"302-313"},"PeriodicalIF":1.0000,"publicationDate":"2024-06-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://onlinelibrary.wiley.com/doi/epdf/10.1111/1467-8462.12567","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Australian Economic Review","FirstCategoryId":"96","ListUrlMain":"https://onlinelibrary.wiley.com/doi/10.1111/1467-8462.12567","RegionNum":4,"RegionCategory":"经济学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q3","JCRName":"ECONOMICS","Score":null,"Total":0}
引用次数: 0
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.
由于计算机代码已成为当前研究的基本要素,因此代码必须写得清晰、风格良好。写得清晰、风格良好的程序更容易调试,对那些想复制、扩展、加速或借鉴您的工作的人来说也更有用。显然,书面代码也是培训未来研究人员的有用工具。在本文中,我们提出了一套风格指南,并举例说明了如何使用统计软件包 Stata、SAS 和 R 来完成代码中的特定元素。
期刊介绍:
An applied economics journal with a strong policy orientation, The Australian Economic Review publishes high-quality articles applying economic analysis to a wide range of macroeconomic and microeconomic topics relevant to both economic and social policy issues. Produced by the Melbourne Institute of Applied Economic and Social Research, it is the leading journal of its kind in Australia and the Asia-Pacific region. While it is of special interest to Australian academics, students, policy makers, and others interested in the Australian economy, the journal also considers matters of international interest.