Home > Articles > Programming

Preface to The Software Craftsman: Professionalism, Pragmatism, Pride

In this preface to The Software Craftsman: Professionalism, Pragmatism, Pride, Sandro Mancuso tells the story of how he learned about the concept of software craftsmanship as a young programmer in Brazil.
From the book

Back in the mid-1990s, two years after I started my professional career, a large international company in São Paulo, Brazil, announced that they would be hiring 60 developers in one go. Their selection process would take a few weeks, divided into four phases: a three-hour-long technical test; two weeks of training in their proprietary technology followed by a test; a full day of group dynamics; and a round of final interviews. They announced it in a major newspaper and around 900 developers applied. I was working for a small software house at the time, a place where I was very happy, but I felt that I was ready for something bigger. Since the first phase would be on a Saturday, I decided to apply. Fewer than 300 developers passed to the next phase, and I was one of them. I was happy and confident but worried as well. I had to resign from my current job in order to move forward with the selection process because I would need to take too many days off for the remaining phases. Back then, my financial situation was not great and I could not count on any monetary support from my family. It was quite hard to resign from a job I liked in order to pursue a dream job that I had no idea I would get. Also, I had no idea how I would pay my bills if I didn’t get that new job. But I had to do it. I had to try. That was the type of company I wanted to work for. That’s what I wanted for my career.

I was 21 years old, and although I was young, I already had quite a few years of coding experience—I started coding when I was 11 and started my professional career when I was 19. The problem is that the mix of youth and a bit of experience can easily lead to arrogance. And by no means was I an exception. Think of an arrogant young developer you know. I could beat anyone hands down. I used to think I was awesome, better than any other person who studied with me at university, and better than the vast majority of the developers who worked with me in my previous jobs.

After going through all of the four phases, the international company announced that they could not find 60 developers at the level they were expecting. They hired just 32, and I was one of them. I was over the moon and more cocky than ever. In my first week there, I was placed in one of the teams responsible for delivering one of the business modules of the system. For the first few weeks, while speaking to developers from different business modules, I heard them talking about this other team, a team that was supposedly the best team in the company. They were the “architecture” team, responsible for the core of our system and for providing all infrastructure code used by the business teams.

The architecture team was led by this incredible guy who, besides doing all the management work, was also a fantastic developer. He was a busy man, but he would always find some time to code, check in code against his name, and review the code written by his team. I heard their team was always working on interesting things and that their code was really good. That’s exactly what I was looking for. I wanted to be working with the best.

After a few long weeks, I decided to speak to the manager of the architecture team, this guy that I heard so much about. I didn’t really know what to say or what to expect. I was only certain of one thing: I had nothing to lose. In the worst-case scenario he would say that he was not interested to have me on his team. One day I saw him alone in the coffee area. I was shaking. I approached him and introduced myself. “Hi, I’m Sandro.” He looked at me and shook my hand with a smile. “I’m Namur. Nice to meet you.” He was calm and relaxed. “I want to work for you,” I nervously said after a few awkward seconds. He was a bit surprised but apparently took it in a very positive way. We then started talking about the selection process, why I applied, what I was expecting from the job. He also asked me if I had pet projects, technologies I was interested in, if I wrote code outside working hours, and some other random things that I don’t remember. After around 30 minutes of conversation he asked me when I could start. I was shocked. I was not expecting that at all. I was expecting to schedule a meeting, have a formal interview, and so on. It took me a long time to realize that he spent the entire conversation measuring my passion for software development. He was analyzing whether I cared about doing things right. He was not worried about my current technical knowledge. “I’ll speak to my manager and hopefully it will be as soon as possible,” I said. After a few weeks I was sitting among my new teammates.

My first day was a Monday. In the morning, Namur came to talk to me and assign me a task. He explained one part of the application and what I had to do, and he said he would sit with me again on Friday to check what I had done. I was thrilled. That was my chance to shine. I had to show him why I deserved to be there. I stayed in the office until almost midnight, slept a few hours, arrived very early on Tuesday, and around two o’clock in the afternoon, I was done. I had finished my first assignment in less than half of the time I had been given. I was feeling great. Well, I always knew how good I was, but being able to do that in that team, in a totally unknown code base, was a huge achievement.

