4 ms·
Generally, you would want to do one of: a) Keep any code that you've pulled in from another project in its own directory structure with a license file indicati
by robmccoll 1y ago
Generally, you would want to do one of:
a) Keep any code that you've pulled in from another project in its own directory structure with a license file indicating where it came from and its licensing terms.
b) If you intend to modify the code or integrate it more tightly with your own, copy the notice into each source file that was taken and perhaps put a pre-amble along the lines of "Portions of this file were copied from XXX under the MIT license as follows:". Ideally you would make a commit with the file in its initial state as copied, and then if you ever need to determine what came from where and how it was licensed, it shouldn't be too difficult.
- palata 1y agoGenerally, what I take from this discussion is that what you want to do is get as much inspiration as you want from the code, but absolutely rewrite it from scratch such that it is yours and yours only.
- saagarjha 1y agoThat would still be infringement.
- palata 1y agoAbsolutely not. How would it be infringement to write your own code from scratch?
- saagarjha 1y agoIf you read someone else's code and copy it down, then you are infringing on it. There's a reason why https://en.wikipedia.org/wiki/Clean-room_design https://en.wikipedia.org/wiki/Clean-room_design exists.
- palata 1y agoWhere did I say that you copy it? I used the words "you rewrite it from scratch", not "you copy it".
- saagarjha 1y agoThat's a copy. Read the Wikipedia article I linked and it explains what people do to demonstrate they're not infringing.
- palata 1y agoBecause people spend a lot of time making sure that they can prove that they did not infringe copyright does not prove anything here. It just says that some people put a lot of effort into making sure that they could easily prove that they didn't infringe copyright.