1

I'm working on my Master's thesis in Computer Science. Shortly, I am "drawing" a diagram, which is then serialized and from the serialization I generate some source code. So, my question is not about the code of my application, but about the code generated by it. I think we can call it the result of my app.

I want to include an example of what output (source code, although I will also include the intermediary serialization) has my app for a certain input (a diagram). I mention that this would mean many pages, maybe a total of 7-10. Should I include this in the part related to the results or maybe in an appendix? Or is there a more suitable place? Or should I not include anything at all?

8

Short answer: put your code in public repo, and cite the repo in your paper.

Long answer: Any academic document you produce is supposed to be readable and useful to your readers. Try to put yourself in a reader's shoes and imagine how you feel reading through a 7-page long autogenerated code? Is is a pleasant or useful experience that you would like to repeat one day?

The modern technology allows us to use much more than just a text on the paper to present our research outputs. Although a short pieces of code may be extremely useful and appropriate in textbooks or some articles, the long code and auto-generated code really does not belong to the paper. It should be kept in a public repository, where it really belong, and used as a working example, which people can download, modify and execute, not just enjoy it aesthetically in a pdf file.

  • this sounds like a good idea... hmmm – Sorin Adrian Carbunaru Jun 23 '14 at 14:05
  • my supervisor said I could add this to the appendix, but I like your idea, so I will mark it as my accepted answer – Sorin Adrian Carbunaru Jun 23 '14 at 17:48
  • This is good advice. If someone comes across your thesis and wants to implement the code you've provided, they're likely to retype all of it by hand (either because they have a hard copy of your thesis or because copying the text from the PDF results in formatting errors, etc.) Posting the code in a public repository will make your code more easily usable to others. – Matt Menzenski Sep 16 '15 at 13:13
1

I assume you are publishing the code that you wrote by hand. Then, the interested reader can just run it and get the output.

Generated code is usually unreadable, so there is little point in going through tens of papers of near-garbage. What could be a good idea is to show some excerpts, no more than a paragraph. One option is perhaps some particularly clever parts, like the handling of a particular corner case; another would be a fairly general simple case, to see how readable it would be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.