Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Software that we write has ramifications in the real world. If not, it wouldn't be very useful. Thus, it has the potential to sweep across the world faster than a deadly manmade virus or to affect society every bit as much as genetic manipulation. Maybe we can't see how right now, but in the future our code will have ever-greater potential for harm or good. Of course, there's the issue of hacking. That's clearly a crime. Or is it that clear? Isn't hacking acceptable for our government in the event of national security? What about for other governments? Cases of life-and-death emergency? Tracking down deadbeat parents? Screening the genetic profile of job candidates?

Where is the line drawn? Who decides?

Do programmers have responsibility for how their code is used? What if a programmer writes code to pry into confidential information or copy-protected material? Does he bear responsibility along with the person who used the program? What about a programmer who knowingly or unknowingly writes code to "fix the books?" Should he be liable?

share|improve this question
5  
I really like the words hack and hacker in their non-criminal uses; preserving that is a losing battle it seems. For some ethical guidelines see the ACM code of ethics: acm.org/about/code-of-ethics –  kasterma Dec 31 '10 at 17:15
    
add comment

7 Answers

up vote 10 down vote accepted

As we are discussing ethics, there is a split to be made between legality and straight morality, the two do not necessarily sit on the same page.

Legally speaking, your culpability for the result of what you create varies by region, but most fault lies with the user. If the product is intrinsically illegal then the programmer may be culpable. In the US for instance, development of encryption circumvention software is illegal in and of itself.

Morality has far greater scope. Whether or not what you develop should be developed is a matter for the conscience of the individual. Some people are happy to say to themselves, "if I did not make this, someone else would", or "the use of this is nothing to do with me" - well, if a person can do that and sleep, then that's that. If not, then they should not. Companies can and often will fire an employee if they refuse to do assigned tasks, if the task is not illegal in itself then the employee really does not have a leg to stand on, unless it could count as a discrimination issue in jurisdictions that support it.

Personally, I think morality is critically important and have actively refused tasks from directors where I think they are morally wrong, though that does mean betting your employment against their wider need for you and causes trouble in any event.

Always try to remember, that without your own self respect, you have nothing at all.

share|improve this answer
    
+1 for the split between legality and morality. –  Brandon Tilley Feb 9 '11 at 2:40
1  
@BinaryMuse: It alarms me how regularly people believe them to be one and the same. Granted, that would be an ideal state of affairs, but the law is rarely ideal. –  Orbling Feb 9 '11 at 2:45
add comment

In the early 2000s, I worked for a company that had contracts to produce weapons components for the Israeli military (can't go into more distinct details than that without giving away too many clues as to who the company was).

Anyway, that was my first taste of serious ethical questions as a programmer:

  1. Do I want to be producing stuff that quite directly kills people?

  2. If these fights are being ordered against terrorists by a democratic country, is it really that bad?

  3. What difference does it really make? If I don't write this code, someone else will.

Then just last year, I had an interview for a job with a major US (Australian branch) defence contractor. Again, for a job which would most likely involve working on stuff which controls weapons systems.

.....

I never actually DID work on projects which were directly involved with building weapons systems. A big part of me is glad that I didn't. Because I just know that every time I turn on the TV and some story came up on the news where there are blood-covered children screaming (in Gaza, Afghanistan, Iraq, etc), I'd be agonising over the idea that "it is my code that helped do this!", and I'd have nightmares about it.

Now just to be clear, this is totally politically neutral: I'd have this same ethical problem if I had to contract for an Iranian, Pakistani, Egyptian, Chinese, or any other military interest. It's just that pure humane interest which disturbs me. My politics are quite middle of the way and neutral.

I don't know if I could ever work on software which directly "does harm"- however well justified. I just hope I'm never forced (by lack of other opportunities, etc) to consider such jobs again......

share|improve this answer
2  
+1 for a frank discussion about a position many programmers have been in. –  Macneil Dec 31 '10 at 15:31
2  
+1 For very good points, and particularly for giving a damn. –  Orbling Dec 31 '10 at 15:57
add comment

You might want to take a look at the ACM's "Code of Ethics" which gives 8 general "moral imperatives" as well as additional professional responsibilities.

share|improve this answer
    
Thank you that was very useful. –  ahmed Jan 1 '11 at 13:37
add comment

IMHO, technology is neutral. People who use it (end users, if you wish) decide how it will be used, and for what, and they're the ones who face the consequences for all their actions.

As the old saying goes "Guns don't kill people. People kill people." alt text

share|improve this answer
1  
It's not guns that kill people, it's the bullet holes. –  Lennart Regebro Dec 31 '10 at 13:47
11  
I've never agreed with that statement. I would agree for kitchen knives or a chainsaw or something. But hand guns really have no purpose other than causing injury or death, the lack of an alternate use means that is what they are for, what they do, so they do kill people. –  Orbling Dec 31 '10 at 13:50
1  
@Orbling - make allowances for conciseness. There are multiple reasons to kill someone, some (in the right circumstances) justified. "Guns don't kill people in a moment of anger or in the course of committing some other crime" lacks a certain something. Also, the threat in itself can sometimes be what's needed to save a life, so pedantically guns can have another attention-getting purpose. I'm not for a US-style policy on guns at all, but the there are rational arguments on both sides. –  Steve314 Dec 31 '10 at 14:11
1  
@Steve314 : Thing is, you can extend this argument further to atom bombs. But I wouldn't call that a neutral technology... –  Joris Meys Dec 31 '10 at 14:30
1  
@Orbling - I'm not sure that the use of stampeding animals as a weapon adds much to the - oh, hang on, I think I'm being over-literal about the horse thing. –  Steve314 Dec 31 '10 at 15:00
show 5 more comments

In the light of the "guns don't kill people" argument, I draw the line with the original purpose of the coding. Almost everything can be abused (you can kill somebody with a pencil if you try hard enough). Yet, if the intent of the code is good, that shouldn't stop you from writing it. If the intent of the code is to harm somebody, it doesn't matter any more who it will harm. I wouldn't be able to do it, as harming will be the only use for it and sure as hell that won't only be used by Old Shatterhand and Superman.

Nobel invented dynamite for mining purposes and in the process changed the face of war. But sure as hell he also saved quite a miner's life, avoiding accidents with nitroglycerine. So is that moral? I guess so, even when he was described as "le marchand de la mort" in a french paper.

share|improve this answer
    
+1 Many of those involved with nuclear research regretted their work, scientists discovers things, engineers build them, and very many people find uses for them. I think it is time to stop for scientists and engineers if the foreseeable use is very bleak. –  Orbling Dec 31 '10 at 15:59
add comment

I don't think there is a difference between being an ethical programmer and an ethical person. Hence the attributes of an ethical programmer are the same as for anyone else.

Then we can discuss each of your examples, but they are really all the same as any ethical conundrum. You need to ignore the complexities of real life and look at only the ethical question posed out of context. And that can be enlightening, but ultimately it's an intellectual pursuit with little contact to reality.

share|improve this answer
add comment

This may be somewhat anecdotal, but still useful.

I was taught "The Mum test" at university, during a software development practice module.

If you'd be ashamed to tell your Mother that you'd do something. Don't do it.

share|improve this answer
    
A lot of students fail that test so very regularly. –  Orbling Feb 9 '11 at 2:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.