Home > Articles

Do Professional Programmers Need a Code of Conduct? An Interview with Robert C. "Uncle Bob" Martin

Robert Martin just penned the book, The Clean Coder: A Code of Conduct for Professional Programmers. Matt Heusser met with him to ask what professionalism could mean to the next generation of programmers, what exactly he means by the term, and why it is so important now.
Like this article? We recommend

Robert C. "Uncle Bob" Martin is no stranger to being on the cutting edge of software development. A co-author of the Agile Manifesto, his company, Object Mentor Inc., provided the first Extreme Programming training courses called Extreme Programming Immersion. After publishing half a dozen books on software techniques and methods, over the past few years he has shifted his focus to the emergent software craftsmanship and software professionalism movements.

At the same time, Bob belongs to a rare breed; the from-the-ranks programmer who remained technical even after founding and running Object Mentor, a successful consulting company.

In this interview, Matt Heusser talks to Bob about being a programmer, why they need a code of conduct, getting fired, and how to come up with a truthful estimation.

 

Matt: Many people talk about moving "beyond" programming to "bigger and better" things; yet you've chosen to remain technical. Tell us about how and why you made that decision, and what it has meant for you.

Bob: I'm a programmer. I love being a programmer. I want to code till I die. To quote one of my heroes, Isaac Asimov, I want them to find me with my nose stuck between the keys of my computer.

Oh, I've been through the mill. I fell for the lure of management in my late 20s and early 30s. I've run groups and teams. I've even run a company. But it's not my first love. I find it tedious. I'd rather teach, speak, and write code.

Many young programmers will face this dilemma. They will feel that their career will be limited unless they climb the management ladder. Balderdash! Your career is limited only by your passions and abilities, not by whether you go into management. If you want to be a technical superstar, then go for it! Believe me, there's a need and a market for master craftsmen who are very well paid. Don't let anyone force you on a path you don't choose for yourself; and never let your employer decide your career for you.

Matt: Writing a code of conduct implies programmers need a code of conduct, or are somehow lacking one, doesn't it?

Bob: Programmers are sorely lacking a code of conduct. I compare the software industry to medicine in the dark ages. Anybody could claim to be a "healer". Some did good. Others did bad. There were no standards. Few of those "healers" knew of the Hippocratic Oath.

What does it take to be a programmer? Pretty much you can be hired as a programmer if you tell someone you know something about computers. Some companies have higher standards than others; but the ranks of programmers are littered with people who can't write a line of code to save their souls. There are many more who can write code, but we wish they didn't. It's not a good state of affairs. Worse, even the good programmers don't know how to behave. They may be technically skilled, but they don't understand what is expected of a professional. Many feel that their employers are their bosses. Nothing could be further from the truth. Professionals don't have bosses. Professionals are partners with business. They may be employed, but they are not laborers to be managed by foremen. Rather they are experts who know how best to achieve what their employers need. You hire doctors and lawyers, but you don't manage them, you aren't their boss. Imagine trying to boss your doctor as he performs open-heart surgery on you. The concept is absurd. That's the bar I want programmers to reach for. I want them to behave like lawyers, like doctors, like real professionals; not like laborers.

Matt: Do you think it's fair to say that you are actively working to bring programming "up" as a profession—to make it both more respected but also more respectable? If you are, what is your end goal?

Bob: I will be satisfied that we've made some progress when programmers realize that they are experts and not laborers. The first step along that path is to learn how and when to say "no". As a programmer I don't have to meet the deadlines set for me by my employer. I will set my own deadlines. I will inform my employer when my objectives will be met. I will decide the best way to achieve those objectives. I will work with my employer to create a plan that satisfies his needs as well as they can be satisfied; and I will meet that plan. But I will not promise to do something that I don't believe I can achieve.

Matt: It seems to me that at the typical organization, the schedule comes down from on high and is sort of ... inflicted on the technical staff. Do you think your vision of professionalism is "swimming upstream?"

Bob: Not at all. Managers need to know what the truth is. Since they aren't usually technically competent (anymore), they pick a date that's convenient for them and then challenge developers to meet it. They expect a fight. If developers don't give them a fight they assume that the date was reasonable to begin with. If developers do give them a fight then they negotiate until common ground is achieved. If developers cave before they reach a date they believe in, then those developers are responsible for the ultimate failure.

Managers are responsible for schedule and budget; and they will defend them to the max. They expect developers to defend their concerns to the max too. So when developers agree to a date, no matter how tentatively, manager believe they have found the "truth".

Matt: Let's say the programmer wants to be a professional, but is hired into one of these less-enlightened organizations. The big boss hands him the feature list and schedule. Now what?

Bob: Ignore the schedule. Look at the feature list and come up with your own schedule—a schedule you believe in; a schedule you can commit to in good conscience. Better yet, come up with three schedules. An optimistic schedule that's 3 sigma better than the mean. The mean schedule that you think has a 50-50 chance of being right, and a pessimistic schedule that's 3 sigma more than the mean. Remember that 3 sigma is 95% so we're talking about extremes here. Giving estimates in this form is very honest because it tells the managers that you don't know for sure how long it will take, and it gives them the shape of the uncertainty. (See PERT)

Alternatively, walk through the feature list, and tell the big boss what's possible by the requested date. Again, try to describe this in terms of 3 sigma so that managers have an idea of the shape of your uncertainty.

Under no circumstances should you allow a manager to pressure you into saying that you'll "try". There is no trying. If you say you'll "try" you have committed to succeeding.

