Here is something I personally never really figured out:
When does derivative code cease to be derivative?
Several times I have taken code written by other people and put it through so many cycles of refactoring that, even though each of the intermediate steps is clearly derivative from the previous one, the result bears no resemblance to the original whatsoever. Is it still derivative? The original code served as a springboard, and for that certainly continues to deserve credit. But both the computational expression of the problem in question and the understanding that led to that particular expression is entirely my own. The credit I owe in that case seems like the credit a successful pupil might owe to a teacher: the work is still the pupil’s. I learned from the code – by scrapping it piecemeal, in a gradual process of transformation, in which the result feels like mine.
Who has copyright on that work?
When does imitation end and inspiration begin?