Chapter 28. The Ethical Programmer

I might fairly reply to him, “You are mistaken, my friend, if you think that a man who is worth anything ought to spend his time weighing up the prospects of life and death. He has only one thing to consider in performing any action—that is, whether he is acting rightly or wrongly, like a good man or a bad one.”

Socrates, The Apology

I often describe how the quality of a coder depends more on their attitude than their technical prowess. A recent conversation on this subject led me to consider the topic of the ethical programmer.

What does this mean? What does it look like? Do ethics even have an appreciable part to play in the programmer’s life?

It’s impossible to divorce the act of programming from any other part of the coder’s human existence. So, naturally, ethical concerns govern what we, as programmers, do and how we relate to people professionally.

It stands to reason, then, that being an “ethical programmer” is a worthwhile thing; at least as worthwhile as being an ethical person. You’d certainly worry about anyone who aspired to be an unethical programmer.

Many professions have specific ethical codes of conduct. The medical profession has the Hippocratic oath, binding doctors to work for the benefit of their patients, and to not commit harm. Lawyers and engineers have their own professional bodies conferring chartered status, which require members to abide by certain rules of conduct. These ethical codes exist to protect their clients, ...

Get Becoming a Better Programmer now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.