Originally Posted by knc1
That one is infected with the GPL virus, but a bit of googling should find one that isn't.
Ahh... thanks for the warning. That "GPL virus" would be hard to wash off after it stained your codebase.
When I use other people's ideas in my code, I provide links to where I got the info to prove that I did not get it from a GPL source and I am free to use it. And it is good karma to give user attribution even where not required (such as MIT and BSD licensed code which I study often, though I usually do a complete rewrite from scratch after I understand it, just to fit my condensed style, but I still give credit where credit is due). All the stuff posted here was trivial and original based on reading manuals and lots of experimentation, so little credit given, but my REAL code begins with a list of document IDs and URLs. A lot of my code is based on Thesis and research papers that are not encumbered by patents or GPL, so I like to link to them to "prove" that my code is "legal". I was trained young to write code that I can "defend in court to a jury of non-technical laypersons", and references and rationale for deviating from standards are critical components of that.
Anyway, in summary, it is a good idea to reference other works where you learned your ideas, to give credit to those on whose shoulders you stand, and to avoid the GPL like a plague (if you are a professional programmer such as myself).
GPL is fine for hobbiest programmers who do not want professional programmers (such as myself) to use their source code. GPL tools can be used commercially in certain circumstances. Commercial apps can run GPL console apps hidden in the background, connected via STDIN and STDOUT pipes (difficult if you cannot disable buffered I/O in the called app). Other forms of "linking" GPL and commercial apps are forbidden (including network sockets). To avoid distributing GPL with commercial code, it can be the installer's job to download the GPL portions of the commercial apps (or this can be automated by the installer). The biggest problem for professional programmers is that corporate policy often forbids downloading GPL code, to avoid a GPL infection contaminating their proprietary code base (or even bringing it into question)