Skip to main content
2 of 3
Used the official name of Stack Overflow - see section "Proper Use of the Stack Overflow and Stack Exchange Name" in http://stackoverflow.com/legal/trademark-guidance (the last section).

If you are talking about taking code from Stack Overflow for use in your work, I would be very careful. Even if it is the opinion of the people here that posts to Stack Overflow are covered by Creative Commons, you will need to be able to prove that you got the code from here.

A Short Story To Illustrate:

  • Someone else decides the code is a good solution for a problem they are facing, and decides to copy it into their open source GnuFizzBuzz project, covered by the GPL.
  • Five years from now, someone is doing an open source audit on your code (maybe you are selling to a nervous customer, or your company is going public).
  • The open source audit finds the snippet of code you got from Stack Overflow, and recognizes it as originating in GnuFizzBuzz.
  • You are now stuck explaining how/why you have GPL code mixed into your commercial product, or proving that the code was actually from Stack Overflow. Can you prove that the person posting the code to Stack Overflow owned it to begin with (maybe they actually copied it from GnuFizzBuzz to begin wih).

It may sound unlikely, but I have seen this exact situation with my own eyes. The safe thing to do is to regard any code snippets you find as explanations of how something could work. Read, understand, and write a solution based on your understanding. Don't ever cut/paste code you found on the Internet if you are working on a commercial product.

user133907
  • 599
  • 3
  • 2