Tips for programming scientific articles
Unfortunately, there is accumulating evidence on lack of reproducibality of results across different fields (for example, for another example, for yet another example).

As a response to that, professional bodies and research teams are publishing guidelines for reproducible research and you might have to search for something like that in your field. It would be great to cite something along the lines of "...in our work we have tried to take on board the Reproducible Research guidelines published by...[citation] wherever it was possible".

Some of those are as follows:


Ten simple rules for reproducible computational research
A guide to reproducible code in ecology and evolution
Recommendations to funding agencies for supporting reproducible research by the American Statistical Society
Reproducible Research for Scientific Computing: Tools and Strategies for Changing the Culture
The ROpenSci project's Reproducibility in Science. The specific reason I am mentioning this is because it has a very nice "Further Reading" section, albeit specifically addressing R users.


And of course, on the wake of these guidelines, there are projects like the Open Science Framework which try to provide implementations to guidelines and propagate best practices.

While you can read lots of articles, about these things, the point is to create such conditions that demonstrate clearly how you arrived to your results. And this has to be done in such a way that it does not require your input. You don't have to be there to explain anything (this is also what the scientific papers are supposed to be about).

This is very powerful for three reasons:


Obviously, if there is any doubt by anyone about your results, they can simply try to repeat everything themselves or, if possible, simply download a virtual machine with "the whole lab" already set up and go through your whole process.
If you have made some sort of mistake, it is easy for someone to point it out and it is also a way to demonstrate that this research was performed with the best knowledge at the time it was conducted.


If you have made some sort of mistake and someone else spots it everybody wins.

If you cannot reproduce the results then you simply say "Here is the whole setup, here are all of my workflows and data, here is how the experiments were setup (if you cannot share the data directly). I have tried my best to reproduce these results but so far I have not been able to do so".


This last point is probably more important for what you are trying to do because sometimes, there is a lot of frustration as to why "our numbers don't satisfactorily match XYZ's numbers".

Hope this helps.