ptg30789368 Managing Technical Debt ptg30789368 The SEI Series in Software Engineering Visitinformit.com/sei for a complete list of available publications. The SEI Series in Software Engineering is a collaborative undertaking of the Carnegie Mellon Software Engineering Institute (SEI) and Addison- ptg30789368 Wesley to develop and publish books on software engineering and related topics. The common goal of the SEI and Addison-Wesley is to provide the most current information on these topics in a form that is easily usable by practitioners and students. Titles in the series describe frameworks, tools, methods, and technologies designed to help organizations, teams, and individuals improve their technical or management capabilities. Some books describe processes and practices for developing higher-quality software, acquiring programs for complex systems, system architecture and product-line development. Still others, from the SEI’s CERT Program, describe technologies and practices needed to manage software and network security risk. These and all titles in the series address critical problems in software engineering for which practical solutions are available. Make sure to connect with us! informit.com/socialconnect Managing Technical Debt Reducing Friction in Software Development Philippe Kruchten Robert Nord Ipek Ozkaya ptg30789368 Executive Editor Kim Spenceley The SEI Series in Software Engineering Development Editor Kiran Kumar Panigrahi Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, Managing Editor and the publisher was aware of a trademark claim, the designations have been printed Sandra Schroeder with initial capital letters or in all capitals. No warranty. This Carnegie Mellon University and Software Engineering Institute Senior Project Editor material is furnished on an “as-is” basis. Carnegie Mellon University makes no warranties Lori Lyons of any kind, either expressed or implied, as to any matter including, but not limited to, warranty of fitness for purpose or merchantability, exclusivity, or results obtained from Copy Editor use of the material. Carnegie Mellon University does not make any warranty of any kind Catherine D. Wilson with respect to freedom from patent, trademark, or copyright infringement. Indexer Special permission to reproduce portions of the texts and images was granted by the Ken Johnson Software Engineering Institute. Proofreader CMM, CMMI, Capability Maturity Model, Capability Maturity Modeling, Abigail Manheim Carnegie Mellon, CERT, and CERT Coordination Center are registered in the U.S. Patent and Trademark Office by Carnegie Mellon University. Cover Designer The authors and publisher have taken care in the preparation of this book, but make no Chuti Prasertsith expressed or implied warranty of any kind and assume no responsibility for errors or ptg30789368 omissions. No liability is assumed for incidental or consequential damages in connection Compositor with or arising out of the use of the information or programs contained herein. codeMantra For information about buying this title in bulk quantities, or for special sales opportunities (which may include electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or branding interests), please contact our corporate sales department at [email protected] or (800) 382-3419. For government sales inquiries, please contact [email protected]. For questions about sales outside the U.S., please contact [email protected]. Visit us on the Web: informit.com/aw Library of Congress Control Number: 2019931698 Copyright © 2019 Pearson Education, Inc. All rights reserved. This publication is protected by copyright, and permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system, or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global Rights & Permissions Department, please visit www.pearsoned.com/permissions/. ISBN-13: 978-0-13-564593-2 ISBN-10: 0-13-564593-X 1 19 To Sylvie, Nicolas, Alice, Zoé, Harmonie, Claire, and Henri —PK To Victoria and Richard —RN ptg30789368 To Ibrahim, Zeynep, and Zehra —IO Contents at a Glance Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi About the Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv SEI Figures for Managing Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii Part I: Exploring the Technical Debt Landscape . . . . . . . . . . . . 1 Chapter 1: Friction in Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 ptg30789368 Chapter 2: What Is Technical Debt? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Chapter 3: Moons of Saturn—The Crucial Role of Context . . . . . . . . . . . . . . . 37 Part II: Analyzing Technical Debt . . . . . . . . . . . . . . . . . . . . . . 49 Chapter 4: Recognizing Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Chapter 5: Technical Debt and the Source Code . . . . . . . . . . . . . . . . . . . . . . . . 65 Chapter 6: Technical Debt and Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Chapter 7: Technical Debt and Production . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 Part III: Deciding What Technical Debt to Fix . . . . . . . . . . . 115 Chapter 8: Costing the Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 Chapter 9: Servicing the Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 vi Contents at a Glance vii Part IV: Managing Technical Debt Tactically and Strategically . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Chapter 10: What Causes Technical Debt? . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 Chapter 11: Technical Debt Credit Check . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Chapter 12: Avoiding Unintentional Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179 Chapter 13: Living with Your Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . 195 Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 ptg30789368 This page intentionally left blank ptg30789368 Contents Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix About the Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi About the Contributors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii Acronyms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxv SEI Figures for Managing Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii Part I: Exploring the Technical Debt Landscape . . . . . . . . . . . . 1 Chapter 1: Friction in Software Development . . . . . . . . . . . . . . . . . . . . . . . . 3 ptg30789368 The Promise of Managing Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . 3 Technical Debt A-B-C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Examples of Technical Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Your Own Story About Technical Debt? . . . . . . . . . . . . . . . . . . . . . . . . 11 Who Is This Book For? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Principles of Technical Debt Management . . . . . . . . . . . . . . . . . . . . . . 13 Navigating the Concepts of the Book . . . . . . . . . . . . . . . . . . . . . . . . . . 14 What Can You Do Today? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 For Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Chapter 2: What Is Technical Debt? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Mapping the Territory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 The Technical Debt Landscape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Technical Debt Items: Artifacts, Causes, and Consequences . . . . . . . . 22 Principal and Interest . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Cost and Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Potential Debt versus Actual Debt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 The Technical Debt Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 What Can You Do Today? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 For Further Reading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 ix