Developer Ethics: Is There a Code of Ethics for Programmers? And if So, What Is It?

As software weaves itself ever deeper into the fabric of our society, the ethical implications of the code we write have never been more profound. From shaping what news billions of people see, to deciding who gets hired or fired, to influencing elections, the programs we create as developers are touching nearly every corner of modern life. With this awesome power comes serious moral responsibility.

But what exactly are the ethical obligations of a programmer? Is there a shared code that the world‘s 26 million software developers should swear by, something akin to the Hippocratic Oath in medicine? The answer, perhaps unsatisfyingly, is not quite – but we‘re getting there. While no single professional code of ethics is universally recognized across software engineering, there is a growing consensus around key ethical principles that are increasingly shaping industry norms and practices.

The Rising Tide of Tech Ethics

Concern over the societal impacts of technology is nothing new – it traces back to the Luddites smashing looms in the early 1800s and the "Neo-Luddite" movement of the 1990s rallying against perceived dehumanization from computers. But in recent years, the ethical dimension of code has burst into mainstream consciousness like never before.

You can trace the inflection point to around 2016. In June of that year, the Brexit referendum shocked the world, and fingers quickly pointed to social media manipulation as a culprit. Then came the 2016 U.S. Presidential election and revelations of Russian interference leveraging platforms like Facebook, Twitter and YouTube. The public was starting to wake up to the reality that code could be weaponized at scale to mislead and even undermine democracy.

But the ethical reckoning was only beginning. The next tremor came in March 2018 with the Cambridge Analytica scandal, which exposed how a political firm had harvested the personal data of millions of Facebook users without consent. Then in May, the GDPR privacy law took effect in the EU, bringing the issue of data rights to the fore. Capping off a watershed year, in December, Article 13/17 (the "meme ban") passed, highlighting the tensions between platform business models and individual creative freedoms.

Since then, the drumbeat of ethical controversies in tech has only quickened:

Each of these issues, and many more, trace their origins to deliberate choices made by software developers, whether they realized the ethical gravity of their decisions or not. The cat is out of the bag – code is political. Every if statement is a value statement.

Common Pillars of Programming Ethics

So with ethics becoming inescapable in software, what‘s a well-meaning developer to do? Long before the techlash of recent years, pioneers in the field sought to lay down ethical guidelines for programmers to follow. As far back as 1947, associations like the Association for Computing Machinery (ACM) aimed to establish professional standards for practitioners.

In 1999, the ACM joined with the IEEE Computer Society to develop the Software Engineering Code of Ethics and Professional Practice. It lays out eight overarching ethical principles for developers:

  1. PUBLIC – Software engineers shall act consistently with the public interest.

  2. CLIENT AND EMPLOYER – Software engineers shall act in a manner that is in the best interests of their client and employer consistent with the public interest.

  3. PRODUCT – Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.

  4. JUDGMENT – Software engineers shall maintain integrity and independence in their professional judgment.

  5. MANAGEMENT – Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.

  6. PROFESSION – Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.

  7. COLLEAGUES – Software engineers shall be fair to and supportive of their colleagues.

  8. SELF – Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.

These pillars provide a high-level ethical framework for the field. They hit on key themes like serving the public good, delivering quality products, dealing honestly with stakeholders, supporting peers, and upholding the integrity of the vocation. But they don‘t prescribe specific actions for specific situations. Those details are left to the judgment of the individual engineer.

More granular ethical codes have been proposed over the years by various parties. For example, in 2018, technology author Oren Etzioni penned a Hippocratic Oath for AI Practitioners that included commandments like "I will never knowingly or purposely cause harm through my work" and "I will help to educate the world about the societal implications of AI systems."

In 2019, data scientists DJ Patil (former U.S. Chief Data Scientist) and Mike Loukides released a Data Science Code of Professional Conduct. Their tenets included "Be open and honest," "Respect privacy and anonymity," and "Engage in and require peer review." That same year, software engineer Umer Mansoor crowdsourced a Computer Programmer‘s Oath with 20 principles like "I shall not write code solely for the purpose of harming others" and "I shall be diligent in my efforts to produce error-free code."

What‘s common across all of these codes is a recognition that the software we write can have momentous real-world impacts, and that as developers we have an ethical obligation to carefully consider the effects our code has on people and society. We can‘t just abdicate responsibility by saying "we‘re just the engineers, we don‘t make the decisions." In a world run by software, we share in the moral burden for outcomes.

