why software engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月
TRANSCRIPT
![Page 1: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/1.jpg)
Why Software Engineering?
中国科学技术大学软件学院孟宁
2015 年 09 月
![Page 2: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/2.jpg)
编程的乐趣♦
![Page 3: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/3.jpg)
软件工程的地位♦ 程序 = 算法 + 数据结构♦ 软件 = 程序 + 软件工程♦ 软件企业 = 软件 + 商业模式
![Page 4: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/4.jpg)
Agenda
1.1 What is Software Engineering? 1.2 How Successful Have We Been?
1.3 What Is Good Software?
1.4 Who Does Software Engineering?
1.5 A System Approach
1.6 An Engineering Approach
1.7 Members of the Development Team
1.8 How Has Software Engineering Changed?
![Page 5: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/5.jpg)
Objectives
♦ What we mean by software engineering
♦ Software engineering’s track record
♦ What we mean by good software
♦ Why a system approach is important
♦ How software engineering has changed since 1970s
![Page 6: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/6.jpg)
1.1 What is Software EngineeringSolving Problems
♦ Software products are large and complex
♦ Development requires analysis and synthesis– Analysis: decompose a large problem into sm
aller, understandable pieces• abstraction is the key
– Synthesis: build (compose) a software from smaller building blocks
• composition is challenging
![Page 7: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/7.jpg)
1.1 What is Software EngineeringSolving Problems
♦ The analysis process
![Page 8: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/8.jpg)
1.1 What is Software EngineeringSolving Problems
♦ The synthesis process
![Page 9: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/9.jpg)
1.1 What is Software EngineeringSolving Problems
♦ Method: refers to a formal procedure; a formal “recipe” for accomplishing a goal that is typically independent of the tools used
♦ Tool: an instrument or automated system for accomplishing something in a better way
♦ Procedure: a combination of tools and techniques to produce a product
♦ Paradigm: philosophy or approach for building a product (e.g., OO vs structured approaches)
![Page 10: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/10.jpg)
1.1 What is Software EngineeringWhere Does the Software Engineer Fit In?
♦ Computer science: focusing on computer hardware, compilers, operating systems, and programming languages
♦ Software engineering: a discipline that uses computer and software technologies as a problem-solving tools
![Page 11: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/11.jpg)
1.1 What is Software EngineeringWhere Does the Software Engineer Fit In?
♦ Relationship between computer science and software engineering
![Page 12: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/12.jpg)
1.2 How Successful Have We Been?
♦ Perform tasks more quickly and effectively– Word processing, spreadsheets, e-mail
♦ Support advances in medicine, agriculture, transportation, multimedia education, and most other industries
♦ Many good stories
♦ However, software is not without problems
![Page 13: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/13.jpg)
1.2 How Successful Have We Been?Sidebar 1.1 Terminology for Describing Bugs
♦ A fault: occurs when a human makes a mistake, called an error, in performing some software activities
♦ A failure: is a departure from the system’s required behaviour
![Page 14: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/14.jpg)
1.2 How Successful Have We Been?Examples of Software Failure
♦ IRS hired Sperry Corporation to build an automated federal income tax form processing process– An extra $90 M was needed to enhance the original $103
product– IRS lost $40.2 M on interests and $22.3 M in overtime wages
because refunds were not returned on time
♦ Malfunctioning code in Therac-25 killed several people♦ Reliability constraints have caused cancellation of many
safety critical systems– Safety-critical: something whose failure poses a threat to life or
health
![Page 15: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/15.jpg)
1.3 What Is Good Software?Sidebar 1.2 Perspective on Quality
♦ The transcendental view: quality is something we can recognize but not define
♦ The user view: quality is fitness for purpose♦ The manufacturing view: quality is conformanc
e to specification♦ The product view: quality tied to inherent produ
ct characteristics♦ The value-based view: depends on the amount
the customers is willing to pay for it
![Page 16: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/16.jpg)
1.3 What is Good Software?
♦ Good software engineering must always include a strategy for producing quality software
♦ Three ways of considering quality– The quality of the product– The quality of the process– The quality of the product in the context of the
business environment
![Page 17: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/17.jpg)
1.3 What Is Good Software?The Quality of the Product
♦ Users judge external characteristics (e.g., correct functionality, number of failures, type of failures)
♦ Designers and maintainers judge internal characteristics (e.g., types of faults)
♦ Thus different stakeholders may have different criteria
♦ Need quality models to relate the user’s external view to developer’s internal view
![Page 18: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/18.jpg)
1.3 What Is Good Software?The Quality of the Product (continued)
♦ McCall’s quality model
![Page 19: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/19.jpg)
1.3 What Is Good Software?The Quality of the Process
♦ Quality of the development and maintenance process is as important as the product quality
♦ The development process needs to be modeled
♦ Modeling will address questions such as– Where to find a particular kind of fault– How to find faults early– How to build in fault tolerance– What are alternative activities
![Page 20: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/20.jpg)
1.3 What Is Good Software?The Quality of the Process (continued)
♦ Models for process improvement– SEI’s Capability Maturity Model (CMM)– ISO 9000– Software Process Improvement and Capabilit
y dEtermination (SPICE)
![Page 21: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/21.jpg)
1.3 What Is Good Software?The Quality in the Context of the Business Environment
♦ Business value is as important as technical value
♦ Business value (in relationship to technical value) must be quantified
♦ A common approach: return on investment (ROI)
♦ ROI is interpreted in different terms: reducing costs, predicting savings, improving productivity, and costs (efforts and resources)
![Page 22: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/22.jpg)
1.4 Who Does Software Engineering?
♦ Customer: the company, organization, or person who pays for the software system
♦ Developer: the company, organization, or person who is building the software system
♦ User: the person or people who will actually use the system
![Page 23: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/23.jpg)
1.4 Who Does Software Engineering? (continued)
♦ Participants (stakeholders) in a software development project
![Page 24: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/24.jpg)
1.5 System Approach
♦ Hardware, software, interaction with people
♦ Identify activities and objects
♦ Define the system boundary
♦ Consider nested systems, systems interrelationship
![Page 25: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/25.jpg)
1.5 System ApproachThe Element of a System
♦ Activities and objects– An activity is an event initiated by a trigger– Objects or entities are the elements involved i
n the activities
♦ Relationships and the system boundaries– A relationship defines the interaction among e
ntities and activities– System boundaries determine the origin of inp
ut and destinations of the output
![Page 26: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/26.jpg)
1.5 System ApproachThe Element of a System (continued)
♦ Example of systems: a human respiratory system
![Page 27: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/27.jpg)
1.5 System ApproachThe Element of a System (continued)
♦ A computer system must also be clearly described: System definition of a paycheck production
![Page 28: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/28.jpg)
1.5 System ApproachInterrelated Systems
♦ Some systems are dependent to other systems– The interdependencies may be complex
♦ It is possible for one system to exist inside another system
♦ If the boundary definitions are detailed, building a larger system from the smaller ones is relatively easy
![Page 29: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/29.jpg)
1.5 System ApproachInterrelated Systems (continued)
♦ A layered system
![Page 30: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/30.jpg)
1.6 Engineering ApproachBuilding a System
♦ Requirement analysis and definition♦ System design♦ Program design♦ Writing the programs ♦ Unit testing♦ Integration testing♦ System testing♦ System delivery♦ Maintenance
![Page 31: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/31.jpg)
1.7 Members of the Development Team
♦ Requirement analysts: work with the customers to identify and document the requirements
♦ Designers: generate a system-level description of what the system is supposed to do
♦ Programmers: write lines of code to implement the design
♦ Testers: catch faults♦ Trainers: show users how to use the system♦ Maintenance team: fix faults that show up later♦ Librarians: prepare and store documents such as softw
are requirements♦ Configuration management team: maintain correspond
ence among various artifacts
![Page 32: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/32.jpg)
1.7 Members of the Development Team (continued)
♦ Typical roles played by the members of a development team
![Page 33: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/33.jpg)
1.8 How Has Software Engineering Changed?The Nature of the Change
♦ Before 1970s– Single processors: mainframes– Designed in one of two ways
• as a transformation: input was converted to output
• as a transaction: input determined which function should be performed
♦ After 1970s– Run on multiple systems– Perform multi-functions
![Page 34: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/34.jpg)
1.8 How Has SE Changed?Wasserman's Seven Key Factors
1.Critically of time-to-market 2.Shifts in the economics of computing3.Availability of powerful desktop computing4.Extensive local- and wide-area networking5.Availability and adoption of object-oriented
technology6.Graphical user interfaces 7.Unpredictability of the waterfall model of s
oftware development
![Page 35: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/35.jpg)
1.8 How Has SE Changed?Wasserman's Seven Key Factors (continued)
♦ The key factors that have changed the software development
![Page 36: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/36.jpg)
1.8 How Has SE Changed?Wasserman's Discipline of Software Engineering
♦ Abstractions♦ Analysis and design methods and notation
s ♦ User interface prototyping♦ Software architecture♦ Software process♦ Reuse♦ Measurement♦ Tools and integrated environments
![Page 37: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/37.jpg)
1.8 How Has SE Changed?Abstraction
♦ A description of the problem at some level of generalization– Hide details
![Page 38: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/38.jpg)
1.8 How Has SE Changed?Analysis and Design Methods and Notations
♦ Provide documentation
♦ Facilitate communication
♦ Offer multiple views
♦ Unify different views
![Page 39: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/39.jpg)
1.8 How Has SE Changed?User Interface Prototyping
♦ Prototyping: building a small version of a system– Help users identify key requirements of a
system– Demonstrate feasibility
♦ Develop good user interface
![Page 40: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/40.jpg)
1.8 How Has SE Changed?Software Architecture
♦ A system’s architecture describes the system in terms of a set of architectural units and relationships between these units
♦ Architectural decomposition techniques– Modular decomposition– Data-oriented decomposition– Event-driven decomposition– Outside-in-design decomposition– Object-oriented decomposition
![Page 41: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/41.jpg)
1.8 How Has SE Changed?Software Process
♦ Many variations
♦ Different types of software need different processes– Enterprise-wide applications need a great
deal of control– Departmental applications can take
advantage of rapid development
![Page 42: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/42.jpg)
1.8 How Has SE Changed?Software Process (continued)
♦ Pictorial representation of differences in development processes
![Page 43: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/43.jpg)
1.8 How Has SE Changed?Software Reuse
♦ Commonalities between applications may allow reusing artifacts from previous developments– Improve productivity– Reduce costs
♦ Potential concerns– It may be faster to build a smaller application than
searching for reusable components– Generalized components take more time to build– Must clarify who will be responsible for maintaining
reusable components– Generality vs specificity: always a conflict
![Page 44: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/44.jpg)
1.8 How Has SE Changed?Measurement
♦ Objective: describe quality goals in a quantitative way
![Page 45: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/45.jpg)
1.8 How Has SE Changed?Tools and Integrated Environments
♦ Platform integration (on heterogeneous networks)
♦ Presentation integration (commonality of user interface)
♦ Process integration (linking tools and the development process)
♦ Data integration (to share common data)♦ Control integration (the ability of one tool
to initiate action in another one)
![Page 46: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/46.jpg)
What this Chapter Means for You
♦ Given a problem to solve– Analyze it– Synthesize a solution
♦ Understand that requirements may change ♦ Must view quality from several different pe
rspectives♦ Use fundamental software engineering co
ncepts (e.g., abstractions and measurements)
♦ Keep system boundary in mind
![Page 47: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/47.jpg)
Question 1
♦ 假如小王要从苏州到纽约去度假,她要面对如何到达纽约的问题,利用本章学习的方法您来分析这个问题并给出几套解决方案供小王选择。
![Page 48: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/48.jpg)
Question 2
♦ 简述软件开发过程♦ Requirements analysis and definition
♦ System design
♦ Program design
♦ Writing programs
♦ Unit testing
♦ Integration testing
♦ System testing
♦ System delivery
♦ Maintenance
♦ Communication♦ Planning♦ Modeling
– Analysis of requirements– Design
♦ Construction– Code generation– Testing
♦ Deployment
![Page 49: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/49.jpg)
Question 3
♦ 假设我们正在开发一个图书馆管理系统,它由三个主要的子系统构成,分别是:借阅 / 归还事务处理;目录管理;和报表处理。在开发的过程中出现了一些问题。请将下列问题分类( Error , Fault , Failure )
♦ 1. 在计算超期罚款的代码中, fine_total 变量未被初始化。♦ 2. 在图书管理员试图向目录中添加新书名的时候,系统关
机了。♦ 3. 需求分析的作者并不知道还书的时候是不需要读者证的。♦ 4. 在需求分析中,超期罚款规定为每天 0.25 美元,上限 1
5 美元。但计算超期罚款的代码并没有考虑罚款上限问题。♦ 5. 根据设定,图书管理系统会在每晚 11 点备份全天处理
的事务。但周二晚上并没有进行备份。
![Page 50: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/50.jpg)
Question 4
♦ 谈一谈如何在软件开发过程中提高产品质量。
![Page 51: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/51.jpg)
Question 5
♦ 谈一谈系统化和抽象化如何统一起来,以帮助我们设计更简单更有效的解决方案。
![Page 52: Why Software Engineering? 中国科学技术大学软件学院 孟宁 2015 年 09 月](https://reader035.vdocuments.site/reader035/viewer/2022081415/56649e765503460f94b775db/html5/thumbnails/52.jpg)
谢谢大家!
References软件工程 - 理论与实践(第四版 影印版) Software Engineering: Theory and Practice (Fourth Edition),Shari Lawrence Pfleeger,Joanne M. Atlee , 高等教育出版社软件工程 - 理论与实践(第四版) Software Engineering: Theory and Practice (Fourth Edition),Shari Lawrence Pfleeger,Joanne M. Atlee, 杨卫东译 , 人民邮电出版社软件工程—实践者的研究方法( Software Engineering-A Practitioner’s Approach ) ; ( 美 ) Roger S. Pressman 著; 机械工业出版社 ISBN : 7-111-07282-0http://code.google.com/p/advancedsoftwareengineering/