4

I am currently writing a conference paper (an IEEE conf, if that matters) in which I include a piece of code. Pertaining to the license of the code, should I, at the beginning of the code, write something like

-- Author: Ton Ami, 2021.
-- License: MIT License. ------> this
--  Below is code to help you make a better world
...

Or should I just put the code without any license terms?

In any case, what would the license of the code be?

Related questions:

License of code accompanying a published article

Is there a default license for code libraries that accompany scientific research papers

Include code snippet which is licensed under the MIT License in a paper

fajar
  • 191
  • 3
  • @FedericoPoloni None of your questions matter - it would not change the answer. OP should contact the journal or publisher to ask about copyright of published code (or maybe you can find the answer on their website). – Louic Mar 03 '21 at 08:26
  • 1
    Is the code yours? (I assumed so in my answer. That might not have been your intent.) – user2768 Mar 03 '21 at 08:39
  • 1
    @Louic I disagree; maybe it would not change your answer. – Federico Poloni Mar 03 '21 at 09:55
  • 1
    @FedericoPoloni There is no such thing as "my answer". If answers are opinion based the question should be closed, but that is not the case here. – Louic Mar 03 '21 at 10:01
  • 2
    @Louic I disagree on this, too. However, feel free to add an answer if you think there is sufficient detail to give one. – Federico Poloni Mar 03 '21 at 10:04
  • If you can and want to license the code, assuming you have copyrights and are able, then put the license terms into the header of the code itself, as you suggest. This avoids the problem of the license being somehow separated from the thing licensed. Once you license it, any transfer of copyright will need to respect that license. But you can't license it after you transfer copyright. Only the copyright holder can do so. – Buffy Mar 05 '21 at 14:28