Ethics in the CS Curriculum

Despite the growing urgency around tech ethics, most programmers still receive little to no formal training in it. In a 2018 study of over 100 universities, researchers found that only around 50% offered any course in computing ethics. And of those that did, the majority were optional electives, not graduation requirements.

This lack of ethics pedagogy in computer science education has been flagged as a key factor behind the "move fast and break things" mentality that has pervaded the industry. When coders are taught to worship efficiency, ship at all costs, and idolize the 10x engineer, is it any wonder that ethical concerns often go unvoiced?

There are some positive signals that this is starting to change. In 2017, Harvard launched a class called CS 108: Intelligent Systems: Design and Ethical Challenges. Stanford is developing a Surgical Ethics Module in VR. MIT offers Ethics of Technology. And entire academic centers are springing up dedicated to the intersection of ethics and computer science, like the Center for Human-Compatible AI at UC Berkeley.

But overall, the state of ethics instruction in CS programs is still piecemeal. Mandatory coursework in this area needs to become the norm, not the exception. Accreditation boards and academic governing bodies should make ethics part of the core computer science curriculum, examined with the same rigor as data structures and algorithms.

The Integrity Imperative

The reality is, even with more formal ethics training, much of the decision-making programmers face will still come down to individual integrity. No matter how many codes and oaths the industry puts forth, at the end of the day, it‘s up to the developer to be the last line of defense for user rights and the social good.

What does this look like in practice? It means cultivating a mindset of proactive ethics – not just avoiding clear wrongs, but actively seeking to do right. It means having the courage to raise objections when company practices clash with your values. It means being willing to walk away from ethically dubious projects, even if it costs you a paycheck.

This isn‘t always easy. The pressures to conform and collect are strong. But history has shown the price of "just following orders." From the Nuremberg trials to the Challenger disaster, we‘ve seen how abdicating individual moral agency for the supposed greater good leads to ruin. The integrity of a field is only as sturdy as the integrity of its practitioners.

As developers, we are the first step in the ethical supply chain. If we refuse to write code for that manipulative UI dark pattern, it never makes it into the user stories. If we push back on that unreasonable data retention policy, it gets revised. Change happens through a thousand small choices. Ethics is a muscle we all must choose to exercise.

Policy, Power and Programmers

Of course, individual integrity alone is not enough to realign an entire industry‘s moral compass. The ethical void in tech is ultimately a failure of leadership and policy. Self-regulation has proven inadequate to curb the economic incentives for abuse. Stronger external oversight is sorely needed.

On this front, Europe has led the way, with watershed laws like GDPR and the Digital Services Act forcing long overdue reforms in areas like data privacy and content accountability. But even these sweeping regulations are still playing catch-up to the lightning pace of digital innovation. Policymakers worldwide need to get more proactive and technically savvy if there is any hope of reining in Big Tech.

But here too, developers have a critical role to play. We are the domain experts policymakers need to craft smarter tech regulations. We can be the whistleblowers that call out unethical practices before they become entrenched. We can advocate within our companies for business models that don‘t exploit users. We can organize walkouts when management crosses red lines.

Ultimately, the developers building the technologies shaping society should have a voice in the policies governing those technologies. We need more programmers involved in the legislative process, advising governments, running for office themselves. The halls of power could use more technical expertise to tackle the thorny issues of digital governance.

The Stakes Only Get Higher

Looking ahead, the ethical challenges facing developers are poised to intensify by orders of magnitude. Artificial intelligence already poses a minefield of moral quandaries, from job displacement, to autonomous weapons, to the existential risk of superintelligent AI. As techniques like neural lace and brain-computer interfaces inch closer to reality, the merger of mind and machine will force us to redefine the very boundaries of human agency and identity.

These are heady things for a humble coder to grapple with. But grapple we must. The future we build depends on the code we write. In a world increasingly defined by software, programmers are the moral backbone. We are the last guardians. The ethical fate of our species may well hinge on whether we live up to this awesome responsibility.

So while there may be no single, sacred oath developers must swear by, make no mistake – you are bound by a profound ethical imperative. With each keystroke, you are shaping the society of tomorrow. What kind of world will you code? It‘s a question only your conscience can answer. But it‘s one every programmer must ask. The integrity of our industry, and perhaps our civilization, depends on it.