How to Format Code in Research Reports
Posted
by RoseOfJericho
on Stack Overflow
See other posts from Stack Overflow
or by RoseOfJericho
Published on 2010-03-18T06:00:26Z
Indexed on
2010/03/18
6:31 UTC
Read the original article
Hit count: 270
I am currently writing a formal research report, and I'll be including code with this report.
Question: Is there an accepted way of displaying code in research reports? I'm thinking both in terms of font, spacing, et cetera, and whether the code should be displayed inside the document, or in an appendix.
The code will be JavaScript and PHP. None of the sections of code will be more than 25 lines (so they're mere snippets). There will be approx. half a dozen snippets. Each of the snippets will have a couple of paragraphs explaining what is happening in the code, and a discussion on its pros/cons.
I have no contact with the body the report will be submitted to, and they have no published guidelines on how to format code (please do not question these points).
Any help considered and appreciated.
© Stack Overflow or respective owner