I'm a software engineer in a consultancy company. I've worked there for several years and until last November, I worked in the main offices on internal, deep learning-based projects.

My company then sent me to work as a consultant for a client, and my mission has nothing to do with deep learning anymore. However, my company sometimes calls me for coming back temporarily and work on deep learning projects that they recently came up with.

They've called me to come back a couple of times since I'm at the client's offices and I'm sometimes very uncomfortable with what they're asking me to develop. Most of the time they want me to design solutions that would fulfill purposes that I personally find unethical (for instance, targeted advertisement in stores based on body appearance. Although it's legally authorized, I think it's dishonest because people know they're under video surveillance but they don't know that their data is processed for commercial purposes).

Could I be blamed for refusing to work on the projects that I think are unethical? Should I tell management why I'd rather not work on those?

Additional info:

  • I should add that I'm the most skilled in feature recognition in my company (and the only one who's skilled in artificial intelligence). They don't have much choice but to ask me.
  • My contract only says "software engineer". I'm not required by it to work on a particular field or with whatever language. It's a permanent contract.
  • I'm however engaged to work for the client until at least the end of the year, and could actually use the fact that I'm too busy there to find the time to do those projects.
  • I'm working in the French offices of an international corporation.
  • Also, please note that I'm not looking for opinions on whether such projects are indeed unethical.
  • 22
    Related, from the other side: How can I respond to an employee who objects to working on certain projects on ethical grounds?
    – rath
    Commented Feb 15, 2019 at 15:42
  • 1
    @avazula Do you have a contract that requires you (or your employer) to continue working there for a particular duration - and if so, how long; and under what conditions can you break it?
    – Joe
    Commented Feb 15, 2019 at 15:48
  • You should, shouldn't you? If you can't answer this question yourself it belongs on Philosophy.SE. (and otherwise it belongs on Law.SE) Should your boss fire you because you're unable to use data from the real world due to personal ethical restraint? IMO yes. If you're not willing to be "racist" then you'll never be, e,g., a very good murderer profiler. - There's a difference between stereotypes and racism: using 'types' when inappropriate is racist. At all other times they produce the data we need to make money.
    – Mazura
    Commented Feb 15, 2019 at 17:44
  • @CharlesE.Grant Even that link suggests that morals are the personal opinion side of the coin. The OP has stated that the actions are legal and he is objecting to them on a personal basis.
    – Peter M
    Commented Feb 15, 2019 at 18:04
  • 2
    I don't understand how ethics can basically be the only tag on an SE question outside of Philosophy.SE. This needs a country tag, and a law tag, and be question of legality. Any other discussion forces a question of morals, which is out of scope. Because this is not "unclear how acceptable a given course of action might be within society" (from the ethics tag description). But if I'm mistaken and feeling the waters is an acceptable question here, then carry on.
    – Mazura
    Commented Feb 15, 2019 at 23:57

8 Answers 8


I will add a personal experience because it's a good example of how to do this right.

A few years ago, I was a manager at a consultant company that works with my nation's government. We do a lot of software, management consulting, research, and so on.

I had an employee that was precisely in your situation; we had asked this person to participate on a project that was perfectly legal but they were personally opposed to because of their morals. Not that it matters much for this discussion but it was a military application, and this person is a pacifist.

They came to me and laid out their concerns, and were clearly very nervous about having to tell me that they weren't willing to work on a project with military applications, especially since that's a non-trivial part of our business.

I thanked them for their candor, and told them I'd find them something else to work on. My boss felt that this wasn't a tenable position and would seriously limit this person's career in the company long-term. I held firm and the boss let me retain the person.

It's now several years later, this person is still with the company and is one of our top researchers in their field. They still don't work on military applications, but provide a tremendous amount of value to company and our government.

