raganwald
(This is a snapshot of my old weblog. New posts and selected republished essays can be found at raganwald.com.)

Friday, January 04, 2008
  What I admire about professions like Engineering and Medicine


In short, their Code of Ethics.

Try this: Employ an Engineer. Ask her to slap together a bridge. The answer will be no. You cannot badger her with talk of how since You Hold The Gold, You Make The Rules. You cannot cajole her with talk of how the department needs to make its numbers, and that means getting construction done by the end of the quarter.

Engineers have a certain line that they will not, cannot cross. Doctors work the same way. I don’t agree with everything in this particular post, but one paragraph resonated with me:

Behave like a doctor whose hospital administrator has just told him that hand-washing is too expensive, and he should stop doing it.
—Robert Martin, Business software is Messy and Ugly

Now, I don’t agree that you should refuse to slap together quick and dirty code that will be hell to maintain when told to do so. Whether that is a good idea or not is a judgment call. I choose to write software as cleanly as I know how within the constraints of my relationship with my client or employer. I choose to evangelize my judgment on the matter strongly.

But I don’t think I have the right to out-and-out refuse to do so when my employer or client insists. They suffer the consequences of software that is difficult to maintain, so they and they alone have the last word on the subject.

I don’t think I have the right to refuse to slap together quick and dirty code when my employer or client insists. However, if I am asked to develop software that is insecure and places private user data at risk, I will make the personal choice of saying no.




The 7 Habits of Highly Effective People is one of the most important books I have ever read. Each of the seven habits has helped me find and travel the path that brings meaning to my life. When I feel lost, I return to my well-thumbed copy and it reconnects me to my values. Very highly recommended.
Where I think the advice fits is where third parties—like users—are the ones who suffer the consequences. Doctors wash their hands because their patients’ health is at risk if they don’t. If a hospital administrator asks for a cover page on the TPS reports, a doctor cannot argue that she will not do it because it is inefficient. If it won’t kill a patient, the doctor must accommodate the administrator’s decision.

In the case of software development, if I am asked to develop software that is insecure and places private user data at risk, I will make the personal choice of saying no.

Of course, I do not have the protection of the law. If I am fired for doing so, I have no recourse. I can’t even collect unemployment benefits, I will be deemed to have been dismissed for cause. Programmers work at will, which means that you must value your ethics very highly if you are to place your livelihood on the line for it.

To emphasize, I have strong opinions about subjects like iterative development and empowering teams. I think that some models of software project management are fundamentally flawed. But those things are matters of judgment. I can be swayed into going against my instincts if the person who bears the consequences of the decision insists on following their judgment instead. My ethics are a different matter.

And in the matter of ethics, I admire professionals who take a stand.

Update: I also admire midwives.
 

Comments on “What I admire about professions like Engineering and Medicine:
Ooh, you need a better logo than that. You should have a contest at worth1000 - for $100 you'll get a half-dozen professional-quality logos.
 
I think engineers will say no to slapping things together because their industry is regulated. And from what I can tell these regulations stem from response to disasters like the Hyatt skywalk collapse, in particular, to avoid those kinds of mistakes again.

Perhaps we need some high profile studies of how much these bad practice actually cost business in real dollars, maybe that'll sway the general thinking.

Though they've been done before have they not? I mean, Peopleware was a fairly exhaustive and scientific in regards to this kind of thing.
 
It's a bit of a specious comparison. The only thing at stake is money, not people's lives.
 
You were hopefully hired for your knowledge and expertise, if you're consistently (not just a one-off) being told to disregard your expertise, you're doing a disservice to your employer anyway.

It's a tentative link, but if you know taking the short-cuts will cost the business serious money, then lives very well might be affected (but probably not ended).

Personally, a bit of give is fine, but if you're always been asked to go against your gut, then in my opinion it's time to go anyway.
 
Hear, hear. While it's a pleasant surprise to hear someone (anyone) talking about ethics in the programming industry, it's depressing and a little frightening that it's so very unusual.
 
Jeff:

When all we're talking about is money, ethics are not involved. I tried to make that point, but perhaps I was not clear about the distinction.

What prompted this essay was this post about Sears:

Sears Exposes Customer Purchase History in Violation of Its Privacy Policy.

This goes above and beyond an employer asking a programmer to do something that will just cost the employer money in the programmer’s opinion. It breaks a covenant the company has made with its customers, implying that the programmer is being asked to participate in dishonesty.

It also violates a third party’s privacy, which is my point: it is not just about the consequences affecting Sears, it is about the consequences spreading to a third party who is not at the table to negotiate for themselves.

I consider that to be an ethical situation, not merely a question of money and ROI.

You may have a different view on being asked to perform a similar task, I cannot dictate ethics to you, just tell you about mine.
 
