21

Back in my self-employment days, I've once taken on a small and rather well-paid project: "A newsletter system", the spec stated.

Everything was fine, invoices were paid with each milestone reached, me was a happy developer … Until Mr. Client started demanding mail header spoofing and a bunch of other functionality eventually leading me to the conclusion that I was building quite the sophisticated spam mailer.

To make a long story short: Financial considerations made me finish what I had started. I resent having taken on the job in the first place to this day – if I had bothered to google my client's name, I would've been warned.

What strategies can I use to avoid ending up coding stuff I'd rather not see in someone's hands?

vzwick
  • 415

5 Answers5

22

Ethics are quite a bit subjective. Laws aren't. If you can show what you are demanded to do is illegal, you can use that as leverage. IANAL, but I am quite confident that withholding payment to coerce you to do something you think is illegal is really enough to be considered as duress.

As for your specific case: It appears that in Germany sending advertisement mails with misleading header/subject is actually illegal and can lead to a fine of up to 50000 EUR. Based on this you should have denied your client's request.

In general you might want to consider asking a lawyer in such a situation. Actions in our medium are sparsely covered by the law, which also means that the more general rules of conduct must be applied, which (depending on your country and your understanding of ethics) can tend towards what you consider ethical.
And I think most clients will back down if you tell them what they intend to do can be considered forgery (even if it's a whole different question whether it will be) or a similar crime.

back2dos
  • 30,140
18

Warren Buffett was once told that he was an good and ethical man in an interview, and he said something to the effect of, "The world will never know. I've always been well off in my life. I've never had to steal to feed my family or make the choice between my ethics and poverty." (paraphrasing, as I don't have his exact words)

I have had similar experiences. Very luckily for me, I was in a position where I didn't have to do these unethical things. I have had clients who have made decisions that about how they've wanted to run their business that I have disagreed with on ethical grounds, and I've finished out my contracts with them and bid them adieu.

The strategy for avoiding this has nothing to do with programming. Get yourself in a financial position where you can survive well for a number of months with no pay. Save enough money that you're not dependent upon one client's unethical demands to make ends meet. Money is used all of the time by unethical people as a lever to get people to do something that they wouldn't otherwise do.

My limits are what I'm comfortable with. I can't enumerate them all, but it would go something like the Code of Ethics for Professional Engineers.

Dave Markle
  • 1,148
3

Some things to consider if you are financially obligated and already made the mistake of agreeing...

Try disassociating yourself with the project work. Don't submit any code with your name or initials in comments. Remove any public code repositories linked to your email. In the event that legal actions are brought against this person you will still be linked by contract and financial transactions though. Hope and pray that this person does nothing illegal.

On that note, you might want to consider reporting his IP address to a known public honeypot list that tracks such spammers.

Further, if you feel the client could be doing really bad things that might put you in legal jeopardy for aiding and abetting then code in a hidden remote kill switch. Something where you can send a carefully worded HTTP header with the words, Alakazam for instance that will make everything grind to a halt. If what the person is doing is illegal anyway then they can't really win in court over breach of contract.

EDIT: I am not condoning the actions I described, just offering suggestions if you have already made the mistake of associating with this person. I understand the downvotes though.

maple_shaft
  • 26,570
2

You did it for the money and we have to make these decisions all the time. Should I take a high paying job in an industry I don't agree with or help a greener company or non-profit?

I would not feel comfortable creating anything I would be ashamed to tell my friends and family about. It would be an uncomfortable interview discussing what I did with this application. These sound like more self-serving than ethical reasons but I've never claimed to be altruistic.

JeffO
  • 36,956
1

First step is to make sure your contract fully documents what features would be included. If you see questionable features up front, don't take the job. If the client tries to add questionable features later, they are not covered by the current contract, so you can refuse the new contract and client is still obligated to pay for the original contract work (and you obligated to complete it).

If you already have a contract that is too vague, you are in a tough spot. You can either surrender the contract and deal with the legal and financial outcomes or complete the work per contract. YMMV and IANAL, but I believe you don't have much of a legal position to fight from in your current situation. While it may be illegal to send spam in your country, I don't think it would be illegal to build software that could be used to send spam so you can't use the illegality to get out of the contract. Building a gun is not illegal, even though shooting someone with a gun almost always is.

cdkMoose
  • 1,785