7

During the compilation of thesis (MSc or PhD) in a case we wanted to include some program codes as chapters:

We prefer to put heading to all program codes everywhere they appear as complete source to clarify the license. Is it nice to do so? Any other solutions?

Something like this:

3.1.1 Loop
...text...
-------
Copyright 2013 Coder, ... !this part
-------
function loop(...) result (...)
some code
-------
...text...

  • 2
    I think that the license of your thesis itself would apply to code snippets that are included in it. Of course, you may release the full code under a different license. But I wouldn't repeat that license with every code snippet. – David Ketcheson Dec 17 '13 at 8:14
  • @DavidKetcheson We think if someone wanted to try the code (because they are complete codes) he/she may just copy the code and run it. In this case the license as it was not with the code is ignored indeed. We don't want this happen by any extent so. – Developer Dec 17 '13 at 8:17
  • Similar, but not a dupe academia.stackexchange.com/questions/10629/… – user7130 Dec 17 '13 at 8:44
  • If someone wants to ignore your license, they may do so -- regardless of how many times you print it. – David Ketcheson Dec 17 '13 at 9:26
  • @DavidKetcheson Correct. But in this case he/she is doing that consciously not by mistake. In any distributed code as file there is header of license as we see almost everywhere. Here we include all the code in print instead of filing (due to some reasons) so this is the case. – Developer Dec 17 '13 at 9:30
4

You should add source codes scarcely and when it is interesting to add the code. Loop does not sound one of the interesting headings. In those cases you should include source code as figures and discuss them in your text.

in other cases, you can give complete source codes in appendix or in a CD/DVD as an attachment.

  • 2
    I would just put the code on the internet. CDs and DVDs may be obsolete in a few years, and are a pain for the reader to get. – David Ketcheson Dec 17 '13 at 8:13
  • Hey, Loop is just for demonstration, you may consider finite difference solver instead :) if you like. Furthermore, We want them to be chapters not an appendix in any form. – Developer Dec 17 '13 at 8:13
2

From my own experience and this would depend on your university's guidelines, a summary of the main algorithms of the code ought to be included - specifically with what each algorithm does, what's its significance, how it functions and how it links with the other parts.

In my recently completed and peer reviewed PhD thesis, I also included example 'snippets' or bits of code and included a flowchart of how the program as a whole works, linking all the described algorithms.

I was advised to write chapter subtitles with the context of each algorithm.

  • So did you have any complete function or program printed in your thesis chapters? If so did you include the license part in them? – Developer Dec 17 '13 at 8:15
  • no, no complete functions, just descriptions and explanations – user7130 Dec 17 '13 at 8:16
  • OK. Let's say more details here: Let's assume we have developed a package. We put functions and their explanation on what they do in a chapter, for example. How about this case? – Developer Dec 17 '13 at 8:21
  • I was just stating what I did in my peer reviewed and successfully completed PhD. – user7130 Dec 17 '13 at 8:30
  • We read your linked post. We are familiar with Git things however we prefer to include all code in the thesis, so when one has it he/she has everything. We upvoted your answer. – Developer Dec 17 '13 at 9:10
1

If you want the code itself out there, put it up on GitHub or BitBucket.

As to the thesis itself, it depends on the pedagogical value --- some algorithms are worth including as code themselves: where the specifics of the language and environment matter. Others are best included as pseudo-code.

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.