Our society demands a commitment to professional behavior; we need an oath for programmers as lives and fortunes depend upon the proper construction and execution of software, argues Robert Martin. According to him, this will have to be enforced by membership in a professional association.
Robert Martin, one of the signatories of the Manifesto for Agile Software Development, suggested that programmers should adopt a code of ethics in obligation of the programmer:
(...) the fact remains that we programmers are in a position of tremendous power that the people whom we serve do not well understand; and that we hardly understand any better.
With great power comes great responsibility. We, as programmers, should recognize that responsibility and determine to be conscientious servants of our society. We should set the limits and standards of our behavior. We programmers, not our employers, not our governments, should decide what it means to accept the responsibility of the power that has been placed in our hands.
In this article, published in November 2014, Martin shared his first ideas for a code of ethics. He suggested several points that should be included:
We will not purposely cause harm
Our software will be well-written for its purpose and lifetime
We behave with Honor and Discipline
The article suggests an oath for programmers based on the obligation from the Order of the Engineer.
Nils Löwe wrote about the responsibility as software developers to build good and reliable software:
During the past decades, we have learned a lot about building good and reliable software. The software crisis showed us our technical limits and as good engineers, we invented processes and methods to master that complexity. Unfortunately, we forgot to look beyond our technical challenges and to recognize our growing responsibility.
We software developers have accumulated a massive amount of influence within a comparatively short time. But we have had only that same short time to face the responsibility evolving from this influence.
In his article Löwe referred to his Manifesto of Responsible Software Development which aims to encourage thoughts and discussions about software developers’ responsibilities.
In November 2015, Robert Martin published the Programmer’s Oath. His oath aims to "defend and preserve the honor of the profession of computer programmers". The oath starts with:
- I will not produce harmful code.
- The code that I produce will always be my best work. I will not knowingly allow code that is defective either in behavior or structure to accumulate.
- I will produce, with each release, a quick, sure, and repeatable proof that every element of the code works as it should.
- (...)
In the article the code that I’m still ashamed of on freeCodeCamp, Bill Sourour tells his story about writing software for an online quiz which recommends a drug. While the website that he worked on was posing to be a general information site about drugs, the requirement from the client was to always propose their drug. At the end of his article he concludes:
As developers, we are often one of the last lines of defense against potentially dangerous and unethical practices.
The more software continues to take over every aspect of our lives, the more important it will be for us to take a stand and ensure that our ethics are ever-present in our code.
Martin will give the opening keynote "The Scribe’s Oath" at Agile Summit Greece 2017. The summit is a one-day conference for developers, team leaders, managers and executives which will be held in Athens on September 22. InfoQ will cover this conference with Q&As, summaries, and articles.
InfoQ interviewed Martin about the need for an oath for programmers, what the oath aims to achieve, and how to enforce it.
InfoQ: Why do we need an oath for programmers?
Robert Martin: Our civilization has come to depend upon software much more than most people, including most programmers, realize. Nowadays, lives and fortunes depend upon the proper construction and execution of software. Whenever lives and fortunes are at stake, our society demands a commitment to professional behavior. An oath is simply a statement of that commitment.
InfoQ: You published the programmer’s oath in 2015. How did people react?
Martin: Many programmers were enthusiastic about it. Others thought it was foolish. I don’t think entire reaction really matters. What matters is what the layman thinks about this -- and by extension what legislators think about it. In the end, it will be the everyday ordinary civilian who will demand the commitment to professional behavior; and will demand that behavior be monitored and enforced.
InfoQ: The oath starts with "I will not produce harmful code". Can you elaborate on this?
Martin: There are two kinds of harm that a software developer can do to their users. The first is the most obvious. The software could fail. It seems perfectly reasonable that we should promise to do our very best to deliver software that does not fail.
The second form of harm that programmers routinely do to their users is to harm the _structure_ of software. Users expect software to be easy to change. It is _soft_ ware after all. Users need their software systems to keep pace with the rapid change in society and technology. It seems perfectly reasonable that we should promise to do our very best to keep software soft.
InfoQ: The oath also suggests that programmers should do everything that they can to keep productivity high. How can they do that while still delivering good quality?
Martin: Ah, that’s a trick question. Keeping quality high _is_ how I we keep productivity high. The idea that quality and productivity are at odds with each other is the great lie that we have told ourselves over the years.
Every programmer has had the experience of being significantly impeded by badly structured and tangled code. That code was "easy" to write, but left the system in a state that slows everyone else down. The slower everyone else goes the more pressure they feel to take shortcuts that leave the system in ever worsening states. And so the whole project slows down inexorably towards zero productivity.
Repeat after me: "The only way to go fast, is to go well."
InfoQ: Is it the right thing to enforce an oath? How can it be done?
Martin: In the end it will likely have to be enforced by membership in some kind of professional association. Employers will only hire members in good standing (possibly by law). Membership can be revoked by egregious violations of the code of conduct of the association.
I know of no current effort to put something like this in place; but I consider it to be inevitable.