Hey Reg,

Nice article. Here in BC, Canada you can become a Professional Software Engineer, where it is a professional license giving you a legal right to practice software engineering. Meaning you are legally responsible for the software you design. Yah! Further, one of the code of ethics is: “present clearly to employers and clients the possible consequences if professional decisions or judgments are overruled or disregarded.” My personal favorite :-)

http://www.apeg.bc.ca/

Cheers,

Mitch
http://softwareindustrialization.com
 
@Reg, re Jeff:
> The only thing at stake is
>money, not people's lives.

Nice post Reg!

Jeff just didn't read the whole thing -- he went off all half-cocked like, and missed your point, poor fella.

in practice it's hard (often impossible) to know ahead of time who is at risk from a given shortcut. Shortcuts are inevitable in almost all projects -- and it's rarely possible to have all the information to hand about the ones you're taking. Same goes for doctors and (like me) Engineers.
 
"If a hospital administrator asks for a cover page on the TPS reports, a doctor cannot argue that she will not do it because it is inefficient."

Oh, I don't know about that...
 
Gwenhwyfaer:

You read my mind, I was totally thinking about the relationship between House and Cuddy when I wrote that line.

And also, the highly sensationalized story line with Edward Vogler coms to mind...
 
Just finished Atul Gawande's Better (while his books are ostensibly about medicine, so much of it applies to programming). The first chapter might make you re-think the doctor-washing-his-hands example.
 
Yerfatma:

Can you elaborate? Do you mean hand-washing specifically? The tension between micro- and macro-optimizations? What?
 
I helped a client write some accounting software last year. Their existing system didn't keep transactions or even receipts or even logs. It was just assumed that whatever was in the database right then was what had always been in there and always would be.

The system was written by honest but naive programmers; we coined the term "fundamentally fraud architecture" on that project.

I don't sell software; I sell success. That system was a bomb big enough to destroy his entire business. It would have been much easier money for me to paper over it and walk away. But if you're not selling success you're selling your integrity.

I convinced the client to overhaul the entire accounting system. It took longer than he wanted and cost far more than he wanted to pay, but I regret nothing; I told him what it would cost up front and that his only alternative was to remove the accounting system altogether.
 
In case you don't know this quote:

It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter. (Nathaniel S Borenstein)
 
You do realize that the reason why engineers and doctors refuse to do those things ... is simply legal liability, right?

If software developers got sued for $N million dollars for errors and omissions and/or malpractice, say, when their software had a bug in it ... there would quickly be (1) fewer developers out there and (2) a lot more things that developers would absolutely refuse to do.

I could get an engineer to slap a bridge together, if I Held The Gold ... only if I Held _Enough_ Gold to cover any possible lawsuit damages and still let the engineer turn a reasonable profit. Of course, that's a lot more expensive than most people are willing to pay ...
 
You do realize that the reason why engineers and doctors refuse to do those things ... is simply legal liability, right?

Actually, no I don’t realize that.

The reason it is possible to sue a doctor or engineer for malpractice is because they have a choice in the matter. The two go hand in hand: because Doctors and Engineers are permitted to say no, they carry the responsibility for what happens when they say yes.

The reason you cannot sue a programmer employee for malpractice is precisely because she is not permitted to have an independent code of ethics. She is expected to do as she is told, which in turn relieves her of liability for anything which does not involve knowingly breaking the law.
 
First of all, software engineers do have a code of ethics.

Second, the claim that only the employer could be harmed by bad software is a really weak one. Typically there is a third party who could be harmed, the customer/user. And with the growing reliance our society has on computers, there is a chance that that risk could include injury or death to one of those customers/users.

Third, the reason why doctors and engineers are much more reluctant to do something they know to be dangerous is because their professions require licenses. Should they do something wrong, the state can revoke that license and they lose their job. Thats not the case with software development, so we have less accountability.
 
Nick:

About the ACM code of ethics: go to a programming convention, any convention except the ACM itself. JavaOne. Ruby-something-or-other. .NET whatever.

Ask for a show of hands: how many have heard of it?

As for the whole "Doctors can be sued or lose their license to practise."

Doctors don't have ethics because they are afraid of lawsuits. Most doctors in the world have ethics to begin with, the enforcement is there for the few bad apples that shouldn't be doctors.

I am a programmer. I have professional ethics. I admire Doctors and Engineers for their ethics as a profession. Every doctor and engineer I have met has had their ethics from the inside, from their soul.

I wouldn't trust a doctor whose only reason for treating me well was the fear of the law. Would you knowingly trust your money to a dishonest banker, hoping that the fear of prison would keep him from embezzling your life savings?

We need enforcement, it has a purpose. But we also need a profession that is motivated by its ethics for their own reasons.
 
