Software Engineering - Lecture 1: Introduction - Anh Dao Nam

FAQs about software engineering Professional and ethical responsibility Software engineering The economies of ALL developed nations are dependent on software. More and more systems are software controlled Software engineering is concerned with theories, methods and tools for professional software development. Expenditure on software represents a significant fraction of GNP in all developed countries. Software costs Software costs often dominate computer system costs. The costs of software on a PC are often greater than the hardware cost. Software costs more to maintain than it does to develop. For systems with a long life, maintenance costs may be several times development costs. Software engineering is concerned with cost-effective software development.

pdf59 trang | Chia sẻ: candy98 | Lượt xem: 590 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Software Engineering - Lecture 1: Introduction - Anh Dao Nam, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
SOFTWARE ENGINEERING Lecture 1 Introduction MBA Course Notes Dr. ANH DAO NAM 1 Software Engineering We will learn the fundamentals of Software Engineering Lecture slides, problems sets, solutions, study materials, etc. will be posted on the class website. Textbook is not required. Slides are from Ivan Marsic and Ian Sommerville, modified by Anh Dao Nam Textbooks:  Bruegge & Dutoit: Object-Oriented Software Engineering: Using UML, Patterns and Java, Third Edition, Prentice Hall, 2010. | ISBN 0-13-6061257  Miles & Hamilton: Learning UML 2.0, O’Reilly Media, 2006. ISBN: 0-596-00982-8 2 Reference The more advanced material will be based on material the instructor will make available. Some interesting books for the advanced material include: Bruegge & Dutoit: Object-Oriented Software Engineering: Using UML, Patterns and Java, Third Edition, Prentice Hall, 2010. Miles & Hamilton: Learning UML 2.0, O’Reilly Media, 2006. R. Pressman, Software Engineering - A Practitioner's Approach, 6th ed., 2005 C. Ghezzi, M. Jazayeri, and D. Mandriolo, Fundamentals of Software Engineering. Prentice Hall, second ed., 2002 A. Endres and D. Rombach, A Handbook of Software and Systems Engineering. The Fraunhofer IESE Series on Software Engineering, Pearson Education Ltd., 2003. S. Robertson and J. C. Robertson, Mastering the Requirements Process. Addison-Wesley Professional, second ed., 2006. I. Jacobson, G. Booch, and J. Rumbaugh, The Unified Software Development Process. Addison-Wesley Professional, 1999. K. Beck and C. Andres, Extreme Programming Explained. Addison-Wesley, 2004. 3 Course Logistics 4 The final grade will be determined based on regular homeworks, one midterm exam, and a Semester Project: • Homeworks: 20% • Midterm Exam: 30% • Semester Project: 50% Grading 5 Final project - 1 Students are expected to work together in groups of 3-4 members and produce a working system for a real- world client. The client may be a business, organizations, instructor, friend or relative, so long as they can provide a list of requirements. 6 Students are expected to document their entire software process, demonstrate their finished product, and provide a plan for system maintenance and support. Please see the instructor or teaching assistants early in the semester if you are having difficulty finding a client or other group members. 3 phases (project proposal presentation/report, midterm presentation/report, final project presentation/report) Project proposal due on . Final project - 2 7 Office Hours 8 Instructor: Dr. Anh Dao Nam Email: austin.daonam@gmail.com Wednesdays 1:00pm – 2:00pm • Technical Questions: Post on bboard, we will answer. • 5% Extra Credit for students answering bboard questions regularly. Introduction 9 Objectives To introduce software engineering and to explain its importance To set out the answers to key questions about software engineering To introduce ethical and professional issues and to explain why they are of concern to software engineers 10 Topics covered FAQs about software engineering Professional and ethical responsibility 11 Software engineering The economies of ALL developed nations are dependent on software. More and more systems are software controlled Software engineering is concerned with theories, methods and tools for professional software development. Expenditure on software represents a significant fraction of GNP in all developed countries. 12 Software costs Software costs often dominate computer system costs. The costs of software on a PC are often greater than the hardware cost. Software costs more to maintain than it does to develop. For systems with a long life, maintenance costs may be several times development costs. Software engineering is concerned with cost-effective software development. 13 FAQs about software engineering What is software? What is software engineering? What is the difference between software engineering and computer science? What is the difference between software engineering and system engineering? What is a software process? What is a software process model? 14 FAQs about software engineering What are the costs of software engineering? What are software engineering methods? What is CASE (Computer-Aided Software Engineering) What are the attributes of good software? What are the key challenges facing software engineering? 15 What is software? Computer programs and associated documentation such as requirements, design models and user manuals. Software products may be developed for a particular customer or may be developed for a general market. Software products may be  Generic - developed to be sold to a range of different customers e.g. PC software such as Excel or Word.  Custom - developed for a single customer according to their specification. New software can be created by developing new programs, configuring generic software systems or reusing existing software. 16 What is software engineering? Software engineering is an engineering discipline that is concerned with all aspects of software production. Software engineers should adopt a systematic and organised approach to their work and use appropriate tools and techniques depending on the problem to be solved, the development constraints and the resources available. 17 What is the difference between software engineering and computer science? Computer science is concerned with theory and fundamentals; software engineering is concerned with the practicalities of developing and delivering useful software. 18 What is a software process? A set of activities whose goal is the development or evolution of software. Generic activities in all software processes are:  Specification - what the system should do and its development constraints  Development - production of the software system  Validation - checking that the software is what the customer wants  Evolution - changing the software in response to changing demands. 19 What is a software process model? A simplified representation of a software process, presented from a specific perspective. Examples of process perspectives are  Workflow perspective - sequence of activities;  Data-flow perspective - information flow;  Role/action perspective - who does what. Generic process models  Waterfall;  Iterative development;  Component-based software engineering. 20 21 What Is a Software Dev. Methodology? A formalized approach or series of steps Examples  Process-Centered  Data-Centered  Object-Oriented Ref: Systems Analysis and Design, Alan Dennis and Barbara Haley Wixom, Fred Niederman. John Wiley & Sons, Inc. Waterfall Development Method 22 23 Alternatives to the SDLM Parallel Development Rapid Application Development (RAD) Phased Development Prototyping Spiral Development Packaged Systems Parallel Development Method 24 Rapid Application Development CASE tools JAD sessions Fourth generation/visualization programming languages Code generators 25 Three RAD Categories Phased development  A series of versions Prototyping  System prototyping Throw-away prototyping  Design prototyping 26 How Prototyping Works 27 Throwaway Prototyping 28 Criteria for Selecting the Appropriate Methodology Clear user requirements Familiar technology Complexity Reliability Time schedule Schedule visibility 29 What are the costs of software engineering? Roughly 60% of costs are development costs, 40% are testing costs. For custom software, evolution costs often exceed development costs. Costs vary depending on the type of system being developed and the requirements of system attributes such as performance and system reliability. Distribution of costs depends on the development model that is used. 30 Activity cost distribution 31 Product development costs 32 What are software engineering methods? Structured approaches to software development which include system models, notations, rules, design advice and process guidance. Model descriptions  Descriptions of graphical models which should be produced; Rules  Constraints applied to system models; Recommendations  Advice on good design practice; Process guidance  What activities to follow. 33 What is CASE (Computer-Aided Software Engineering) Software systems that are intended to provide automated support for software process activities. CASE systems are often used for method support. Upper-CASE  Tools to support the early process activities of requirements and design; Lower-CASE  Tools to support later activities such as programming, debugging and testing. 34 What are the attributes of good software? The software should deliver the required functionality and performance to the user and should be maintainable, dependable and acceptable. Maintainability  Software must evolve to meet changing needs; Dependability  Software must be trustworthy; Efficiency  Software should not make wasteful use of system resources; Acceptability  Software must accepted by the users for which it was designed. This means it must be understandable, usable and compatible with other systems. 35 What are the key challenges facing software engineering? Heterogeneity, delivery and trust. Heterogeneity  Developing techniques for building software that can cope with heterogeneous platforms and execution environments; Delivery  Developing techniques that lead to faster delivery of software; Trust  Developing techniques that demonstrate that software can be trusted by its users. 36 Professional and ethical responsibility Software engineering involves wider responsibilities than simply the application of technical skills. Software engineers must behave in an honest and ethically responsible way if they are to be respected as professionals. Ethical behaviour is more than simply upholding the law. 37 Issues of professional responsibility Confidentiality  Engineers should normally respect the confidentiality of their employers or clients irrespective of whether or not a formal confidentiality agreement has been signed. Competence  Engineers should not misrepresent their level of competence. They should not knowingly accept work which is outwith their competence. 38 Issues of professional responsibility Intellectual property rights  Engineers should be aware of local laws governing the use of intellectual property such as patents, copyright, etc. They should be careful to ensure that the intellectual property of employers and clients is protected. Computer misuse  Software engineers should not use their technical skills to misuse other people’s computers. Computer misuse ranges from relatively trivial (game playing on an employer’s machine, say) to extremely serious (dissemination of viruses). 39 Example: ATM Machine 40 Bank’s remote datacenter Bank customer ATM machine 1 2 34 5 67 8 90 Communication link Understanding the money-machine problem: How ATM Machine Might Work 41 Window clerk Bookkeeper Safe keeper Datacenter liaison Dispenser Safe Cash Transaction record Phone Speakerphone Bank’s remote datacenter Domain Model How may I help you? Customer Domain model created with help of domain expert Cartoon Strip: How ATM Machine Works 42 B Verify this account C Verify account XYZ XYZ valid. Balance: $100 D Account valid. Balance: $100 G Record $60 less A Enter your PIN Typing in PIN number E How may I help you? Withdraw $60 F Release $60 Dispense $60 H Please take your cash Dispensing! Software Engineering Blueprints Specifying software problems and solutions is like cartoon strip writing Unfortunately, most of us are not artists, so we will use something less exciting: UML symbols However 43 UML – Language of Symbols 44 «interface» BaseInterface + operation() Actor ClassName # attribute_1 : int # attribute_2 : boolean # attribute_3 : String + operation_1() : void + operation_2() : String + operation_3(arg1 : int) Software Class Three common compartments: 1. Classifier name 2. Attributes 3. Operations Comment Class1Implement + operation() Class2Implement + operation() Software Interface Implementation Interaction Diagram doSomething() instance1 : Class1 instance5 : Class2 instance8 : Class3 doSomethingElse() doSomethingYetElse() Inheritance relationship: BaseInterface is implemented by two classes Stereotype «⋅⋅⋅» provides additional info/ annotation/ explanation UML = Unified Modeling Language Online information: Understanding the Problem Domain System to be developed Actors  Agents external to the system Concepts/ Objects  Agents working inside the system Use Cases  Scenarios for using the system 45 ATM: Gallery of Players 46 Actors (Easy to identify because they are visible!) Bank’s remote datacenter System (ATM machine) Bank customer 1 2 34 5 6 7 8 90 Gallery of Workers + Things 47 Concepts (Hard to identify because they are invisible/imaginary!) Window clerk Bookkeeper Safe keeperDatacenter liaison Dispenser Safe CashTransaction record TelephoneSpeakerphone Use Case: Withdraw Cash 48 B Verify account XYZ XYZ valid. Balance: $100 1 2 34 5 67 8 90 C How may I help you? Withdraw $60 1 2 34 5 67 8 90 A Enter your PIN Typing in PIN number D 1 2 34 5 67 8 90 Please take your cash Collecting cash E XYZ withdrew $60 Acknowledged Software Measurement What to measure?  Project (developer’s work), for budgeting and timeline  Product, for quality assessment 49 Formal hedge pruning 50 Sizing the Problem (1) Size( 3 ) = 10 Size( 2 ) = 7 Size( 1 ) = 4 Size( 4 ) = 3 Size( 5 ) = 4 Size( 6 ) = 2 Size( 7 ) = 4 Size( 8 ) = 7 Step 2: Estimate relative sizes of all parts Step 1: Divide the problem into parts       51 Sizing the Problem (2) Step 3: Estimate the size of the total work Total size = Σ points-for-section i (i = 1..N) Step 4: Estimate speed of work (velocity) Step 5: Estimate the work duration Travel duration = Path size Travel velocity 52 Sizing the Problem (3) Advantages:  Velocity estimate may need to be adjusted (based on observed progress)  However, the total duration can be computed quickly (provided that the relative size estimates of parts are accurate) 53 Exponential Cost of Estimation 54 Estimation cost E s t i m a t i o n a c c u r a c y 100% Improving accuracy of estimation beyond a certain point requires huge cost and effort (known as the law of diminishing returns) In the beginning of the curve, a modest effort investment yields huge gains in accuracy Estimation Error Over Time Time Estimation error CompletionStart The cone of uncertainty starts high and narrows down to zero as the project approaches completion. Requirements Design Implementation 55 Key points Software engineering is an engineering discipline that is concerned with all aspects of software production. Software products consist of developed programs and associated documentation. Essential product attributes are maintainability, dependability, efficiency and usability. The software process consists of activities that are involved in developing software products. Basic activities are software specification, development, validation and evolution. Methods are organised ways of producing software. They include suggestions for the process to be followed, the notations to be used, rules governing the system descriptions which are produced and design guidelines. 56 Key points CASE tools are software systems which are designed to support routine activities in the software process such as editing design diagrams, checking diagram consistency and keeping track of program tests which have been run. Software engineers have responsibilities to the engineering profession and society. They should not simply be concerned with technical issues. CASE (Computer-Aided Software Engineering) Software Measurement 57 Assignments 58 Q&A 59