Matt: We've spent a fair amount of time talking about schedules, but I'm sure there are other aspects to your code of conduct. Can you tell us about the rest of it? If you had to boil it down to bullet points, what would those be?

Bob: If I boil it down to just one bullet point it would be: "Be Honest". That's really what the whole book is about. It's about telling the truth to everyone, all the time; including yourself.

In the book, I break this down in to chapters whose titles are:

  1. Professionalism - The basics of finding and telling the truth.
  2. Saying No. - Sometimes the most honest, most important, and most beneficial thing we can say is: No. It can be hard to hear, and even harder to say, but if you can't say it, you can't call yourself a professional.
  3. Saying Yes. - Our goal is to say yes. We want to say yes. So we need to know how to say yes without saying more than we intended.
  4. Coding - Writing code is hard. If it weren't it wouldn't be so much fun! But since it's our job, we have to do it well and consistently. So how do you keep yourself prepared? How do you deal with writer's block? What do you do if you are late? How can you code after a big fight with your wife? And what is the "Zone”?
  5. TDD - A technical discipline that, for my money, has become a minimum requirement for professional behavior. The chapter does not go into the technical details of the discipline. Other books do that. This chapter is all about the moral and professional aspects of TDD.
  6. Practicing - All professionals practice. They hone their skills through repetitive exercises. How can programmers do the same? Should they?
  7. Acceptance Testing - The professional needs to communicate requirements effectively. One way to do this is by reducing requirements to executable statements called acceptance tests.
  8. Testing Strategies - How can you call yourself a professional if you don't know your code works? How can you get this certainty?
  9. Time Management - What strategies can you employ to be sure you are using your time as well as possible?
  10. Estimation - How can you estimate truthfully? How can you keep your estimates from becoming commitments?
  11. Pressure - The pressure will come. When it does, how do you deal with it?
  12. Collaboration - Professionals do not work alone. What are some of the best ways to work together?
  13. Teams and Projects - How can professionals be arranged into teams that work well together?
  14. Mentoring, Apprenticeship, and Craftsmanship - It is a professional's responsibility to groom more professionals. What is the best approach?

There's something that this list of topics misses. In a very real sense this book is something of a professional autobiography. I tell lots of stories from my own career. Many of those stories aren't pretty; but they are informative. I describe my errors, my debacles, and my disasters. I describes times I lied, and times I failed, and even times I was fired. I describe the school of "hard knocks" that forged my current attitude on professionalism.

Matt: You say you've been fired before—and it was a good thing? Tell us about that. Have you ever walked off a job?

Bob: It's never a good thing to get fired, especially when your wife is pregnant with your first child and the economy is in the midst of the 1975 recession. But it was certainly a learning experience. I made some very stupid mistakes back then. Not in my code, but in my behavior. I wasn't trying to disrespect my job; but I wasn't trying to respect it either. Dates and times simply didn't matter to me. In the end, despite my technical abilities, they couldn't tolerate me. It was an error I tried hard not to repeat!

Yes, as a teenaged programmer I once even walked off a job in a pique of self-righteous indignation. I sure showed them! After that I couldn't find a programming job for 3 months and repaired lawnmowers instead. This is not something I recommend.

Matt: Back to your points of professionalism; how do you estimate truthfully? What should an estimate be 'worth'?

Bob: You estimate truthfully by making sure that everyone understands that the estimate IS an estimate. One way to do that is to include a measure of your own uncertainty with the estimate. e.g. 5 days plus or minus 2. Estimates are never certain. If they were certain we'd call them quotes not estimates. Giving a single date or duration and calling it an estimate is essentially a lie of omission. You have left out the most important part: the uncertainty; the thing that makes it an estimate in the first place.

Matt: I can appreciate that. Can you give us an example of how to draw the line when saying 'yes'? Not only what to say in the face of the pressure, but also how to know where the line is?

Bob: The most important thing about saying "yes" is to distinguish between an estimate and a commitment. An estimate is not a promise. An estimate is a guess, loaded with uncertainty. A commitment is a promise you must not miss. That's where the line is. You only say you'll do something if you know you can do it. Otherwise you provide the best estimate you can, including all the uncertainty with that estimate. For example, consider Programmer Pete, and Manager Mildred.

Mildred: How long will this task take you Pete?
Pete: About three days.
Mildred: Good. That's Friday. That'll be fine.
Pete: I didn't say Friday. I said about three days. It might be Monday, or even Tuesday.
Mildred: I really need it by Friday Pete.
Pete: I'm sorry Mildred, but I can't promise you that.
Mildred: Can't you try?
Pete: I always try. But I still can't make the promise.
Mildred: Well, what can you promise?
Pete: If you need a hard promise, then I can commit to Wednesday.

Notice the difference between the estimate of Friday, and the commitment of Wednesday. Pete thought he could get done by Friday but wasn't sure; so he refused to turn his estimate into a commitment. When asked to commit, he made a promise he knew he could keep.

This is honest, and professional. You draw a hard line between estimates and commitments, and you make sure everyone knows where that line is.

Matt: It seems to me that the majority of your work could apply to a great number of vocations (TDD and clean code aside). Has your work had an impact outside of programming? Should it? If it should, do you have any plans to 'broaden' you work?

Bob: I suppose you are correct about that; but my interest lies with programming and programmers. I have neither plans nor any desire to broaden my work outside of that domain. Others may extrapolate my work to different domains if they desire (some already have); I'll continue to focus on programming.

Matt: Thank you for participating. Where can we go for more?

Bob: My website is cleancoder.com. My blog site is cleancoder.posterous.com. My videos are available at cleancoders.com. My email is unclebob@cleancoder.com.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020