I rushed to Namur’s office and with excitement I said, “It’s done. I finished it. And it is working.” He stopped typing and turned to me. “Making things work is the minimum I expect from someone that is paid for it,” he calmly said. “When you say that something is finished, it is implied that it works.” That was like a big slap in my face. My smile faded away a little bit but I thought, maybe it is just his way of saying things. Maybe he is having a bad day. No, he definitely did not mean to be rude. “Sit here and let’s see what you’ve done,” he continued. I sat there and watched him typing in the command line, checking in the code from source control, and opening my single .pas file containing all my code. He opened the file using this horrible black and green editor on the command line. That was the first time I had seen vi. We were using Delphi back then and Delphi was very famous for its amazingly powerful integrated development environment (IDE). For me, seeing someone opening Delphi files on vi (a Unix text editor) was very alien. “Come close so we can have a look at it together,” he said. I had written about 200 lines of code. He positioned the cursor on the first line and started looking at the code line by line. Every five lines he would stop and say things like “Do you know what happens when we allocate and deallocate memory? Can you see here? You are allocating memory in one method and deallocating it in another method. This is a potential risk of memory leak. Have you heard about temporal coupling? Can you see this block of lines here? If you thought a little bit harder, you could reduce these eight lines to two. Do you know what happens when you have a try/catch block this big? What about the names of this variable and method? What do they mean? Have you ever thought that some of your colleagues, when needing to change this code, may not have the same amount of information and context as you have now? How would you feel if you knew nothing about this part of the code but you had to maintain it? What about this hard-coded bit here? Have you ever thought that if we wanted to change where it points to, we would need to open it, change it, recompile it, and redeploy the entire application? Why do you have this piece of code duplicated all over the place? Wow! This is a big method. Do you know how much we would need to keep in our heads if every single method were that big? What about making them smaller and naming them according to their behavior?” He went on and on.

At some point he stopped and started staring at a few lines of code. He spent a few minutes there, occasionally moving the cursor one page up and down again. Back in the 1990s, a developer would be considered a senior developer if she could write code that no one else could understand. “Wow! She must be really good. I have no idea what her code does.” And I made sure to have some cryptic code in there, trying to show how clever I was. At some point he figured out what the code was doing. I was expecting a compliment, at last. “Do you know how disrespectful this is?” he said calmly. “We work on a very large system, with many teams and developers working on the same code base. Can you imagine how hard it would be to understand the code if everyone decided to show off how smart he or she is? Imagine thousands, if not millions of lines written like that.” And that was a second slap in my face.

It was just 200 lines of code, and I could not answer any of his questions or find a good excuse for the points he had raised. Line by line he looked at the code, criticized it, and explained to me how it could be better. Once we reached the end of the file, I was ashamed and extremely annoyed. He was still very calm, as if we had been looking at some random code written by an absent stranger. “Have you understood everything I said? Do you agree with all the suggestions?” Without saying a word, I just nodded. “Do you feel you could write this code in a better way now?” Without looking at him, I just nodded. “Do you feel you can apply the things we discussed as we move forward?” Once again, I just nodded. He then pressed a few keys and deleted the entire file with all my code in it. “Excellent. Since you still have three days left, do it again.”

I was shocked. I didn’t know how to react to that. I stood up and slowly walked to the door without saying a word. “Sandro,” he called me when I reached the door. I stopped and looked back at him. “How it is done is as important as getting it done.” And with this, he turned back to his computer and started typing again in that horrible green editor.

I was frustrated. In fact, I was furious. I left his office, went straight downstairs, and then outside the building. Who the hell does he think he is speaking to me like that? What a bastard. I can’t work for a guy like that. That’s it. I’m done with this company. I’m resigning. After a few cigarettes, feeling a little bit calmer, I started reflecting on what had happened. Namur had spent over one hour going through my code and explaining to me how it could be improved. He listened to me on the few occasions I expressed my view and calmly showed me that either I was wrong or there were better ways. I realized that for the first time since I wrote my first line of code, I had found someone who took the time to show me how to write good code. I had found someone who, besides being far better and more experienced than I was, really cared about helping others become better. I had found someone who cared about producing great, quality software. I had found someone who took the time to teach me. And more than that, I had found my first mentor.

After a few more cigarettes, I pulled myself together and went back inside a different person. That day I learned I was not as good as I thought I was. I learned how to be humble. I learned that I had a lot more to learn. I learned that just getting things done was not enough, especially when you are working in a team. I learned to be respectful to my peers and clients, not leaving crap code behind. I learned that a great professional cares about his or her work.

