I have some code for an algorithm that is published on Wikipedia.

Can I use that code in a commercial software? Or would this mean that I would introduce a viral license and would have to share my whole code under the Creative Commons Attribution-ShareAlike License?

  • 3
    Is it the code, or the algorithm, that is published on wikipedia? – MadHatter Jul 13 '18 at 8:30
  • 3
    Do you plan to copy the code as is (possibly copying the copyrighted content) or simply use the Wikipedia article as a source of information about the algorithm and reimplement it in your own code base using your own implementation? Algorithms in and of themselves are not generally copyrightable. See Does copyrighted code protect intellectual property rights on novel algorithms it implements? – Brandin Jul 13 '18 at 10:02
  • It's the code, but I ended up reimplementing it again – joz Jul 14 '18 at 10:31
  • 2
    If you copy the code, then you must abide by the license. If you look at the code only to get a description of the algorithm (e.g. how to sort numbers using Quicksort), and then you reimplement that yourself without copying the code, then that is either your own implementation with your own copyright, or it is an implementation devoid of copyright because it contains no copyrightable elements. Some things are not copyrightable because they are statements of fact with no creativity, or because they are only one of very few ways to express some fact. Algorithms often fall into this category. – Brandin Jul 16 '18 at 6:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.