Looking at licensed code to "learn its tricks" and then writing your code based on that learning experience puts you in a vulnerable legal position. The point
could be made that your work is a "derived work". Lawyers taking apart your code to show where you (consciously or unconsciously) copied from the code you've been looking at and then dragging you to court over it could make your life quite miserable, even if you are being acquitted eventually.
That is why I kept referring to P.J. Plaugher's "The C Standard Library" for the general discussion, but intentionally did
not take his code examples as a starting point for PDCLib, not even for inspiration, because the
code in his book is not licensed for free use. Similarly, I give GNU libc a
wide berth, even when I am stuck and looking for a way out. I do
not want to get entangled in license arguments with the GNU crowd; they're quite organized and vicious about these things.
That's why I cannot recommend consciously copying even a single idea from "looking at Linux kernel code" (except perhaps how to
not do things
), if you're not working under GPL to begin with.
FWIW, I tossed the complete first codebase for PDCLib in the bin when I realized I could not verify that the various contributions I got were "clean", licensing wise. I daresay none of us would have the endurance to go through with a legal action regarding our code bases. We'd probably just fold. That's why I say, "be careful with these licenses". It's much easier to "stay clear" than to clean up retroactively when you no longer even recall where you got a specific idea from.
(While we're on this -- admittedly tangential -- subject, I hope you all have it in writing from your respective employers that they are OK with you working those spare-time projects and won't make any claims on your IP on the basis of you being payed by them for your 9-to-5 work. It
should be self-evident, but some companies / countries have "funny" rules about this, and better be safe than sorry. The laissez-faire attitude can come to a halt abruptly when a legal letter arrives in your mailbox telling you to cease & desist...)