For two and a half years I worked with my mentor and some of the best developers I have ever met. That experience shaped me not just as a professional, but also as a person. Although we never used the term, I realized more than a decade later that that was my first encounter with Software Craftsmanship. I learned a lot from all those guys. Technically speaking, it was a great experience, but that was not the most important thing. What was really important to learn was the attitude that my boss and all the other developers had toward their career. The last words he said during our first code review session changed me forever. Ten years later, I founded the London Software Craftsmanship Community (LSCC) (http://www.meetup.com/london-software-craftsmanship) and Namur’s words, “How it is done is as important as getting it done,” were some of the first words I put on the website. Later I also had LSCC t-shirts printed with those words on them. Those words did not just make me a better professional but also made me a better person.

About This Book

After decades and many different methodologies, software projects are still failing. Although there are many reasons why they fail, there are a few things that cannot be ignored: managers see software development as a production line; companies do not know how to manage software projects and how to hire good developers; and many developers still behave like unskilled, unmotivated workers, providing very poor service to their employers and clients. With the advent of Agile methodologies, the software industry took a big step forward, but the percentage of failing software projects is still incredibly high. Why are all these projects still failing? Why are we so bad at delivering successful projects? What is missing?

Although the term “Software Craftsmanship” has been around for over a decade, it was not until recently that it emerged as a viable solution for many of the problems faced by the software industry today.

Software Craftsmanship proposes a very different mindset for developers and companies. Although Software Craftsmanship is not a methodology, it strongly recommends the adoption of certain technical practices and disciplines, mostly the ones defined by Extreme Programming. With a great synergy with Agile and Lean principles, Software Craftsmanship promises to take our industry to the next level. Professionalism, technical excellence, and customer satisfaction are the main focus of Software Craftsmanship. One of its main focuses is changing the perceptions that software developers are like workers on a production line and that software projects can be run as if running a factory.

How can we become better developers? How can we deliver better software projects? With real stories and practical advice for developers and companies, this book is relevant to all software developers and every professional directly involved in a software project.

Foreword

In 1973 Roberta Flack sang “Killing Me Softly.” You’ve no doubt heard it in elevators or on your grandmother’s radio station. It’s a soft, lilting ballad about a woman who goes to a concert and hears a young man sing a song that she so strongly identifies with that she exclaims: “I felt he found my letters and read each one aloud. [He was] strumming my pain with his fingers, singing my life with his words.”

The book you are holding feels that way to me. Sandro Mancuso’s career has been very different from mine. He is a bit younger than I. He and I have lived our lives and worked our careers on different continents and in different cultures. We share neither nationality nor ethnicity. I’ve met him only a few times, and each time it was never for more than a few minutes. In short, about the only thing we have in common is that we are both programmers. But that, it seems, is enough.

Within the pages you are holding you will find a fascinating alternation between autobiographical anecdotes that chronicle the author’s vast experience and authoritative recommendations based on those experiences. If you are a programmer, you will feel these stories and recommendations resonate within you. You will say to yourself, as I did, “Been there. Done that.” And you may hear the strains of that song echoing in your mind as he strums your pain.

And strum your pain he will, because this book is about pain. It is about the pain that you and I and, indeed, all programmers experience. It is the pain of feeling constantly constrained to do a poor job. It is the pain of feeling trapped in an un-profession. It is the pain of wanting to do better and not knowing how.

This book also contains the antidote for that pain. Indeed, I believe it contains the cure. You see, this book is all about software professionalism. Not just the professionalism of the programmer; but the professionalism of the whole software organization. This is a book about Software Craftsmanship.

In these pages the author lays out a plan, a strategy, a set of attitudes, and a suite of principles that every programmer, programming team, and software organization can use to haul themselves out of the mire of mediocrity, to make themselves more professional, more productive, and more proud of the work they do.

The scope of this book is incredibly wide. Topics range from design patterns, pair programming, and Test-Driven Development to how to conduct and evaluate interviews, how to respond to tight deadlines, how to write job descriptions, and how to relate to coworkers and managers.

In short, this book is an encyclopedia on the behavior, attributes, and structure of an organization striving to grow in professionalism and adhere to the principles of Software Craftsmanship.

If you are the type of programmer, team lead, or manager who craves to be able to go home after a long day of work, look in the mirror, and say. “Damn, I did a good job today!” then this is the book for you.

—Robert C. Martin
    August, 2014

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