Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 2
    I very much doubt many snippets are in the public domain. Commented Jul 23, 2011 at 16:24
  • 3
    I'm late to the party, but it's also important to note that even if Tim Post retained all rights to the code above, he cannot copyright the idea. If you learn from that snippet that you can print a string five times by using a for loop, and then you write your own (remarkably similar) for loop using those ideas, then you are fine regardless; it doesn't matter what Tim wants. Depending on how long it is, and how similar your version is, you might have a burden of proving that you did actually re-implement it, but if you can do that, you are guaranteed in the clear. Commented Dec 20, 2015 at 23:15
  • 4
    @Huperniketes - "the way [ideas] are expressed can [be copyright] and are; and under current IP law, a creator's work is automatically copyrighted and protected" -- as long as the expression of those ideas reaches a level of originality and inventiveness that is regarded as a minimum threshold of creativity to warrant protection and the amount of copying is not considered trivial. If the expression is not sufficiently distinctive or the amount of copying is considered trivial, this is called de minimis copying and is not covered by copyright. This has been found to courts to extend to ... Commented Jul 22, 2018 at 11:59
  • 4
    ... computer programs in the situation where they are obvious minimal programs that perform a particular operation (and where the operation itself is not innovative). E.g. several cases of this are discussed here. In the context of the question, those 3 lines referenced are almost certainly in that category: entirely functional rather than creative in nature, and almost certainly performing a common operation that is found in many pieces of software. In this case, they are probably not protected. Commented Jul 22, 2018 at 12:00
  • 2
    (technically this isn't actually "fair use", which is a specific statutory exemption from restrictions that a copyright holder is entitled to enforce, but is instead based on common law case precedents that have accumulated over time, and has the effect of preventing copyright from being recognised at all over such uses, but the term "fair use" is often used in a way that includes such uses, and there is in reality substantial overlap between the two.) Commented Jul 22, 2018 at 12:10