My question is about sharing code in my thesis. I ran simulations using ready data in my field from a book. After that, I compared the results with those from the book. Do I need to share my code or is sharing it optional? Because I already explained the methodology that I used for my thesis. Looking forward to your answer. I tried to find a proper answer but I couldn't find it.

  • 1
    Ask your advisor. Whether or not sharing code is "expected" is field dependent, but regardless, your advisor's opinion is the only one that matters (or at least it matters much more than any other consideration). – Morgan Rodgers Dec 23 '18 at 21:12
  • 4
    You could always put your code up on GitHub and include a reference to it in your thesis. But not including it (especially if your advisor/committee tells you not to) is not any sort of academic misconduct that will cause your thesis to be revoked. Something like that is only done for serious things (plagiarism, etc.) – Morgan Rodgers Dec 23 '18 at 21:28
  • 1
    @MorganRodgers Sounds like your comments would make a good answer. – Federico Poloni Dec 24 '18 at 11:32
  • This may depend on what field you are in. – Peter Shor Dec 24 '18 at 21:27

If your advisor suggests not publishing your code then it would probably be a mistake to do so. How your thesis is handled is a matter for your advisor, your committee, and the university to handle. If they are satisfied then there is no danger of "cancellation" or other problem.

After your degree is granted you can make your own decisions in the future about what to publish and what not. I'll note that you can use your thesis as the basis of future publications and update it as you see fit, properly citing it, of course.

But it is the institute and no-one else who decides about your degree.


Your institute is the one who gives you your degree, revoking it is only going to happen if there is some sort of serious academic misconduct that they find out about much later. They know at the time you submit your thesis whether or not your code is included, so there is no reason that they would give you your degree knowing this, and then later deciding it is a reason to revoke your degree.

The most important thing is that your degree needs to be approved by your advisor and committee, so if your advisor says not to include it, don't. You could always put your code up on GitHub and include a reference to it in your thesis. (My thesis included my code at the end, as an appendix; I'm pretty sure no one ever looked at it).

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.