2

I was wondering what requirements must be met if you want to License Code, if you take this Simple Code for example:

int main()
{
    int x = 0;
    return 0;
}

Could one Hypothetically License this 5 simple Lines of Code? If not why?

  • See also: License for code snippets? – Brandin Jan 11 at 7:34
  • For something to be copyrightable it has to include creative elements. I see no creative elements in your program. For example, every C program must have the line "int main()" somewhere and returning 0 is pretty standard. Finally, you make an assignment to x but never use it for some reason. As you add creative input to this, it will become more likely to be copyrightable. – Brandin Jan 11 at 7:42
  • @Brandin My C programs have int main(void) or int main(int argc, char **argv) or similar. int main() is either bad C, old C or C++. – Philip Kendall Jan 11 at 7:50
  • "For something to be copyrightable it has to include creative elements." Is this written somewhere? If so where is the Line between non Creative and Creative Elements drawn? And who decides that? The Judge? And of course this Program was just an Example and doesnt do Anything. Thanks for your Time :) – ZoidZero Jan 11 at 12:08
  • @ZoidZero In the US, something copyrightable has to include creative elements. I don't know about other countries. One result is that a photograph intended to look as much as possible like the original painting can't be copyrighted in the US, as creativity is excluded from the process as much as possible. For more questions, try law.stackexchange.com. – David Thornley Jan 11 at 17:51
4

You can always put a license on it, just like anything else, but it's probably too trivial to be copyrightable. But the only way to know for sure would be for it to be tested in court.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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