What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

To my understanding from various Q&A here on meta (reference at the end) every piece of code posted on a stackexchange site gets published under the Creative Commons License.

A user on codereview asked for a review of his code linking to his repository, without directly posting his code. Looking in his repository, at the beginning of every file there's a notice like this one:

# ---------------------------------------------------------------------------
# Copyright (c) 2012 Xxxx Xxxx (aaa@bbb.com)
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
# ---------------------------------------------------------------------------

Since this user has been asked to directly post his code, I'm not sure about what consequences there might be if he was to do it.

Would his code be available under both licenses? CC here and MIT from his own repository?
Could he have trouble in the future?
Would there be a license infringement?

Update: The code is been directly posted (with the license notice).


Other meta questions I found that are addressing license issues:

share|improve this question
1  
Even if this were an issue (I don't think relicensing MIT as CC-BY-SA should cause any problems, but IANAL as usual) -- if it's his own code, how could there possibly be a license infringement and/or "trouble"? –  balpha Apr 10 '12 at 17:15
    
@balpha: In one of the question I linked it was mentioned the possiblity of having trouble in a future audit. –  Rik Poggi Apr 10 '12 at 17:20
2  
That is totally irrelevant if it's his own code. He can put that under one or under twenty different licenses. –  balpha Apr 10 '12 at 17:22
    
@balpha: I'm not an expert with audit, I wasn't sure about the possible consequences. –  Rik Poggi Apr 10 '12 at 17:25

2 Answers 2

up vote 5 down vote accepted

Generally speaking, users must comply with the original license when posting their code here. The terms of the Creative Commons license must be "compatible" with such posting.

The way that I manage this when I post code on SE is to scrub the code of any potential licensing or intellectual property issues before I post it. This is easier than it sounds; by the time you've pared the code down to an SCCCE, your code should really be quite generic.

The MIT license says, in part:

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation <snip>

(emphasis mine)

The MIT license is very unrestrictive. I would think that you could CYA by simply including the sample header you posted in your question.

That said, I don't think the intention of Code Review was to allow people to post a link to their entire open-source project, and expect a line-by-line peer review.

share|improve this answer
1  
The code on codereview is a requirement, on the other hand is not likely to provide a SCCCE there. Now that the code has been posted, will be available under both licenses? Do you think it might be appropriate to inform him? –  Rik Poggi Apr 10 '12 at 17:31
    
@RikPoggi: I would say the rule of thumb here is to respect the author's intentions. The code is licensed under MIT, and clearly states as such. If you want to use the code in your projects, follow the MIT license. –  Robert Harvey Apr 10 '12 at 17:33

I'd like to directly address my questions since I think to have reached a better insight on the topic.

Would his code be available under both licenses? CC here and MIT from his own repository?

Yes, but is also clear that the MIT license is the "main" one.

Could he have trouble in the future?

No, he's the owner of the code, so he can license it under all the license he'd like to.

Would there be a license infringement?

No, because the two licenses are compatible.

share|improve this answer

You must log in to answer this question.

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