For example, I needed to implement my own pagination system, but I did not know the logic behind a system like that, so I would look up how to do it and then after understading how to do it I would implement my own version without any copy and pasting, do I need to cite the source?

Or another example, I didn't know how to use a foreach for a dictionary so I looked it up on own to do it and then after understading it I implement it without any copy and pasting, do I need to cite the source?

  • 1
    The important thing is not whether you used copy/paste but whether you copied someone else's code in whole or in part. If you look at someone's source code, for example, and type out the same thing, or type out some derivative version of it (e.g. translate it to another language), that is still a derivative work.
    – Brandin
    Apr 25, 2019 at 12:06
  • 2
  • 1
    A note on the word “citing”: copyright only requires attribution (and a license!) when copying creative expression, such as copying a verbatim snippet. In contrast, academic custom requires citations also when benefiting from someone else's ideas. Apsiller's answer discusses the copyright aspect. If you are in an academic context, you should probably still cite the project from which you borrowed the technique.
    – amon
    Apr 26, 2019 at 11:00

1 Answer 1


There are at least two relevant legal considerations here:

  • De minimis use: use so small it does not merit consideration under the law. I am not aware of any case law indicating where copyright draws the line for de minimis use in any jurisdiction, though.

  • The merger doctrine: for an idea that can only be expressed in a very limited set of ways, the expression functionally is the idea, and therefore the expression is ineligible for copyright. In the U.S., this distinction is instrumental to the Abstraction-Filtration-Comparison test, which is used to evaluate claims of copyright infringement between two pieces of software. Wikipedia summarizes the "Abstraction" and "Filtration" steps as follows:

    The purpose of the abstraction step is to identify which aspects of the program constitute its expression and which are the ideas. By what is commonly referred to as the idea/expression dichotomy, copyright law protects an author's expression, but not the idea behind that expression. [...]

    The second step is to remove from consideration aspects of the program which are not legally protectable by copyright. The analysis is done at each level of abstraction identified in the previous step. The court identifies three factors to consider during this step: elements dictated by efficiency, elements dictated by external factors, and elements taken from the public domain.

    The court explains that elements dictated by efficiency are removed from consideration based on the merger doctrine which states that a form of expression that is incidental to the idea can not be protected by copyright. In computer programs, concerns for efficiency may limit the possible ways to achieve a particular function, making a particular expression necessary to achieving the idea. In this case, the expression is not protected by copyright.

    For very simple pieces of code, like using a particular programming language to iterate over the items of a list, this would certainly constitute an "element dictated by efficiency" that would be eliminated from consideration for a claim of copyright infringement. The more complex the code you borrow, however, the less likely you will be to satisfy a court's belief in the code's inseparable idea-expression union.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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