I share this with you because there were a couple key points here:

  1. The person was willing to lose their job over their ethical choice.
  2. The person was clear with their management (me) about what the concern was, and what their ethical boundaries were.
  3. The person was willing to throw all their passion into the next projects (that didn't violate their ethics and really show their worth.
  4. The person happened to have a first line manager that was willing to stand up for them to seniors.

I think that as others have said, the key is to be up front and honest, but also be clear on what exactly the concern is and where your boundaries are. If you approach it from the perspective of an honest discussion, you'll be more likely to have success.

I would also point out that this all presupposes that you're not ethically opposed to working for a company that makes money doing something you're ethically opposed to doing yourself. Something to keep in mind.

  • 19
    Completely agree, but do feel for OP's case that "I won't build weapons of war" is a much more sympathetic position than "I won't build algorithms for custom-targeted clothing advertisements."
    – Affe
    Commented Feb 15, 2019 at 18:08
  • 62
    @Affe I think given the impact advertising has on eating disorders, it's quite valid. Targeted advertising using machine learning that messes with a person's psychology only to make money is IMO less ethical than building weapons of war. War is sometimes necessary and/or unavoidable (in my personal opinion); making money by manipulating a (potentially unstable) person's insecurities with surgical precision is not. There are other ways to make money. I'm glad to see a deep learning specialist considering these ethical implications, for once.
    – Ella
    Commented Feb 15, 2019 at 19:00
  • 5
    @Ella you don't have to convince me, I completely agree and wouldn't want to work on such a project either, (especially since we all know how it progresses from manipulating how you shop to manipulating how you vote...) but I'm not a senior manager of an international corporation and the two realities are probably correlated ;)
    – Affe
    Commented Feb 15, 2019 at 19:04
  • 15
    Last paragraph's a big deal. Most people who do military contracting have to wrestle with this issue at some point. I know, intellectually that someone has to design my country's smart bombs, but that doesn't mean I want to be looking back at my life in the retirement home one day and have that be something I had lavished a large part of my limited time and talents on this earth helping out with. Classmates in college refused to work for contractors at all, but still pay the tax $ that finance them. In a way we're all hypocritical, but either you draw a line somewhere, or you don't.
    – T.E.D.
    Commented Feb 15, 2019 at 19:26
  • 2
    @Affe I think "custom-targeted clothing advertisement" oversimplifies the ethical implications, which is it's a system for effectively judging someone's physical appearance and then producing adverts based on that judgement. It's insulting no matter how you approach it: fat person - offer more food (implied: get fatter!) or offer a diet (implied: lose weight fatty!); short person - offer instep shoes (implied: get taller shorty!) etc. It has disturbing implications. What next - basing it on skin colour? Hour-glass female figure? Commented Feb 17, 2019 at 0:01

Sure, you can refuse to work on any given project for any given reason, you're not a slave; but then your employer's response likely will be to let you go. (You don't mention any details of location or contract; it's possible these have some relevance, but you'd need to edit those in.)

If you're asking how to do so without being fired, I'd suggest you have a conversation with your boss about it. If you're one of their top employees, it's very well possible that your boss may be willing to hear your side of this, and take some action; much of this depends on how you approach it, and how your boss feels about retaining you. Assuming you're free to leave (and don't have a contract requiring you to stay particularly long), you have significant leverage here if you're one of the top performing employees in the company.

Just make sure to approach your boss in a positive, constructive way. "I think the work you're doing is unethical and refuse to do it" isn't going to get you very far.

Hi [boss], I wanted to talk to you about some of the work you're having me do. I love working here, and love the challenge of deep learning, but I don't like the idea of working on [xyz], because the subject is not something I'm morally comfortable with. Is there any way we could find a middle ground here that would allow me to keep working here, which I love, and not have to work on projects that aren't in concert with my morals?

The key is to not make it sound like your boss is unethical, but that it's a problem of yours that you want an accommodation with; and make it clear you want to work with them to find a solution.

They might say 'no', in which case you have a choice of finding another job or keep working on it; but it's worth a shot, if you're able to do it in a positive, constructive way.

  • 45
    It's good advice to at least consider having a conversation with management. I had an employee years ago at a consulting firm who objected to armed conflict. He told us he would be motivated to leave our firm if he had to work on contracts that involved the military. We kept him on, but did not assign him to DoD jobs.
    – dwizum
    Commented Feb 15, 2019 at 15:50
  • What are options are there if their contract does require them to do work they object to? Like, "leaving the country and getting a new identity" is technically an option, but anything else? Commented Feb 15, 2019 at 23:42
  • 2
    @PyRulez I'd leave that answer for the lawyers. I'm not one, and I imagine contracts have all sorts of different language - most would have some way for them to unilaterally cancel the contract, I imagine (perhaps by paying a penalty or something else), but it really it depends on the location and the contract
    – Joe
    Commented Feb 15, 2019 at 23:43
  • Definitely a good idea to talk to the boss first before burning the client with the adjective unethical... Commented Feb 15, 2019 at 23:51
  • What I'm about to suggest is much more risky but may be worth it depending on a variety of factors (e.g. the OP's confidence with their employability, how passionate about this topic the OP is, how valuable the contract is to the company, what arguments could be marshaled). Instead of the OP getting themselves out of directly supporting this, they could make a case that the company should turn down this contract. If the OP has qualms with this, likely many others would as well. This could impact the company's reputation making future contracts or hires more difficult and decrease morale. Commented Feb 17, 2019 at 10:27

Yes, you can refuse to work on projects you consider unethical. But if you do, they might fire you and replace you with someone who doesn't.

When the task you were supposed to perform was covered by your job description and was not strictly illegal, then you might have a difficult time to sue for wrongful dismissal. But I am not a lawyer and I am not familiar with the employment law of your location either, so you should not trust me on this. Ask an employment lawyer for details.

  • 2
    If you have a solid moral compass then being fired for refusing to perform unethical work should not be a problem.
    – NotMe
    Commented Feb 15, 2019 at 15:42
  • 10
    @NotMe A solid moral compass also includes taking care of one's family, so getting fired could be a real problem. Commented Feb 15, 2019 at 16:04
  • 16
    @DavidThornley - While I agree with this in general, there should be a limit to it. My dad went through a few tough times while I was growing up, and I think in a way it was to my benefit to see that. You can do worse in your life as an example to your kids than to show them that losing a job isn't the end of the world, and sometimes you have to take a stand, even if it hurts you personally. Its not something you should do on a whim, but its not something you should let yourself be terrorized out of doing either.
    – T.E.D.
    Commented Feb 15, 2019 at 19:34

