views:

354

answers:

5

This question was originally posted with a similar title to this but was changed as the subject was not a moral issue.

However it was a good topic for a wiki question.

There are times when you are asked to implement features which you are not comfortable with, perhaps some mass emailing program, or something which access data on a PC which is not really its to access. I would put these as morally objectionable. However there is a line when this becomes also illegal, INAL so I won't give examples.

Is it a developers’ job to know the law enough to call on these? Is it right to say no to a request on the basis of it being illegal? Can you and should you get legal advice if you are not sure? Who is liable for the effects of code you right?

Their are a lot of questions there, but in short how do you handle situations where you think that code you are asked to write may be on the wrong side of the law?

edit:

Are developers really responsable for what their code does? This seems like making a machine operator at smith and western responsible for what any guns he produces do.

+7  A: 

In my country a programmer is responsible for the code he writes. If our boss asks us to perform something illegal it is our obligation to say no.

Nobody can force you to make a crime.

Sergio
This is the same in the US. There are situations where a company can be held liable for the crimes of the employees, but that requires a pretty good paper trail. For the most part you can be held personally responsible for what you do.
Chris Lively
and without a good paper trail, you will be held personally responsible for what you do.
Austin Salonen
Unless you're an executive, of course. Who from Sony is serving hard time for the rootkit affair? However, the world is what it is, and the worker bees have to look out for themselves.
David Thornley
So "just following orders", is not an excuse for a coder. I suppose we go with DNS' answer if your company says that it isn't illegal
Jeremy French
Jeremy French: I once was in that position. My boss asked me to do something I though it was illegal (log personal information without user consent), I talked with my boss and he assured me it was legal, so i did it but cleaned all the records that could indicate that I did that (just in case).
Sergio
What country you are in?
User
SO sucks: Portugal
Sergio
+7  A: 

You really need to talk to a lawyer first in such a situation. There is no other option or advice worth considering. For simple questions, lawyers won't charge thousands, and getting real advice is worth it, if you really think it might be a crime.

DNS
Should you or your company get the lawyer?
Jeremy French
Well I suppose both the company and you would NEED the attorney, but since the company is asking you, and you want to be protected, don't worry about what the company is going to do, just get the help you need.
Look. If you want legal protection, pay the lawyer. That way, you're the client and the lawyer has responsibilities towards you. Never trust a lawyer paid by somebody you don't trust.
David Thornley
David - I wish I could upvote comments.
Erik Forbes
+1  A: 

simple question:

but in short how do you handle situations where you think that code you are asked to write may be on the wrong side of the law?

simple answer: don't do it.

No one (in the US anyway) can force you to do something against your will. Which means that if you perform an illegal/immoral activity, you're responsible...here's a good starting point via wikipedia: http://en.wikipedia.org/wiki/Causation_(law)

There's legal liability and moral responsibility...the more important aspect is moral - you can only sell your soul once

meade
isn't it a little more complicated. If you write code that could do something illegal, but may also have legitimate uses. Say you write something that will mass mail from the database sould you make sure that it can only mail those with opt in, or is that the responsibility of the operator.
Jeremy French
same response. If you make guns easy enough to use by children - you may not intend for children to use them, but you provided the means. The level of potential damage should determine the level of safe guards put into place.
meade
+1  A: 

Simple answer: Go talk to a lawyer if you're not sure what the laws are where you live. Asking legal advice on a web site that isn't a "get your free legal advice here from real attorneys you can verify through the Bar Association in the jurisdiction in which you live" is just being foolish.

If someone here tells you, "No, do whatever your boss says. You're not legally liable or responsible." and you listen, and then end up being sued or worse, you're not going to feel really good about the choice to ask here, are you?

Laws are specific to a jurisdiction. What you might be held liable for in San Diego, CA could be totally different in New York, NY, and most likely will be vastly different than Paris, France or Berlin, Germany. However, the person whose advice you decided to follow might be basing it on the laws where they live, or what they read somewhere and believed, or simply talking out of their backsides. Do you really want to trust your wallet (or your physical freedom) on that?

Ask programming questions on programming sites. Address questions about that funny feeling in your chest or the lump on the side of your neck to your physician. And direct legal questions to an attorney licensed in the area that has jurisdiction.

Ken White
+1  A: 

The answerers here seem a bit idealistic. Not everyone can afford to go to a lawyer, and not doing something doesn’t really put you in good stead with your employer, especially if they think it is legal. So just refusing to do it could result in you begin fired.

Personally I think a good first step is to talk to the people requesting the work, explain that it may not be legal and ask them to check it. I would imagine that companies have easier access to lawyers than most developers.

Now if your company is not willing to take legal advice then you may have to go it alone, but this could still make life difficult for you at work.

I should imagine some shady companies, would object to you asking or even raising the issue as that makes their own deniability more difficult.

Jeremy French