I have a tendency to overthink things. Even when writing a paper in school I wondered when I needed to add a citation, as technically people are born knowing nothing and must have learned any fact from somewhere. For example should I cite who claimed Obama is the current president of the US? Should I cite where I got the speed of light from?
This over thinking still haunts me when it comes to code without a license (or a restrictive license) found on the internet. Where is the line drawn between
- studying example code and applying what you learned
- violating copyright
For example if I see some code with a license saying it can't be reproduced, and it has a method called
is_prime(int x) and has a
for loop checking odd numbers up with the square root, would I be breaking copyright if I wrote a similar method? What if I copied and pasted? What if I changed the names? (E.g. maybe is_prime is a better name for the method than check_if_prime.) The point is some ideas are so simple they can't really be changed, yet still complex you probably won't create it by yourself yet.
If a person is implementing a linked list, they probably have seen example code for it somewhere. Is this not violating copyright as they just aren't looking at the code while they implement their own?