ES
Article02 Nov 202614 min readopinion

Ethics in software development

Ethics in software development isn't about killer robots: it's about what you log, which biases you inherit and which decisions you let slide without asking.

Contents

There’s a chapter in this trade that all of us skip, the same way we skip the documentation: the one on ethics. We know it’s there, we know somebody should read it, and we keep going, because the thing has to ship on Friday. Until one day you catch yourself adding an “innocent feature” that turns out to spy on half the planet, and it suddenly dawns on you that maybe that chapter wasn’t entirely filler, as this roundup of ethical dilemmas in software development reminds us.

The biggest trap in modern software development is that you can do real harm without touching a gun, without seeing a single victim and without getting out of your ergonomic chair. You don’t even need bad intentions: all it takes is following orders, looking the other way and assuming that “somebody must have thought about this already”. That somebody almost never exists.

When your code decides who goes to jail

Let’s start strong: criminal justice. The COMPAS case is the classic that should be tattooed on the forehead of anyone who says “the algorithm decides, not me”. COMPAS is a recidivism risk assessment system used in US courts to recommend whether a person should go free or stay in prison. In 2016, ProPublica analyzed the scores of more than 7,000 people arrested in a Florida county, compared them with what later happened to each one, and found that Black people were almost twice as likely as white people to be wrongly flagged as “high risk”, while white people were systematically underestimated, as its investigation explains.

Translation: the software wasn’t neutral, it was amplifying the prejudices of the justice system. But the best part is picturing the scene:

  • Judge: “It’s not me, it’s what the tool says.”
  • Product: “It’s not us, it’s what the data shows.”
  • Data team: “It’s not us, it’s what was in the historical records.”
  • You, the developer: “It’s not me, I just implemented the scoring rules.”

So, in short, nobody did it. And yet there are people spending more time in prison because somebody shoved a mathematical model into production and everybody pretended karma would handle the ethics QA, something IBM looks at in its overview of algorithmic bias.

Amazon and the misogynist algorithm that only hired dudes

Another of the greatest hits: Amazon’s automated resume screening system. They built a lovely model to evaluate candidates “objectively” and “efficiently”, giving them one to five stars, just like the products in their store, and, after a while, they discovered that the algorithm was systematically penalizing women, another case included in this collection of real-world algorithmic bias.

Why? Because the model was trained on the resumes the company had received over ten years… in an industry where most of them came from men. It learned, like a good student, that “being a man” correlated with “being a good candidate”, and started docking points from resumes that included the word “women’s”, as in “women’s chess club captain”, and from people who came from two all-women’s colleges, as Reuters reported in 2018.

Amazon ended up scrapping the tool. According to Reuters’ sources, its recruiters looked at the recommendations but never relied solely on those scores; the company, for its part, says they never used it to evaluate candidates.

What matters here, from a dev’s point of view, isn’t the morbid thrill of “Amazon did something bad”, but the chain of decisions:

  • Somebody decided the goal was to “replicate historical hiring patterns”.
  • Somebody approved training on that data without stopping to consider that it was biased.
  • Somebody integrated the model into the hiring flow.
  • Somebody in engineering wrote a nice little if so that, if the score fell below X, no human ever saw the resume.

And at every step, there was a developer or a development team with the chance to ask: “Sorry, did we check whether this discriminates?” Usually the question doesn’t get asked because it isn’t part of the definition of “done”. As long as the build passes and the model delivers a top-N of candidates, full speed ahead, just as IBM illustrates with its real-world examples of bias in AI systems.

Google Photos and the racist labels

Another horror classic: in 2015, Google Photos labeled the photos of two Black people as “gorillas”. You didn’t need to be an ethics expert to see that this was going to be a PR catastrophe and a monumental racist insult, one more case from this collection of algorithmic bias in AI.

The response was to remove the “gorilla”, “chimpanzee” and “monkey” labels altogether, as Wired confirmed in 2018. In other words, instead of fixing the model, they banned it from seeing gorillas. But what’s really revealing is the moment before: the day somebody gave the OK to launch that feature. I don’t know how that meeting went, but I imagine the conversation on the team went something like this:

“We tested it on 10,000 photos, it works really well, the false positive rate is low.”

Low for whom? On which dataset? Did anybody ask what happens if the algorithm gets it wrong in categories that touch on race, gender or religion? If that question isn’t on the checklist, it doesn’t get asked. And if it doesn’t get asked, your product can insult users on a massive scale while you stay convinced that “the system learns on its own”. It learns, sure. Whatever you let it learn, as IBM explains in its analysis of algorithmic bias and in its real-world examples of bias in AI systems.

The “harmless” feature that turns your app into a surveillance system

Not everything is about AI. Most ethical decisions in software development are far more boring and, for that very reason, far more dangerous. They look like this: “let’s log every user action so we can improve the product”, “let’s ask for location permissions in case we need them someday” or “let’s sync the contact list to make onboarding smoother”.

None of that sounds bad on its own. You’re not “mistreating anyone”, you’re just “collecting data to improve the experience”. Then that data ends up shared with third parties, re-identified, cross-referenced with another database or used to target political campaigns, and that’s when all hell breaks loose.

By then three teams and two reorgs have come and gone, and nobody remembers who added that tracking_enabled field that’s always set to true, as this academic paper on ethical dilemmas in software engineering and this collection of ethical dilemma cases document.

Once again, the ethical question rarely gets asked: do we really need this? What for, exactly? For how long? What happens if tomorrow this data gets used for something we’d find shady today?

Dark patterns: UX with bad intentions and obedient code

Ethics doesn’t live only in the backend. It also lives in that moment when somebody asks you to hide the cancel subscription button a little, okay?, to make the consent thing accept everything by default and, if people don’t like it, let them fight with the settings, or to make the accept cookies button eye-catching and the reject one pale gray, tiny, preferably text rather than a button.

That has a name: dark patterns. The term was coined in 2010 by British designer Harry Brignull, who has been cataloging and calling them out ever since: interface tricks that get you to do something you didn’t want to do. And yes, they’re usually pushed by product, business or marketing, but they get executed in code. Your divs, your buttons, your onclicks. You’re the one building the maze so the user gets lost and ends up handing over more data, more time or more money than they meant to, a pattern that also fits IBM’s overview of algorithmic bias.

The usual dilemma here goes: “Either I do it or somebody else will, and on top of that I’ll look like the troublemaker.” The classic of every professional ethical dilemma. But the fact that somebody else could do it doesn’t erase the fact that, when you do it, you’re actively helping to twist the user’s will.

Feature flags: engineering or selective extortion

Feature flags are configuration switches your code checks to decide whether or not to turn a feature on. They’re a magnificent tool for rolling out changes in a controlled way, doing canary releases, A/B testing and all those things that sound like serious engineering. But like any tool, they can also be used for evil, as this guide to developing with feature flags, this complete feature flag glossary and this introduction to feature flags explain.

Imagine product asks you:

“Let’s enable this price increase only for the least active users and see if they complain. If they don’t say anything, we’ll make it permanent.”

Or:

“Let’s show this alarmist warning only to users who’ve gone X days without renewing, to push them to pay sooner.”

Technically, it’s a piece of cake: you add one more condition to the flag, turn it on for a segment, track the results. Ethically, you’re practicing opaque behavior-based discrimination, taking advantage of an information asymmetry. The user doesn’t know they’re in an experiment. You do, something that both the feature flag glossary and this feature flag guide make clear when they talk about user segmentation.

The key question is the same as ever: would you do the same thing if this were a brick-and-mortar store, to someone’s face? If the answer is no, be suspicious.

The developer as moral alibi

There’s a line I hear a lot: “I just build what I’m told.” It’s the professional equivalent of “I was just following orders”. It works wonders for sleeping at night… until you stop to think about who, exactly, is best placed to understand the real consequences of a technical decision.

Because I’m sorry, but the product owner can have a very cute spreadsheet, marketing can have a whole lot of narrative and the CEO can look great in the photo.

But you’re the one who sees the system’s ugly truth: you see what gets logged, what gets encrypted and what doesn’t, which fields end up with third parties, which validations get skipped “to move faster”, where the shortcuts nobody documents have been put in, the same idea that runs through this debate on whether programmers need a Hippocratic oath and this roundup of ethical dilemmas in software development.

