50

I came across an answer from a question in the bounty section and upvoted the answer, because it makes more sense and looks helpful than the other ones, but this answer had a complete MIT license text in it. It is looked unnecessary to me.

The answer looked like this:

Enter image description here

I made a comment and kindly asked the OP to remove the license text from the answer, but I got this reply:

Enter image description here

At this point I realized OP wasn't going to fix it and to prevent this from happening again, I edited the answer and removed the licencing text. I also told OP to refrain from posting the license text from his future questions and got this reply:

Enter image description here

I am getting accused of "breaking the law" and not "respecting his rights". Now, OP removed the code from the answer and linked to a GitHub page. At least, the license text is now gone.

Should we ignore the license texts in posts?

What should I have done?

I do think the OP should provide the part of the code relevant to the question, link to the complete code to the GitHub page then mention that the code is under a MIT license instead of posting a complete MIT license text. I wonder what every answer would be like if they include the license texts

16
  • Related but not an answer: meta.stackoverflow.com/questions/291319/…
    – Servy
    Commented Nov 8, 2018 at 15:41
  • 23
    You can slap a comment on there about him having dual-licensed the code as CC BY SA by posting it on Stack Overflow, and that you have every right to scrap the license since the code is still attributed to him and still under the CC BY SA license as indicated by the page footer, but I imagine you've already made a similar claim and he didn't respond well.
    – Erik A
    Commented Nov 8, 2018 at 15:42
  • 1
    @ErikvonAsmuth Yes, I left the part that says the code is under "MIT license" license in my EDIT and just removed the big license text but this user not happy.
    – Programmer
    Commented Nov 8, 2018 at 15:44
  • 4
    I know this was asked and it was said that while the author has every right to duel license their code, they don't have the right to use SO as the platform to publish their code in other licenses, and that it should be removed from posts as noise. I can't find the dupe though. Including the license and stating it applies to your contributions is fine in the profile though, as per my earlier link.
    – Servy
    Commented Nov 8, 2018 at 15:48
  • @Servy I told this user he doesn't need to contribute or publish his code if he has another license. That's why he removed his code.
    – Programmer
    Commented Nov 8, 2018 at 15:56
  • 3
    @Servy Is this the one you're looking for: meta.stackexchange.com/questions/291995/… ? it is on MSE so can't be closed as a duplicate.
    – rene
    Commented Nov 8, 2018 at 16:03
  • @rene Looks like it to me.
    – Servy
    Commented Nov 8, 2018 at 16:05
  • 1
    @Programmer: Sounds like the consensus is (after reading the cross-site dupe) is to remove the license and flag for moderator attention if they roll it back once more.
    – Makoto
    Commented Nov 8, 2018 at 16:23
  • I will notify the mod if it is rolled back.
    – Programmer
    Commented Nov 8, 2018 at 16:27
  • Side note: If the answer is now just a link to a repo, flag it as NAA.
    – Nic
    Commented Nov 8, 2018 at 18:57
  • 6
    Please include quoted material as text, not just as a picture of text. Commented Nov 8, 2018 at 19:23
  • 5
    @T.J.Crowder I used screenshot because I didn't want the meta effect to kick in. Wanted to make it harder to find the post but will use text version in the future.
    – Programmer
    Commented Nov 8, 2018 at 19:27
  • 2
    That's quite a definition of fine. ;) Commented Nov 9, 2018 at 21:31
  • 1
    Doesn't the MIT license remove the attribution requirement? Commented Nov 10, 2018 at 1:44
  • 2
    @KevinWorkman: No, the MIT license pretty much makes attribution the only requirement.
    – Ry- Mod
    Commented Nov 10, 2018 at 15:52

1 Answer 1

57

There's a lot of confusion here, and it's causing far more problems than are necessary.

Disclaimer: I'm not a lawyer. Don't interpret this as legal advice.

  1. If you are the sole author of something, you can license it however you want. You can have one license, or two licenses, or multiple licenses - the folks using it can then choose whichever license they wish to use.

  2. If you're posting code here, then you must agree to license it under the CC-BY-SA license. This doesn't preclude you from also offering it under other licenses - if you have the authority to set one license, then you can also set however many other licenses.

Lots of folks go out of their way to specify that they're dual-licensing the code they post on Stack Overflow. For instance, this guy. And that's fine.

What we need to ensure here is that the author of that answer understands that putting an MIT license on their code does not strip the CC-BY-SA license; it only adds another license to the pile. Also, that posting here (with or without a license) never puts it in the public domain by default; if they're the author, then they retain full rights to it, with the caveat that by posting they're agreeing to license it to both Stack Overflow and any readers under the terms of CC-BY-SA. If they're ok with that, then they can put an MIT header in, or whatever. If they're not ok with that, then they shouldn't post the code here - hosting it on GitHub is actually preferable, as long as the answer stands on its own.

See also:

8
  • 13
    This guy has just realised he should probably re-word that sentence a touch...
    – ArtOfCode
    Commented Nov 8, 2018 at 18:51
  • 4
    So you're saying, it's ok for the author to include the license and that it should not be edited out? But it doesn't prevent it being available under the CC-BY-SA license of course.
    – user3956566
    Commented Nov 9, 2018 at 1:32
  • 10
    I really don't care that much, @YvetteColomb. I'm mostly bothered by the poor communication here: it'd have been more useful to ascertain whether the author was aware of how the default licensing works here, whether they even owned the code they were posting, etc... And then, once everyone was on the same page, we could've tried to work with them. As it was, we had folks talking past each other in the comments and an edit-war, and nothing of value to anyone came out of it.
    – Shog9
    Commented Nov 9, 2018 at 2:14
  • 2
    @Shog9: Not just the author, but everyone else for that matter. Talking about stripping the alternate license from the answer as if dual licensing wasn't allowed (or wasn't a thing)? Calling license notices "noise"?
    – BoltClock Mod
    Commented Nov 9, 2018 at 6:12
  • 3
    @YvetteColomb Since the code already implicitly has a license due to being posted here, mentioning another license is at best a minor tangential detail that has little to no relevance for the vast majority of people. I'd say they can include it, as long as it doesn't take up more than one line in a post (e.g. mention the license and include a link to give more details). Commented Nov 9, 2018 at 10:08
  • 4
    @Dukeling it might be a good case of licensed under <license name> with <link to more details>. A case for encouraging links.
    – user3956566
    Commented Nov 9, 2018 at 10:09
  • 7
    @BoltClock License notices are noise unless there's actually a reason to dual-license the code in question. For most code snippets on Stack Overflow, there isn't - because most code snippets are either sufficiently trivial (e.g. single API calls) that there's no way you could win a copyright suit over their use anyway, or are examples that you wouldn't want to copy and paste as-is. There's no link to the question that sparked this argument, as far as I can see, but it looks like it was a toy example of a design pattern, with toy identifier names? Nobody would copy such a thing.
    – Mark Amery
    Commented Nov 9, 2018 at 12:11
  • 9
    You successfully increased ArtOfCode's profile page view count by 1k!
    – iBug
    Commented Nov 9, 2018 at 12:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .