A lot of code comes with comments expressing a programmer's wishes. How do you deal with those wishes if they conflict with your job?
To me it's all about the license. If there are show-stopping conditions put on the code, you shouldn't use it.
A lot of programmers throw things out into the public domain, but sometimes they say things like, "If you use this, you must contribute to a world peace charity." That comes across like a chain-letter to me. Betty-Sue used my code, but didn't contribute to world peace. Two weeks later, she broke her leg in a terrible bicycle accident.
Public domain is public domain, but I try to go by the spirit of what the programmer wanted, even if the legality is dubious.
If it conflicts with your job, then don't use that code. Find another implementation or write the logic yourself.
You don't. If you have a licence to use the code, then you can use it. If the programmers wishes are part of that licence, you are legally obligated to follow them. If not, ignore them at your will.
There is no ethics in law, only law.
A classic example is Vim. If you go to www.vim.org, you'll see the following text:
If you find Vim a useful addition to your life please consider helping needy children in Uganda.
But that's not part of the licence to use Vim. The licence states:
You can use and copy it as much as you like, but you are encouraged to make a donation for needy children in Uganda.
Fine, I've been encouraged but I've been using Vim for over a decade and never once considered helping kids in Uganda (don't get me wrong, I help quite a few causes closer to home, I just find it difficult to donate to huge aid agencies when I see how plush and luxurious their offices are - I'd rather the money go completely to the cause).
So, no, the ethics of the programmer that wrote the code is not my concern. If they want to ensure their causes are taken care of, they should write their stuff into the licence properly like RMS did.