You would be better off finding a company that aligns with your ethics. If you attempt to take a stand here, you probably won't be fired outright for it, but you may not get assignments, at best.

At worst, they'll attempt a constructive firing.

Very few people would consider what you're speaking about as unethical, and while you asked we not cover that point, it is very relevant to your situation.

If you take a stand on your ethics over this one, you could get the reputation in the industry as being "difficult" or worse. If this were a stand that more people could see as a principled stand, my answer would be different, but as it stands, the fact that many, possibly most people won't see this as an ethical stand could create problems for you.

In the future, direct yourself away from companies that might have principles and ethics that do not align with yours. You cannot, however, start dealing with a company, then decide that some projects are against your ethics, then try to pull out of those specific projects unless you want to risk damaging not only your job security, but your career as well.

  • 12
    I think your statement "very few people would consider ... unethical" to be an exaggeration at best; I think a reasonable number of people would consider using video that's purportedly for loss prevention (or at least assumedly so) to market to people based on body size unethical, particularly the body size element specifically - probably more so than object to the tracking itself. mediapost.com/publications/article/263968/… - 52% of people are uncomfortable with beacons, and those are much less personal than this.
    – Joe
    Commented Feb 15, 2019 at 17:45
  • @Joe one article isn't really evidence, and the greater point, is of course, not that one thruway line, but the fact that one's career could be damaged by taking a stand. And your article isn't from a programmer's perspective, but from a consumer perspective. Commented Feb 15, 2019 at 20:54
  • 1
    Even if it is illegal, a company willing to do illegal things won’t balk at an illegal firing. And a shrewd enough manager can always manufacture a legal reason to claim if it went to court.
    – WGroleau
    Commented Feb 16, 2019 at 4:40
  • @WGroleau This is why employee handbooks are so massive. A company can always reach into their policies and find fifty violations you've committed with little effort. I have a friend with MS. He wasn't fired from his job for MS, THAT would be ILLEGAL. No, they found policy violations. Nothing to do with MS, nope, nothing to see here. end sarcasm mode Commented Feb 16, 2019 at 13:06

Be Preemptive...

I've been a consulting electrical and computer engineer for over 20 years and before working for anybody I make sure they know I took an oath called "The Order of the Engineer" which promises I'll quit my job before putting the public at risk. For me, this means I can't and won't work for the "defense" industry. I've found that people in non defense companies tend to be inspired and impressed by my commitment. You don't have to have an oath, but if you can describe your ethics in your Resume or cover letter or simply say you have a commitment to ethics from the beginning, you'll not only get better projects, you'll get more respect.


Tell your employer that you have some concerns about the ethics of the project. It is possible that they haven't considered this fully and will change the scope of the project once they realise the ethical implications.

You could do this gently by appending it to your technical discussion. e.g. "This looks good but I'd suggest changes x,y,z. By the way, have you considered the ethical implications? This is very exciting software but it looks like it would be unethical if implemented in its current form."

Your employer may ignore you but this would be a coherent way to open a dialogue if you think you may have to withdraw support for the project.


I think some of the blowback you're getting on your position boils down to this:

What does it mean to be unethical?

You asked in the question that we not address whether the given topic is, in fact, unethical, and I can (and will) respect that.

But ethical issues in general are on a spectrum. For me I can break that spectrum up into three roughly discrete buckets: things I have no issue with, things that make me uneasy, and things I consider downright wrong.

Personally, I will do things I'm uneasy with at work. Doing things you wouldn't otherwise be doing is part of what they pay us for.

I've for instance written software that I knew was insecure (with CYA emails liberally sent back and forth). I really don't like doing that. It offends my professional sensibilities, and makes me a little morally queasy. But sometimes it's necessary to meet the business requirements, and the best you can do is equip the people making those decisions with an understanding of the ramifications and trust that they're making them correctly.

But I would not, just to give one example, write software that mined bitcoin in JavaScript on a honeypot click-baity website. That crosses a line with me.

The point of all of this is, you're treating this in a binary fashion. And maybe in this case the specific task in question really does cross that line for you, and if so that's fine. The other answers have covered ways to approach this and possible outcomes. But kindly consider when deciding to draw your line in the sand (not just for this particular issue) whether it's something that is really beyond the pale, or if it's just something that makes you uncomfortable and may not be the Rubicon for you being in a state of total moral decay.


Of course you can refuse to work on a project you feel is unethical and if you do so, you should tell them why. Why explain your reasons? So, they stop coming to you for ethically dubious projects.

HOWEVER, be aware that, at a minimum, it means they would be using your skills less and someone else's more. This could lead to severing their relationship with you.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .