Proper way to format computer code included in a thesis/dissertation I intend to include my computational model code(s) in its entirety as an appendix in my dissertation.  I've gone through my university's formatting guidelines and haven't seen anything on the proper way to format the code in terms of size of font, text-wrapping, spacing, and so forth.  What's the best way to do this?

When I read code, while I'd want it to be a typical font size (12 pt), I'd also want the text-wrapping to be minimal, but given the traditional margin requirements, it can be pretty tough to accomplish this.  Having code trail off one line and onto the next is generally distracting.

Also, although comments in code are prevented from execution by using a character sequence like %or // or (* many compilers color-code this text to make it more easily distinguishable from executable portions of the code.  Is there any way to easily make comments distinguishable when putting the code into the text of your thesis/dissertation?
There are a number of excellent LaTeX packages for typesetting code, made for just such occasions.  The listings package is one good example, which includes standardized formatting for a number of languages.  

It does not provide a "definitive" way to typeset code (there is no such, since there are a number of competing conventions) but its defaults provide a standard and well-recognized formatting that is entirely appropriate for academic publications. Furthermore, it can be customized to follow any unusual requirements of your institutions thesis format.