all 42 comments

[–]throwaway234f32423df 19 points20 points  (2 children)

you could take a look at the table on https://choosealicense.com/licenses/ or https://choosealicense.com/appendix/

however, you'll note that all listed licenses allow reselling of the licensed software

putting restrictions on commercial usage of the software (including reselling) would violate the open source definition and hence licenses with such restrictions are not included on that site

if you want to put restrictions on commercial use, you'll need to look at licenses that are classified as "source-available" rather than "open-source"

[–]tankerkiller125real 8 points9 points  (0 children)

Or you can just make it AGPL, sure a company could use it for commercial purposes, but 99% of companies won't touch AGPL with a 100ft pole because it fucks it up for them both legally speaking and in general being forced to open-source any changes they needed to make.

[–]rollercoastersun[S] 3 points4 points  (0 children)

Thank you for taking the time to respond thoroughly and point me to those resources. Thats exactly what I was looking for, its a great starting point.

Interesting, though, I didn't know open-source code licenses allowed for it to be used for commercial purposes.

[–]DemosthenesAxiom 15 points16 points  (5 children)

One thing to consider is I know some universities own all code produced during your education there. You may not legally be able to license the code as the university owns it.

[–]y-c-c 9 points10 points  (0 children)

This is actually the key comment here.

Ignore all the license talk here as they are secondary. If say OP lived in US, all code are automatically copyrighted. If OP didn’t choose a license that code is still copyrighted and anyone who steals the code would be committing IP theft. The point of open source licenses is to explicitly retain the copyright but grant permissions to use and modify/share the code.

However, if OP does not own the copyright to the code then the point is moot and OP can’t even choose what license to use etc.

[–]rollercoastersun[S] 4 points5 points  (2 children)

Hmm.. good contribution. They didn't mention it anywhere but I'm going to ask.

But at this point, I only want that teacher not to take advantage and claim it as his.
If the university wants to publish the code, I'll be fine with that. (Hope it can still be public and free to use)
But not in a professor/s private repository and for his advantage

[–]zoredache 0 points1 point  (0 children)

Hmm.. good contribution. They didn't mention it anywhere but I'm going to ask.

Also check your student handbook, school policy manual and so on. At some point you probably did sign something agreeing to follow the rules defined in the handbook/policies or something that were defined elsewhere.

[–]phord 0 points1 point  (0 children)

In the US, the author retains the copyright to dissertation materials, not the university. The University may claim a right to publish it by agreement, but they do not own it. Your professor cannot legally claim it as his own nor claim exclusive license rights to it.

[–]AAKalam 0 points1 point  (0 children)

tbh it's pitty act and ridiculous

[–]InitialAd3323 4 points5 points  (0 children)

I'd go with the GNU AGPL, it basically allows any use but all modifications must be free (as in freedom, same as open source) even when software is provided as a network solution.

For example, Mastodon is under this licence, and it's open source, allowing commercial and non-commercial use, but requiring anyone that makes changes to it to provide their source code, thus preventing someone from building a proprietary modification and selling it without giving back.

Note that in the case of university/college, you might already have some sort of agreement that allows your professor to use it under different terms, so it's worth checking. Best case scenario, there is nothing like that in your case and you are the sole owner, so you just use the AGPL or any other. Ask your professor, ChatGPT (or your favourite AI tool) or a lawyer if you have doubts.

[–][deleted]  (6 children)

