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
  • 4
  • 11
  • 1
    Hi vzwick, while asking people for their war stories might make a good discussion topic, it's not a good fit for the Stack Exchange Q&A format. I've removed those parts of your question so as to focus on the answerable part: how to prevent taking on an unethical project. –  Oct 26 '11 at 12:47
  • 15
    ...so it was you! (*checks email: 69,105 unread emails*) – rlemon Oct 26 '11 at 13:38
  • 1
    May I have an address for this person? I want to fill his house with packing peanuts. – Yatrix Oct 26 '11 at 13:49
  • 3
    Designing the H-bomb is ethical. Using it may not be. –  Oct 26 '11 at 16:16
  • 1
    This question reminds me of [Stanford Experiment](http://en.wikipedia.org/wiki/Stanford_prison_experiment), that basicly explains why people did horrible things when they were commanded to do something that is not moral from their point of view. – ruslik Oct 26 '11 at 15:49
  • 1
    @barrycarter, I have to draw the line at nuclear weaponry. I am a morally ambiguous person compared to most people and am able to sleep at night after doing things that most people would have anxiety over. I don't think I could live with myself if I had designed the H-bomb. – maple_shaft Oct 26 '11 at 17:45
  • @maple_shaft - You have to understand the people that built the H-bomb did not fully grasp what they had done. They were just trying to proof something could be done. We would have eventually built it, science was going to make it possible, and what we learned as opend so many avenues. – Ramhound Oct 28 '11 at 12:10

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
  • 29,980
  • 3
  • 73
  • 114
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,138
  • 9
  • 10
  • 3
    I'll add one more point to this... I deal in finance. Creating a spam mailer for a client is clearly not what I'd want to be doing, but I wouldn't feel the kind of ethical dilemma I would feel if it were a choice between feeding my family and falsifying financial reports for a company. In that case, I would have to leave immediately on ethical grounds. In the case of writing a spam mailer, I would likely choose to finish out the contract, say "lesson learned", and move on. – Dave Markle Oct 26 '11 at 11:34
  • That is a wise point. I'm not sure what I'd do. Fortunately, I've never been asked to write a spam mailer. Is spam illegal? I guess I'm not sure. – Matthew Rodatus Oct 26 '11 at 11:35
  • 4
    Good point, but ethics is a slippery slope. It seems wise to entrench where the ground is firm and not budge even a little. Even if I were to win in court, I would rather not that anyone could even accuse me of unethical practice. – Matthew Rodatus Oct 26 '11 at 12:12
  • 5
    @Matthew: One only has to read history to know you're right. Good people do terrible things by being led along in small steps. – Mike Dunlavey Oct 26 '11 at 13:37
  • 3
    My wife was put in a situation where the place she was working asked her to do something illegal, she just looked at her boss and said "Really?" (She didn't do it). I was job hunting recently and there were a few places that contacted me that based on industry I rejected them out right. I think one was a ForEx site, which is not an industry I would feel right about working in. I personally use as a guideline "Would I feel ok telling my Rabbi about this job?" - YMMV – Zachary K Oct 26 '11 at 14:35
  • I'm surprised you'd go with the Code of Ethics for Professional Engineers over the [Software Engineering Code of Ethics and Professional Practice](https://ethics.acm.org/code-of-ethics/software-engineering-code/). They are actually pretty similar in terms of content, though. – Thomas Owens Oct 28 '11 at 12:37
  • @ThomasOwens: I'm a computer engineer, not a computer scientist. computer engineers are better than computer scientists. – Dave Markle Oct 28 '11 at 15:21
  • @DaveMarkle That makes sense, then. But I'm not a computer scientist either. I'm a software engineer (by title and degree). – Thomas Owens Oct 28 '11 at 15:22
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,401
  • 11
  • 57
  • 131
  • 3
    -1. "Don't submit any code with your name or initials in comments." So you're basically saying that if you do something unethical, you should try to keep it quiet or cover it up. I think we've all seen how that story ends. This also basically means "don't use source control" because every single SCC system out there tracks who made what changes and when. – Dave Markle Oct 26 '11 at 11:17
  • That is an interesting idea about a kill switch. Personally, I would have refused to implement the dubious features and forfeited the contract, even if it ruined me financially. – Matthew Rodatus Oct 26 '11 at 11:20
  • 2
    Like I said -- an interesting idea about the kill switch -- but I disagree about it. If everyone takes the "law" (vaguely defined here) into their own hands, bad things happen. The law should be enforced by the entity authorized to enforce it, i.e. the government. So, I'm downvoting this answer. – Matthew Rodatus Oct 26 '11 at 11:21
  • 1
    @MatthewRodatus That's easier said than done when you're actually facing the situation, have rent to pay, etc … Kudos if you stick by your ethical standards nevertheless! – vzwick Oct 26 '11 at 11:24
  • 1
    @MatthewRodatus Thats a noble choice about forfeiting the contract in light of financial ruin. Nobility won't feed your children though. I would personally rather take my chances pleaing for mercy in court. – maple_shaft Oct 26 '11 at 11:28
  • @vzwick Good point. It is easier said than done. I hope that I would stick by my standards, too. I've had "baby step" tests but no real big ones yet. – Matthew Rodatus Oct 26 '11 at 11:28
  • @maple_shaft Good point. I do need to feed my wife and children, but I would rather beg than risk potential wrongdoing. As God has said, "I will honor those who honor Me" (1 Samuel 2:30). – Matthew Rodatus Oct 26 '11 at 11:34
  • 3
    +1 to counter the downvotes. I sincerely wish that none of us shall ever need to use the options listed in the answer - but it *can* be useful to know them. Sometimes one can only choose between bad and worse choices. It is so easy to condemn others without having walked in their shoes. – Péter Török Oct 26 '11 at 11:57
  • 4
    @Péter "Sometimes one can only choose between bad and worse choices." That is true, and I'm not condemning maple_shaft. I'm just disagreeing with the usefulness of this answer. – Matthew Rodatus Oct 26 '11 at 12:08
  • 2
    @PéterTörök I agree with you completely. It's easy to talk about something and say definitively that you will do / not do something. But when you find yourself in that situation, your actions may (unpleasantly) surprise you. – Christian P Oct 26 '11 at 12:13
  • 4
    All these options will eventually lead into a legal quagmire, with the consequences of having to pay more lawyer's fee to have them sorted out. – rwong Oct 26 '11 at 16:13
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,816
  • 2
  • 57
  • 124
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,775
  • 9
  • 12