The Clean Code Blog

by Robert C. Martin (Uncle Bob)

Prelude to a Profession

27 November 2015

In my previous blog, The Programmer’s Oath, I introduced the concept of an ethical oath for programmers. In this article I want to provide the rationale for this oath. Why do I think the concept of an oath is important?

Many programmers are likely to respond negatively to the idea of an oath. A few year ago I would have been strongly against it as well. An oath implies a surrender of freedom. An oath implies a lack of trust. An oath implies that programmers must have limits. And we, being a traditionally independent breed, don’t like the idea of such constraints. We want to be left alone to do what is right in our own eyes.

And besides, there is no real consensus amongst programmers. We disagree on languages, on editors, on disciplines, on testing, on documentation on process, and much more. How can such an unruly, independent bunch ever find enough common ground to define an oath?

But the social and political landscape has recently changed very dramatically. I now believe that we are on the threshold of a crisis of confidence that, if allowed to proceed unchecked, will profoundly and negatively change our industry. To preserve our freedom of action, our independence, our authority and self direction, there are certain promises we need to make to society at large.

Society knows who we are.

In the 50’s and 60’s society knew very little about us; and we had no impact on daily life. In those days people knew that computers existed; and that there were people called computer programmers; but we were just egg-heads in laboratories and nothing to be concerned about. We were part of that mystical thing called “progress” that everyone just knew was going on.

In the ’70s and ’80s everybody probably knew someone who knew a computer programmer. There were hundreds of thousands of us; perhaps millions. There were college courses in Computer Science. Parents knew enough about us to encourage their children to get into the programming field; but we were still generally irrelevant to daily life.

I remember one commercial for laundry detergent from the era. A husband and wife were shopping when they met a neighbor. The husband was a nerd. Glasses, pocket protector, and calculator, etc. He was using his calculator to compute price per pound. The neighbor talked woman to woman with the wife explaining that price wasn’t everything, blah, blah. The programmer was naive in the ways of “the real world”. He could not stand before the common sense of the neighbor.

By the ’90s computers were showing up in appliances. Programmers were everywhere. Everybody knew one or two. Programmers were part of middle class society. Indeed, they were well enough known to become villains.

The movie Jurassic Park introduced us to the prototypical programmer villain: Denis Nedry.

Programmers were sometimes heroes too. Sandra Bullock played a meek kind of heroine in The Net.

Then came The Matrix.

Then came the DotCom financial crisis. Steve Jobs and Bill Gates were household words. Everybody knew programmers who had made millions. Everybody knew programmers who had lost their shirts. More importantly, everybody knew that computer programmers played a central role in a huge financial boom/bust cycle.

Programmers had become relevant. Society began to recognize us as a necessary constituent.

Do I need to mention the healthcare.gov debacle? That was a software failure that nearly toppled a major public policy change. Programmers have become known to government. Indeed, for a brief moment, government officials considered creating a cabinet position, reporting to the President, to monitor and regulate software.

I was recently in Stockholm visiting Mojang, the makers of Minecraft. After a day of lectures we went for a beer. We sat outside in a pleasant beer garden surrounded by a low fence.

In the midst of our conversation a young American boy, all wide eyed, runs up to the fence, points at Jens Bergensten, and asks: “Are you Jeb?” Jens, and several of the other programmers gave the boy their autographs, and chatted with him a bit. He went away all starry-eyed.

Programmers are now heroes to young children, who aspire to be like them. We have become role models.

But the pinnacle was achieved only a few weeks ago when the CEO of Volkswagen America blamed some programmers for writing the code that allowed certain cars to cheat the EPA emissions standards.

Society now knows that we can be villains, heroes, role models, and scapegoats. Society knows that we play a profound role. Society knows that our errors can cause disasters.

A Crisis of Dependence

And yet, given all of the above, Society still does not truly understand just how much it depends upon us. And we programmers don’t truly understand it either. But consider this: People in our society interact with software every single second of every single day. There are hundreds of millions of lines of code running in the walls of our homes, in our appliances, in our automobiles, in our watches, in our phones, in our smoke alarms, in our burglar alarms, in our garage door openers, and even in our light switches.

Nothing happens in our society unless it is mediated by software. No commercial transaction takes place. No law gets enacted or enforced. No surgery is performed, No drug is created. No plane flies. No car starts. No alarm clock rings. No groceries get bought. No soccer game is played. No telephone rings. The lights don’t turn on. Without software – nothing works.

The depth of our dependence upon software is complete. Our society requires software in order to function; even at the most detailed level. Without software, quite frankly, and quite literally, we all die.

A Profession.

And so, here we are. We rule the world. We write the rules that make the whole world work. Other people think they write the rules; but then they hand those rules to us, and we actually write the rules that make the machines work. We rule the world.

With that great power ought to come great responsibility. And, indeed, society will hold us responsible when our actions result in disaster.

And yet nothing binds us together as a profession. We share no ethics. We share no discipline. We share no standards. We are viewed, by our employers, as laborers. We are tools for others to command and use. We have no profession.

This cannot continue. If we do not form a profession on our own, then society will force it upon us – and define it for us. And that will be good neither for society, nor for us. We must get there first.

Michael O. Church recently wrote a powerful article describing what such a profession might look like, and why it is important. I strongly urge you to consider his words.

He makes the point that a profession is based upon a shared standard of skill and ethics. It is towards that latter point that I have offered The Programmer’s Oath.

Already the discussion about this oath has begun; and I welcome it. We, as an industry should thoroughly discuss and debate our ethics. If my meager attempt at an oath helps to spur that interaction, then it has served its purpose.

But keep in mind that an oath is just the first step at defining an ethics; and an ethics is just the first step in defining a profession. There is much more work to be done.