I'm interested in this. From what I have read unless you do a 'clean room' rewrite, that is a team reads the code and describes the algorithm to another team with no view of the code, your work can be classified as a derivative work?
Now there are grey areas for sure, but my problem with the GPL is knowledge should be a commons, not a field day for lawyers and a creator of 'thought crimes'. Maybe I have misunderstood that regarding derivative works but it still seems by enforcing obligations GPL doesn't meet my personal definition of free.
This is really only an issue for project where you're trying re-implement a whole piece of software, and not when you pick up some "good ideas" looking at a piece of code. If you're creating a functional clone of some software and suspect that the owners of that software might take legal action against you, then you'll need to make extra sure that no part of your reimplementation resembles the original source code. Hence the whole "clean room" approach.
But if you're just looking at some code and get some ideas and use them in a totally different kind of program, you're definitely not violating the spirit of copyright, and as far as I know no court has ever decided that you're violating the letter of copyright in such a case either.
You mention "algorithm"... algorithms can't be copyrighted, and although it can be argued that they shouldn't even be patentable (as mathematical equations aren't), in the 1990s courts in the US effectively allowed algorithms to be patented "when part of an implementation". Also in some other countries algorithms were always patentable.
But that's patents, we're talking about copyright here. You absolutely can't copyright an algorithm. And "not looking" doesn't protect you from a patent anyway, so go ahead and look at the code unless you want to write a functional clone and claim that it's in no way a derivative work.
Now there are grey areas for sure, but my problem with the GPL is knowledge should be a commons, not a field day for lawyers and a creator of 'thought crimes'. Maybe I have misunderstood that regarding derivative works but it still seems by enforcing obligations GPL doesn't meet my personal definition of free.