Affordability Outcomes Academic Freedom! That's why providing you with a wide range of options that lower costs and drive better outcomes is our highest priority. Mc connect Students-study more efficiently,retain more and achieve better outcomes.Instructors- focus on what you love-teaching. They'll thank you for it. Study in Comect help your students be better preparec s time rou can transform your 回 definitions to dynamic eers about the benefits o www.mne on.com/highered/connect/smartbool Make it simple,make it affordable. II Canvas,and to let you organize your course in one convenient location. ive your ray of sk your afforda olutions Learning for everyone. McGraw-Hill works directly with Accessibility Services Departments and faculty to meet the learning needs of all students.Please contact your Accessibility Services office and ask them to email accessibility@mheducation.com,or visit www.mheducation.com/about/accessibility.html for more information. Learn more at:www.mheducation.com/realvalue Rent It Go Digital Get Print Affordable print and digital renta A full and flexible rangeof Students who purchase digital opuons through our partherships naterlals can get a loos eaf print with lea ing textbook distributors on at a significantly reduced
Affordability & Outcomes = Academic Freedom! You deserve choice, flexibility and control. You know what’s best for your students and selecting the course materials that will help them succeed should be in your hands. That’s why providing you with a wide range of options that lower costs and drive better outcomes is our highest priority. They’ll thank you for it. Study resources in Connect help your students be better prepared in less time. You can transform your class time from dull definitions to dynamic discussion. Hear from your peers about the benefits of Connect at www.mheducation.com/highered/connect/smartbook Students—study more efficiently, retain more and achieve better outcomes. Instructors— focus on what you love—teaching. Rent It Affordable print and digital rental options through our partnerships with leading textbook distributors including Amazon, Barnes & Noble, Chegg, Follett, and more. Go Digital A full and flexible range of affordable digital solutions ranging from Connect, ALEKS, inclusive access, mobile apps, OER and more. Get Print Students who purchase digital materials can get a loose-leaf print version at a significantly reduced rate to meet their individual preferences and budget. Learn more at: www.mheducation.com/realvalue Make it simple, make it affordable. Connect makes it easy with seamless integration using any of the major Learning Management Systems— Blackboard®, Canvas, and D2L, among others—to let you organize your course in one convenient location. Give your students access to digital materials at a discount with our inclusive access program. Ask your McGraw-Hill representative for more information. Learning for everyone. McGraw-Hill works directly with Accessibility Services Departments and faculty to meet the learning needs of all students. Please contact your Accessibility Services office and ask them to email accessibility@mheducation.com, or visit www.mheducation.com/about/accessibility.html for more information. Laptop: McGraw-Hill Education
CHAPTER SOFTWARE AND SOFTWARE ENGINEERING As he finished showing me the latest build of one of the world's most popular first-person shooter video games,the young developer laughed. "You're not a gamer,are you?"he asked. I smiled."How'd you guess?" The young man wa s dre sed in shorts and a tee shirt.His leg bounced up and at seemed to be commonplace among his co-workers. CONCEPTS estions about framework activities .10 software engineering. general principles. definition.3 legacy software. .8 layers.9 principles practice. . em solving. ella activities. definition 5 nature of. QUICK LOOK What is it?Computer software is a work prod people who build computer software to adapt uct that software professionals build and ther their approach in a manner that best suits their sunport over many vears These work prod. needs. ucts include programs that execute within What are the steps?You build computer soft computers of any size and architecture Soft. ware like you build any successful product,by ware engineering encompasses a process,a applying an agile,adaptable process that collection of methods(practice),and an array eads to a high-quality result that meets the of tools that allow professionals to build high needs of the people who will use the product. quality computer software. What is the work product?From the software Who does it?Software engineers build and engineer's point of view,the work product is support software,and virtually everyone in the set of programs,content(data),and other the industrialized world uses it.Software work products that support computer soft engineers apply the software engineering ware But from user's point of view,the proces is a tool or Why is it important?Software engineering is 0 es important because it enables us to build com- Ho wdo l ensuret atI'vedo eit right?Rea plex systems in a timely manner and with high quality.It imposes disc that cal applicable to ecome quite chaotic,but it also allows the apply them to you that you
1 What is it? Computer software is a work product that software professionals build and then support over many years. These work products include programs that execute within computers of any size and architecture. Software engineering encompasses a process, a collection of methods (practice), and an array of tools that allow professionals to build highquality computer software. Who does it? Software engineers build and support software, and virtually everyone in the industrialized world uses it. Software engineers apply the software engineering process. Why is it important? Software engineering is important because it enables us to build complex systems in a timely manner and with high quality. It imposes discipline to work that can become quite chaotic, but it also allows the people who build computer software to adapt their approach in a manner that best suits their needs. What are the steps? You build computer software like you build any successful product, by applying an agile, adaptable process that leads to a high-quality result that meets the needs of the people who will use the product. What is the work product? From the software engineer’s point of view, the work product is the set of programs, content (data), and other work products that support computer software. But from the user’s point of view, the work product is a tool or product that somehow makes the user’s world better. How do I ensure that I’ve done it right? Read the remainder of this book, select those ideas that are applicable to the software that you build, and apply them to your work. Qu i c k L o o k CHAPTER 1 As he finished showing me the latest build of one of the world’s most popular first-person shooter video games, the young developer laughed. “You’re not a gamer, are you?” he asked. I smiled. “How’d you guess?” The young man was dressed in shorts and a tee shirt. His leg bounced up and down like a piston, burning the nervous energy that seemed to be commonplace among his co-workers. Software and Software Engineering application domains . . . . . . . . . . . . . . . . . . . . . 7 failure curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 framework activities . . . . . . . . . . . . . . . . . . . . . 10 general principles. 14 legacy software . . . . . . . . . . . . . . . . . . . . . . . . . 8 principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 problem solving . . . . . . . . . . . . . . . . . . . . . . . . . 12 SafeHome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 software, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 nature of . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 questions about . . . . . . . . . . . . . . . . . . . . . . 4 software engineering, definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 layers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 practice . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 umbrella activities . . . . . . . . . . . . . . . . . . . . . . . 11 wear . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Ke y C o n c e p t s
2 CHAPTER I SOFTWARE AND SOFTWARE ENGINEERING "Because if you were,"he said."you'd be a lot more excited.You've gotten a peek at our next generation product and that's something that our customers would kill for no pun intended" We sat in a development area at one of the most successful game developers on years ns of the game he demoed sold over copies d generate s of doll sin revenue So.when will this version be on the market?"I asked. He shrugged."In about five months,and we've still got a lot of work to do." He had responsibility for game play and artificial intelligence functionality in an application that encompassed more than three million lines of code. "Do you guys use any software engineering techniques?"I asked,half-expecting that he'd laugh and shake his head. He ed and thought for a moment.Then he slowly nodded."We adapt them to our needs,but sure,we use them. "Where?I asked.probing. "Our problem is often translating the requirements the creatives give us." "The creatives?I interrupted. requirements that allow us to build the And after the requirements are established? He shrugged."We have to extend and adapt the architecture of the previous version of the game and create a new product.We have to create code from the requirements. test the code with daily builds,and do lots of things that your book recommends." "You know my book?"I was honestly surprised. -Sure sed it in school.There's a lot the "I've talk to some of your buddies s here,and they're more skeptical about the stuff in my book He frowned."Look,we're not an IT department or an aerospace company,so we have to customize what you advocate.But the bottom line is the same-we need to produce a high-quality product,and the only way we can accomplish that in a repeat- able fashion is to adapt t our own subset of software engineering techniques." And how will your subset ch d as if to po nge years He onder the fu will bec ome bigger and more e.And our development timelines will shrink as more competition emerges.Slowly,the games themselves will force us to apply a bit more development discipline.If we don't,we're dead." Computer software continues to be the single most important technology on the world stage.And it's also a prime example the law of unin nded consequences.Si years ago no one could have predicted that software would become an indispensable technology for business,science,and engineering;that software would enable the creation of new technologies (e.g.,genetic engineering and nanotechnology),the extension of existing technologies(e.g.,telecommunications),and the radical change in older technologies (e.g.,the media);that software would be the driving force behind the personal computer revolution:that software applications would be e purchased by
2 CHAPTER 1 SOFTWARE AND SOFTWARE ENGINEERING “Because if you were,” he said, “you’d be a lot more excited. You’ve gotten a peek at our next generation product and that’s something that our customers would kill for . . . no pun intended.” We sat in a development area at one of the most successful game developers on the planet. Over the years, earlier generations of the game he demoed sold over 50 million copies and generated billions of dollars in revenue. “So, when will this version be on the market?” I asked. He shrugged. “In about five months, and we’ve still got a lot of work to do.” He had responsibility for game play and artificial intelligence functionality in an application that encompassed more than three million lines of code. “Do you guys use any software engineering techniques?” I asked, half-expecting that he’d laugh and shake his head. He paused and thought for a moment. Then he slowly nodded. “We adapt them to our needs, but sure, we use them.” “Where?” I asked, probing. “Our problem is often translating the requirements the creatives give us.” “The creatives?” I interrupted. “You know, the guys who design the story, the characters, all the stuff that make the game a hit. We have to take what they give us and produce a set of technical requirements that allow us to build the game.” “And after the requirements are established?” He shrugged. “We have to extend and adapt the architecture of the previous version of the game and create a new product. We have to create code from the requirements, test the code with daily builds, and do lots of things that your book recommends.” “You know my book?” I was honestly surprised. “Sure, used it in school. There’s a lot there.” “I’ve talked to some of your buddies here, and they’re more skeptical about the stuff in my book.” He frowned. “Look, we’re not an IT department or an aerospace company, so we have to customize what you advocate. But the bottom line is the same—we need to produce a high-quality product, and the only way we can accomplish that in a repeatable fashion is to adapt our own subset of software engineering techniques.” “And how will your subset change as the years pass?” He paused as if to ponder the future. “Games will become bigger and more complex, that’s for sure. And our development timelines will shrink as more competition emerges. Slowly, the games themselves will force us to apply a bit more development discipline. If we don’t, we’re dead.” ***** Computer software continues to be the single most important technology on the world stage. And it’s also a prime example of the law of unintended consequences. Sixty years ago no one could have predicted that software would become an indispensable technology for business, science, and engineering; that software would enable the creation of new technologies (e.g., genetic engineering and nanotechnology), the extension of existing technologies (e.g., telecommunications), and the radical change in older technologies (e.g., the media); that software would be the driving force behind the personal computer revolution; that software applications would be purchased by
CHAPTER L SOFTWARE AND SOFTWARE ENGINEERING consumers using their mobile devices:that software would slowly evolve from a prod- uct to a service as"on-demand"software companies deliver just-in-time functionality a web br ser:that a softwa ould be com r and m e influe up-aInIos E1即e than all evolve and change everything from library research to consumer shopping to political discourse to the dating habits of young (and not so young)adults As software's importance has grown.the software community has continually attempted to develop technologies that will make it easier,faster,and less expensive to build and suppor high-quality compuer programs.Some of these targeted ata specific applicatio omain (e. website design and implementa others focus on a tech nology dom n (e.g.object-oriente a systems or aspect- programming):and still others are broad based (e.g.operating systems such as Linux). However,we have yet to develop a software technology that does it all,and the likeli- hood of one arising in the future is small.And yet,people bet their jobs,their com- forts,their safety.their entertainment,their decisions,and their very lives on computer software.It better be right. This book ework that be used by those who build compute softwar who must get framework encompa sses a process,a se To build software that is ready to meet the challenges of the twenty-first century. you must recognize a few simple realities: .Software has become deeply embedded in virtually every aspect of our lives.The number of ple who ha an in rest in the feature s ar nd f tions e m h grown dra cally .The information demanded by individuals,businesse and gov ernme nts erow in reasing complex with each teams of people now create computer programs.Sophis assi software that was once implemented in a predictable,self-contained computing environment is now embedded inside everything from consumer electronics to medical devices to autonomous vehicles.Design has become a pivotal activity. .Individuals,businesses,and governments increasingly rely on software for strategic and tactical decision making as well as day-to-day operations and control.If the software fails,people and major enterprises can experience anything from minor inconvenience to catastrophic consequences.Software should exhibit high quality As the perceived value of a specific application grows,the likelihood is that its user base and longevity will also grow.As its user base and time in use increase,demands for adaptation and enhancement will also grow.Software should be maintainable. These simple realities lead to one conclusion:Software in all its forms and acros all its application domains should be engineered.And that leads us to the topic of this book-software engineering. We will call these people"stakeholders"later in this book
CHAPTER 1 SOFTWARE AND SOFTWARE ENGINEERING 3 consumers using their mobile devices; that software would slowly evolve from a product to a service as “on-demand” software companies deliver just-in-time functionality via a Web browser; that a software company would become larger and more influential than all industrial-era companies; or that a vast software-driven network would evolve and change everything from library research to consumer shopping to political discourse to the dating habits of young (and not so young) adults. As software’s importance has grown, the software community has continually attempted to develop technologies that will make it easier, faster, and less expensive to build and support high-quality computer programs. Some of these technologies are targeted at a specific application domain (e.g., website design and implementation); others focus on a technology domain (e.g., object-oriented systems or aspect-oriented programming); and still others are broad based (e.g., operating systems such as Linux). However, we have yet to develop a software technology that does it all, and the likelihood of one arising in the future is small. And yet, people bet their jobs, their comforts, their safety, their entertainment, their decisions, and their very lives on computer software. It better be right. This book presents a framework that can be used by those who build computer software—people who must get it right. The framework encompasses a process, a set of methods, and an array of tools that we call software engineering. To build software that is ready to meet the challenges of the twenty-first century, you must recognize a few simple realities: ∙ Software has become deeply embedded in virtually every aspect of our lives. The number of people who have an interest in the features and functions provided by a specific application1 has grown dramatically. A concerted effort should be made to understand the problem before a software solution is developed. ∙ The information technology requirements demanded by individuals, businesses, and governments grow increasingly complex with each passing year. Large teams of people now create computer programs. Sophisticated software that was once implemented in a predictable, self-contained computing environment is now embedded inside everything from consumer electronics to medical devices to autonomous vehicles. Design has become a pivotal activity. ∙ Individuals, businesses, and governments increasingly rely on software for strategic and tactical decision making as well as day-to-day operations and control. If the software fails, people and major enterprises can experience anything from minor inconvenience to catastrophic consequences. Software should exhibit high quality. ∙ As the perceived value of a specific application grows, the likelihood is that its user base and longevity will also grow. As its user base and time in use increase, demands for adaptation and enhancement will also grow. Software should be maintainable. These simple realities lead to one conclusion: Software in all its forms and across all its application domains should be engineered. And that leads us to the topic of this book—software engineering. 1 We will call these people “stakeholders” later in this book
4 CHAPTER I SOFTWARE AND SOFTWARE ENGINEERING 1.1 THE NATURE OF SOFTWARE Today,software takes on a dual role.It is a product,and the vehicle for delivering a ware m e hr roadly,by omputers that are acce hardware.Whether it resides within a mobile device,on the desktop.in the cloud.or within a mainframe computer or autonomous machine,software is an information transformer-producing,managing.acquiring.modifying.displaying.or transmitting information that can be as simple as a single bit or as complex as an augmented- reality representation derived from data acquired from dozens of independent sources and the verlaid on the real world.As the vehicle used to deliver a product.software acts as he basis for the comp ang syster )the comr tion of information (networks).and the creation and control of other programs (soft ware tools and environments). Software delivers the most important product of our time-information.It trans. forms personal data (e.g.,an individual's financial transactions)so that the data can be more useful in a local context;it manages business information to enhance com- ass-it D vides a gat way to vide infor etwo d pro ovides the racquiring infor ion in all its fo at can threaten person al privacy and a gateway tha se with malicious intent to commit criminal acts. The role of computer software has undergone significant change over the last 60 years.Dramatic improvements in hardware performance,profound changes in com- puting architectures,vast increases in memory and storage capacity,and a wide vari- ated more sophisticated and complex computer-based syste results when a system succeeds,but they can also pose huge problems for those who must build and protect complex systems. Today,a huge software industry has become a dominant factor in the economies of the industrialized world.Teams of software specialists,each focusing on one part of the technology required to deliver a complex application,have replaced the lone program- era.And h estions that were asked of the lone pro are the same questions that are asked when modern computer-based systems are built: Why does it take so long to get software finished? Why are development costs so high? Why can't we find all errors before we give the software to our customers? .Why do we spend so much time and effort maintaining existing programs? .Why do we continue to have difficulty in measuring progress as software is being developed and r maintained? He st asking hy costs so mucn,we ne to ma I p tha hat naysdisineoihed
4 CHAPTER 1 SOFTWARE AND SOFTWARE ENGINEERING 1.1 Th e Nat u r e o f So f t wa r e Today, software takes on a dual role. It is a product, and the vehicle for delivering a product. As a product, it delivers the computing potential embodied by computer hardware or, more broadly, by a network of computers that are accessible by local hardware. Whether it resides within a mobile device, on the desktop, in the cloud, or within a mainframe computer or autonomous machine, software is an information transformer—producing, managing, acquiring, modifying, displaying, or transmitting information that can be as simple as a single bit or as complex as an augmentedreality representation derived from data acquired from dozens of independent sources and then overlaid on the real world. As the vehicle used to deliver a product, software acts as the basis for the control of the computer (operating systems), the communication of information (networks), and the creation and control of other programs (software tools and environments). Software delivers the most important product of our time—information. It transforms personal data (e.g., an individual’s financial transactions) so that the data can be more useful in a local context; it manages business information to enhance competitiveness; it provides a gateway to worldwide information networks (e.g., the Internet); and provides the means for acquiring information in all its forms. It also provides a vehicle that can threaten personal privacy and a gateway that enables those with malicious intent to commit criminal acts. The role of computer software has undergone significant change over the last 60 years. Dramatic improvements in hardware performance, profound changes in computing architectures, vast increases in memory and storage capacity, and a wide variety of exotic input and output options have all precipitated more sophisticated and complex computer-based systems. Sophistication and complexity can produce dazzling results when a system succeeds, but they can also pose huge problems for those who must build and protect complex systems. Today, a huge software industry has become a dominant factor in the economies of the industrialized world. Teams of software specialists, each focusing on one part of the technology required to deliver a complex application, have replaced the lone programmer of an earlier era. And yet, the questions that were asked of the lone programmer are the same questions that are asked when modern computer-based systems are built:2 ∙ Why does it take so long to get software finished? ∙ Why are development costs so high? ∙ Why can’t we find all errors before we give the software to our customers? ∙ Why do we spend so much time and effort maintaining existing programs? ∙ Why do we continue to have difficulty in measuring progress as software is being developed and maintained? 2 In an excellent book of essays on the software business, Tom DeMarco [DeM95] argues the counterpoint. He states: “Instead of asking why software costs so much, we need to begin asking ‘What have we done to make it possible for today’s software to cost so little?’ The answer to that question will help us continue the extraordinary level of achievement that has always distinguished the software industry