Ideally, all research code should be made available at the point of submitting a paper. I’ve found that the way I write my research code has changed for the better now that I’ve made a commitment to making it open. However it can somewhat opaque and time consuming to understand, so how can we help those wanting to review, use, or adapt your code?
If you use Object Oriented Programming in your research code then this Matlab toolbox (UMLgui) is perhaps one way to help. It generates UML class diagrams directly from your code. This is handy to provide a quick overview of your code, both for others and yourself. I applied it to the code I wrote on my recent paper which does Bayesian analysis of delay discounting data (Vincent, in press) and got this nice looking UML class diagram. I imagine such tools are available for Python as well.
If you don’t use the OOP approach, then stay tuned for my next instalment of my Cognitive Modelling series.