Ignorance of existing codes of ethics (the IEEE Computer society has one as well) isn't the same as not having one to begin with. And the ACM and IEEE are the two biggest professional organizations in our industry, so I would guess more than a few hands would go up. They may not have them memorized, but they would likely know of their existence.

And yes, I'm sure doctors and engineers (like almost all human beings) have personal ethics, neither I nor anyone else here is disputing that. But in any decision you are forced to weigh the consequences of each action. Often that leads to cases that are far from black and white, in which case their personal ethics may be conflicted. Or in other cases the potential risk may not be that obvious. But the threat for lawsuits or the loss of a license is what pushes doctors and engineers (in areas where licenses are required) to use much more caution than other professions.

Thats not the case with software engineers. We typically do not get sued or get booted from the profession when we screw up. Most of us do have codes of ethics, either professional or personal or both, and that does effect how we work. But without those threats we will never be as cautious as doctors or engineers in other disciplines. Adding yet another professional code of ethics to the list of existing ones won't change anything.
 
First, I'll just set the record straight for some of the comments being made. I'm a Mechanical and Electrical Engineer in addition to being a web developer, and I can tell you that Engineering does not require a license. Running an engineering business requires the owner or one of the supervising employees to have a license. But working for someone does not.

Secondly, engineers don't get sued for faults in their designs, especially if it's due to the employer passing down orders to make a faulty product. Not to mention the vast majority of engineering tasks only directly affect the profitability of the company, not lives, and more times than not, any arguments fall on deaf ears.

But in those cases where engineering decisions do affect lives, I would agree with you that most engineers would follow a code of ethics and either fight it or leave. Not all engineers though... hence Bhopal, the Ford Pinto, the Tacoma Narrows Bridge, etc.

I like the article, though I think it's a bit of a stretch to make such a comparison between doctors and engineers taking lives into their hands, and software engineers. To really make it work, I think you'd have to consider the software engineer whose work also affects lives, for instance one whose been tasked with developing the database that holds patient medical records and allergies. In this case, I think you would find that 99% of software developers would take the ethical route 100% of the time.
 
The Code of Ethics of Professional Engineers Ontario

It appears to me that the ethics of Engineers and of Doctors go far beyond simply not killing people.
 




<< Home
Reg Braithwaite


Recent Writing
Homoiconic Technical Writing / raganwald.posterous.com

Books
What I‘ve Learned From Failure / Kestrels, Quirky Birds, and Hopeless Egocentricity

Share
rewrite_rails / andand / unfold.rb / string_to_proc.rb / dsl_and_let.rb / comprehension.rb / lazy_lists.rb

Beauty
IS-STRICTLY-EQUIVALENT-TO-A / Spaghetti-Western Coding / Golf is a good program spoiled / Programming conventions as signals / Not all functions should be object methods

The Not So Big Software Design / Writing programs for people to read / Why Why Functional Programming Matters Matters / But Y would I want to do a thing like this?

Work
The single most important thing you must do to improve your programming career / The Naïve Approach to Hiring People / No Disrespect / Take control of your interview / Three tips for getting a job through a recruiter / My favourite interview question

Management
Exception Handling in Software Development / What if powerful languages and idioms only work for small teams? / Bricks / Which theory fits the evidence? / Still failing, still learning / What I’ve learned from failure

Notation
The unary ampersand in Ruby / (1..100).inject(&:+) / The challenge of teaching yourself a programming language / The significance of the meta-circular interpreter / Block-Structured Javascript / Haskell, Ruby and Infinity / Closures and Higher-Order Functions

Opinion
Why Apple is more expensive than Amazon / Why we are the biggest obstacles to our own growth / Is software the documentation of business process mistakes? / We have lost control of the apparatus / What I’ve Learned From Sales I, II, III

Whimsey
The Narcissism of Small Code Differences / Billy Martin’s Technique for Managing his Manager / Three stories about The Tao / Programming Language Stories / Why You Need a Degree to Work For BigCo

History
06/04 / 07/04 / 08/04 / 09/04 / 10/04 / 11/04 / 12/04 / 01/05 / 02/05 / 03/05 / 04/05 / 06/05 / 07/05 / 08/05 / 09/05 / 10/05 / 11/05 / 01/06 / 02/06 / 03/06 / 04/06 / 05/06 / 06/06 / 07/06 / 08/06 / 09/06 / 10/06 / 11/06 / 12/06 / 01/07 / 02/07 / 03/07 / 04/07 / 05/07 / 06/07 / 07/07 / 08/07 / 09/07 / 10/07 / 11/07 / 12/07 / 01/08 / 02/08 / 03/08 / 04/08 / 05/08 / 06/08 / 07/08 /