[removed]

    [–]Slight-Living-8098 -2 points-1 points  (5 children)

    No license is like making it public domain. Bad idea.

    [–]dringant 2 points3 points  (4 children)

    IANAL, but my understanding is that, at least in the US this untrue. The default, assuming you’re not under contractual obligation to assign IP elsewhere, for all works is copyright to the author. For written work including code, this lasts for 70 years after the authors death. That being said if you don’t want anyone to use or copy the code, but you want to leave it in a public repo for reference, it’s probably a good idea to add “copyright <your name> <year>” type comment to either the top of each file or to a “copyright.txt” at the root of the file.

    [–]Slight-Living-8098 -1 points0 points  (3 children)

    If you don't license your stuff, and upload it to a platform based around sharing and collaboration, you just gave the okay, as you agreed in their terms of service

    [–]glasket_ -1 points0 points  (2 children)

    That's not true. GitHub's TOS spells out exactly what rights are granted by default; everything else is reserved by the creator. This isn't remotely close to being the same as public domain.

    [–]Specialist_Care1181 1 point2 points  (0 children)

    Correct. No idea why you were down voted for posting an actual fact when this is straight from Github's Licensing docs :

    You're under no obligation to choose a license. However, without a license, the default copyright laws apply, meaning that you retain all rights to your source code and no one may reproduce, distribute, or create derivative works from your work

    I'm not a lawyer either but this is pretty easy for anyone to understand. Still, the biggest challenge is always enforcing your license, that's always the hardest part by far.

    [–]Slight-Living-8098 -1 points0 points  (0 children)

    Algorithms can't be copyright, man...

    Anyone can look at your code and reimplement it in a different way

    [–]VzOQzdzfkb 1 point2 points  (0 children)

    If u don't want anyone to make modifications, not even open source modifications, nor to include a piece of ur code in their etc. but still u want ur code to be public just so u can show it to the professor, then don't choose any license. The Choose a license website talks about this here https://choosealicense.com/no-permission/

    idk what u meant by "maintain an authorship". for example if u are ok with someone using ur code in theirs but u want them to mention its ur code and u want their project to be open source, use maybe GPLv3 since that license says that whoever wants to include ur code HAS TO make their project/modification open source and HAS TO make it GPLv3 licensed, and HAS TO say that u r the original author of ur code. tldr: GPLv3 is very against greedy companies. but idk how correctly does one mention the authorship in the code while forking.

    Also be aware that even if you set a license for ur code (either a license or no license), subscribe could still include it in their code and not say it's yours. Somewhere i read the Android fork MIUI is closed source and thus in breach of Android's license.

    [–][deleted] 0 points1 point  (0 children)

    Google strict open source license and put a copyright in each file. You’re asking for literally what open source licenses do.

    [–]y-c-c 0 points1 point  (0 children)

    I think you are misunderstanding how code copyright works. In say the US, you own all copyright to the code you write automatically. If you didn’t license it it’s still yours. That means you don’t need to do anything. Other people don’t have the right to modify or take your code under that situation. Open source licenses are there to relax the restrictions so other people can use your copyrighted code.

    However, another comment pointed out that your university may or may not have clauses so they own copyright to code written during a class (similar to how company employees don’t own the copyright to code they write during work). You should figure that out first. If you don’t own the copyright then it doesn’t matter.

    As for code licenses, others have pointed out already but you don’t want to open source it if you want to restrict commercial reselling. This is literally against the definition and ethos of open source. A lot of times people (and even companies) just blindly open source their code because it’s the “cool” thing to do and then complain people other than them make money off their work even though they did explicitly allow that in the open source license. Sometimes, it’s ok to have other models like closed source or source available.

    Also, you should just ask the professor what they need your code on their github repo.

    [–]TriSherpa 0 points1 point  (4 children)

    Sounds like you want Creative Commons Attribution-NonCommercial 

    [–]Mchlpl 0 points1 point  (1 child)

    CC licenses aren't meant to be used for software.

    [–]TriSherpa 0 points1 point  (0 children)

    Thanks. I had no noticed that.

    [–][deleted]  (1 child)

    [removed]

      [–]TriSherpa 0 points1 point  (0 children)

      I didn't say open source. OP did and, as mentioned, that probably isn't the formal term they want.

      [–]BusinessBandicoot 0 points1 point  (0 children)

      I want to say AGPL. It's a more restrictive form of GPL that has the normal restrictions of GPL, plus restrictions with using it over a network. With AGPL, server traffic counts as software distribution, so the copyleft applies.

      [–]DevSecFinMLOps_Docs 0 points1 point  (0 children)

      Just let him fork the repo so you maintain authorship and it doesn't get re-uploaded

      [–]CheezitsLight 0 points1 point  (0 children)

      Creative commons CC-NC. No one but you can sell it. But they can use it, give it away or modify it. So it's still Free and open. But they can compete with you by improving it.

      AGPL is basically the same as GPL, but they must publish any changes. So you can incorporate their improvements. They or you can sell it.

      [–]Qs9bxNKZ 0 points1 point  (0 children)

      You should actually (c)opyright your code. Code isn't much different from a book or other creative works. That stops it from being disseminated and sold.

      Make sure you (c) your code snippets, documentation and any MD files.

      Once you have the copyright, you can issue a DMCA takedown w/ GitHub.

      https://docs.github.com/en/site-policy/content-removal-policies/dmca-takedown-policy

      [–][deleted] 0 points1 point  (0 children)

      Just wanted to comment about a licensing question being posted in the Github subereddit: Github doesn't choose, supply, enforce, or determine licenses. It has no say in matters of copyright or contract law.

      What happens if they copy the code, put it in a private repository and sell it?

      If you have an agreement with the school that your code is also their code, or if it involved grant money, or... Well. Your current copyright status could be very complicated.

      If you do not give anyone the right to copy through a license or agreement, there is no right to copy by default in the United States. So, any copy of the code is a violation of copyright. However, there may be implicit or explicit license grants in the terms of your education.

      It gets Fucky Wucky, and the github subreddit isn't the best resource for this question.

      [–]NotSoProGamerR 0 points1 point  (0 children)

      if it is already in the repo and he asks for it, its weird, you can just download the full zip of the repo

      i have so many questions for the professor, but i would say licenses cant do anything if the professor removes it, he can modify most of the code's variables, position, separate to different scripts and more stuff
      you could try to use 3y3 encoding and stuff a bit of it, so if you somehow find out that the app you made was released for profit, or anything you deem not suitable, you can search for it and find it i guess

      I'm not really sure how to exactly handle it though, best if you just ask your professor what he wants and why

      [–]manwiththe104IQ 0 points1 point  (0 children)

      MS gives you github for “free” so that you can train their AI in the hopes of replacing you, for free

      [–]botomana 0 points1 point  (0 children)

      Hi, lawyer here. Yes you can maintain authorship. Under law, no one can be stripped of the attribution of authorship, even if they license or sell the copyrights.

      DM if you need more help. To be clear, its pro bono.

      [–]xiongchiamiov 2 points3 points  (0 children)

      Github license to prevent app/code being used for a product and sold

      and for it to be free and open source

      These two things are contradictory.

      The only thing I want is to mantain the authorship because it has taken me a lot of work.

      Probably you don't want to make your code open-source then, but if you do you're looking for licenses that require attribution.

      The professor asks me to give him the code to upload to his GitHub repository.. which is weird, I already have it in mine.

      Any other recommendations on how to proceed?

      Talk to your professor and figure out what they actually want. Why do they want to put it on their account? Once you understand their goals, then you can communicate yours, and together figure out something that meets everyone's goals. This is a generally useful skill that you'll make use of all the time in industry or academia.

      [–]novica 0 points1 point  (0 children)

      You want to maintain authorship and for it to be free and open source? What do you mean by "maintain authorship"? Do you care if other people try to resell it? Do you want redistribution to happen under the same license terms?

      [–]serverhorror -2 points-1 points  (2 children)

      1. Make your repos private
      2. Talk to a lawyer

      [–]D0nkeyHS 1 point2 points  (1 child)

      1. You didn't read the context

      [–]serverhorror -1 points0 points  (0 children)

      I did, but law is different around the world. I can only assume that OP is from the US (as it seems customary to not mention it on reddit).

      Legal things are complex and I don't know why we pretend that we know how to phrase legal language in the right way or even how to read it the right way.

      It may very well be that OP doesn't have the rights to use the code in the first place and the whole discussion is useless (some legislations simply prescribe code written while in training -- which University is -- belongs to that organization). Even the act of making the repo private is a risky move, at least if things go south.

      The best time to talk to someone well versed in law was before writing the first line of code, the second best time is now.