Does learning some advanced, non-trivial coding technique from exiting GPL code (or code with viral license in general) turn my own work into a derivative work?
Are there any widely accepted guidelines or criteria to base such a judgment upon?
Rationale
Sometimes a solution can be derived from first principles. Yet most engineering achievements are based on pre-existing knowledge how to do it. When building upon an example of a non-trivial and non-obvious technique, it is inevitable that the new work will resemble the concrete expression of the source example very closely: it will express similar concepts with the same words and terminology (used in variable and function names) and it will combine the same language constructs in essentially the same way as the original. Because the whole point of building upon existing knowledge is not to reinvent the wheel.
Doesn't this mean that picking up concrete practical knowledge (as opposed to principles and general skills) from viral information inevitably turns my own achievements into derivative works and thus "infects" them?
Ramifications
- building upon a solution from Stack Overflow (CC-By-SA). If the solution and the problem is substantial, it is inevitable that your code will closely resemble the original expression of the solution. Wouldn't this render a GPL2+ licensed project, which incorporates GPL2 (only) code, as a whole illegal (since CC-By-SA 4.0 is only one-way compatible with GPL3)?
- from a moral POV, giving credit is prudent -- but doesn't this specific problem here imply that giving credit to the source endangers your own work of being exposed of copyright infringement and breach of license?
Note: I am not interested in the question if viral licenses are good or evil. I am interested in principles, guidelines and criteria how to draw the line of distinction: where does learning end and derivative work start?