When the request to “add a feature” that crosses a line reaches you, it rarely comes with a sign that says “ETHICAL HAZARD”. It comes wrapped in words like “optimize the funnel”, “improve retention”, “increase conversion” or “personalize the experience”.

And your job is to turn euphemisms into code. That’s the dangerous part: the distance between the shady idea and the table in the database is the distance you cover.

“Innocent” features with pretty nasty side effects

Some fairly typical examples from real projects:

  • Internal reputation system: A client wants to add internal scores for employees based on KPIs nobody really understands, with a comparison dashboard. In practice, you build a ranking system that amplifies biases, rewards presenteeism and creates constant psychological pressure. Maybe you weren’t designing a Black Mirror episode, but surprise.
  • “Report content” button with no moderation team: The product looks gorgeous in the mockup, but then nobody reviews the reports, or they get reviewed far too late. You’ve created the illusion of safety without the safety. That has a very old name: deception.
  • “Smart suggestions” that prioritize whatever makes money: The idea is to recommend what’s best for the user. The implementation detail is that you prioritize whatever leaves the business the biggest margin. The line between recommendation and manipulation is thin, and you’re the one coding it.

None of these features is “evil” in the abstract. But all of them have a serious social impact: stress, discrimination, disinformation, emotional blackmail. And that impact doesn’t show up in the Jira ticket. It shows up in people’s lives.

Why almost nobody is prepared for this

Part of the problem is structural: almost nobody has been taught anything solid about ethics applied to development. At most, some generic code of conduct or a couple of “big tech has done bad things, don’t be like that” talks, like this video on ethics in software development or this debate on a Hippocratic oath for programmers.

Meanwhile, the incentive ecosystem is crystal clear: shipping fast gets rewarded, stopping to ask whether something is right doesn’t; optimizing business metrics gets valued, minimizing collateral damage doesn’t; and everyone takes for granted that “the legal framework already protects us”, as if the law were a moral oracle and not a minimum bar that usually shows up late, an idea developed in this academic paper on ethical dilemmas in software engineering.

The result: decisions with a heavy ethical load get made in hallways, in ten-minute dailies, in “come on, just put it in like that for now and we’ll improve it later”. Later rarely comes.

What a developer who doesn’t want to be a moral NPC can do

This isn’t about turning every commit into an endless philosophical debate. Nor about playing the martyr. But between “I do nothing” and “I bring down the company for my principles” there’s plenty of useful ground:

  1. Ask the awkward questions early and in writing “What happens to this data a year from now?”, “how do we keep this from discriminating?”, “what abuse scenario are we ignoring?” If the answer is silence, you’ve learned something about your company’s culture.
  2. Document the questionable decisions Not to save your own skin (though it helps), but so there’s a record that there were objections. When the scandal breaks two years from now, the “nobody saw it coming” story will be less believable.
  3. Refuse to do certain specific things You don’t need to become a movie hero to say “I’m not building it that way”. Sometimes it’s enough to set a condition: “I’ll do it if the user is explicitly informed”, “I’ll do it if we anonymize this”, “I’ll do it if it goes through legal/compliance”.
  4. Choose more carefully where you work If at your company every ethical conversation gets shut down with a “you code and quit philosophizing”, maybe the solution isn’t winning the debate, but going somewhere else where you don’t have to justify that people are something more than metrics on a dashboard.

The comfortable thing is to think that software ethics is about big abstract debates: general AI, killer robots, self-driving cars deciding who to run over. That’s very cinematic and good for plenty of conference talks. But the everyday reality of development ethics is about much more prosaic things: what you log, what you cross-reference, what you fake in the interface, what you make easy and what you make hard.

It’s the chapter everyone skips as if it were documentation, sure. Until the bug isn’t a NullPointerException, but someone discriminated against, surveilled or manipulated on a massive scale, courtesy of a product that “just wanted to improve engagement”.

And guess who wrote the code.


Sources and references

Supporting material for digging further into this business of programming without becoming an unwitting accomplice to anything.

Other languages: Español