Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Let us say, I am browsing the internet and stumble upon a SO answer/forum/blog with code that perfectly solves a problem I have. The only trouble is they didn't specify any sort of licensing for their code.

Is this code usable in my project or would I break copyright laws?

What would be required for me to include it in a closed source project? An open source project?

What licenses would be compliant or non-compliant with it? (e.g. Could I take their code and release it with GPL code?)

share|improve this question
8  
If you scroll waayyyyy down to the bottom of the page, you'll see that user contributions to SO are licensed under a BY-SA Creative Commons license. –  Jonathan Apr 14 '11 at 17:41
1  
Each forum/blog will have its own license. There is no answer that applies to all of them. –  Anna Lear Apr 14 '11 at 17:47
    
I never noticed that before. Thank you. That may be the answer I need. –  Wulfhart Apr 14 '11 at 18:49
    
I am still curious, what about the case where it is a private individual's site and they still failed to specify a license? –  Wulfhart Apr 14 '11 at 18:51
1  
in the long run, it doesn't really matter. They posted the code on their site to help people. I don't think they're going to go out and sue the people they were trying to help –  Earlz Apr 14 '11 at 22:51
add comment

3 Answers

up vote 2 down vote accepted

IANAL

At the bottom of each page on the StackExchange sites is a line that reads something like:

site design / logo © 2011 stack exchange inc; user contributions licensed under cc-wiki with attribution required

So, anything you find on StackExchange (including StackOverflow, ServerFault, and SuperUser) is licenced under the terms specified on the page.

share|improve this answer
add comment

Even if the posts are considered public property (like SO) there is no guarantee that the posted code is not already protected. The poster may have copied the code from some corporate source code.

So I would be careful with using the posted code directly.

share|improve this answer
    
That is a good point. I can't count on the honesty of everyone publishing code online. –  Wulfhart Apr 14 '11 at 21:30
add comment

I'm no lawyer, but I would assume that if a user does not specify a license, then it is free for you to use as you wish. Otherwise, there would be no point putting things like copyright statements and licenses since it would already be covered.

However, you would need to check thoroughly that the site doesn't have a copyright or license restriction anywhere - the terms and conditions, the site usage policy, etc.

If you were really concerned, you could contact the owner of the site and/or the poster and ask them for permission to reuse their code.

NB - this is wrong, but after Dean corrected me below, I posted two links that show the right answer.

share|improve this answer
5  
This is not true. The default copyright (at least in the United States and many other western countries) is that all rights are reserved - that is, unless you explicitly waive rights (by applying a license) then you can't do anything without the explicit permission of the author. –  Dean Harding Apr 14 '11 at 21:14
    
@DeanHarding - oh I didn't know that. Just read about it here and here. So copyright statements are kind of like those pointless email footers then? -1 for me. –  Blowski Apr 14 '11 at 21:25
    
Thank you for the links. They cleared a few things up for me. –  Wulfhart Apr 14 '11 at 22:30
    
they're not pointless, since they usually attribute who the copyright belongs to. Without the notice, it might not be obvious :-) –  Dean Harding Apr 14 '11 at 22:50
    
@DeanHarding Yes fair point, hadn't thought of that. –  Blowski Apr 14 '11 at 23:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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