700 likes | 954 Views
Software Engineering Dr. K. T. Tsang. Lecture 1 Introduction to SW Engineering http://www.uic.edu.hk/~kentsang/SWE/SWE.htm. Textbook : general. Software Engineering: 8 th Edition By Ian Sommerville Pearson Education Limited, 2007 ISBN 7-111-19770-4
E N D
Software EngineeringDr. K. T. Tsang Lecture 1 Introduction to SW Engineering http://www.uic.edu.hk/~kentsang/SWE/SWE.htm
Textbook : general • Software Engineering: 8th Edition • By Ian Sommerville • Pearson Education Limited, 2007 • ISBN 7-111-19770-4 • This book is thick & contains many useful material, a good reference for your future SW career as well. It is nice to have it handy but doesn’t necessary have to own it now.
Textbook : Object Orientated • Object oriented modeling and design with UML, 2nd edition • By Michael Blaha & James Rumbaugh • Pearson Education, Inc., 2005 • ISBN 7-115-14076-6 • This book is concise and unintimidating, a bible for OO approach. You should own and read it carefully for this class.
Supplementary materials • MIT OpenCourseWare: Software Engineering • http://ocw.mit.edu/OcwWeb/Electrical-Engineering-and-Computer-Science/6-171Fall2003/CourseHome/index.htm • Plus other materials available on the web
Requirements for this Class • You are proficient in a programming language, but you have no experience in analysis or design of a system • You want to learn more about the technical aspects of analysis and design of complex software systems
Objectives of the Class • Appreciate Software Engineering: • Build complex software systems that are easy to maintain • Understand how to • produce high quality software system within time limit • while dealing with complexity and changes • Acquire technical knowledge (main emphasis) • Acquire managerial knowledge
Acquire Technical Knowledge • Understand System Modeling • Learn UML (Unified Modeling Language) • Learn different modeling methods: • Use Case modeling • Object Modeling • Dynamic Modeling • Issue Modeling • Learn how to use Tools: • CASE (Computer Aided Software Engineering) • Component-Based Software Engineering • Learn how to use Design Patterns and Frameworks
Acquire Managerial Knowledge • Understand the Software Lifecycle • Process vs Product • Learn about different software lifecycles • Greenfield Engineering, Interface Engineering, Reengineering
How to learn from this Course • Readings: • textbook • and Readings files on the Web site [I will direct you later]. • Technical writing: • use the project documentation to improve your technical writing skill.
Grading (Subject to Change) FINAL 20%??
Projects A large part of the course is built around the projects • Preferably real project for real client. • Select your own project, but I will give my suggestions. •Project teams, about 5 people each. • Feasibility study and plan: due ?? • Three group presentations and written reports: either: requirements, design, final or: 1st iteration, 2nd iteration, final The tutorials will be used to discuss the projects.
What is software? • More than just computer programs, including all documentation and the configuration (operating environment) • Generic products– developed by software company/organization, sold to any customer • Customized products– commissioned by customer, developed by software contractor
Why does SW matters? • SW’s contribution to US economy (1996) • Greatest trade surplus of export • $24B software exported, $4B imported • Compare: agriculture 26 -14, aerospace 11 -3, chemicals 26 -19, vehicles 21 -43, manufactured goods 200 -265 • Role in infrastructure • Not just the Internet • Transportation, energy, medicine, finance
What is software engineering? • Engineering– the discipline to build things (systems) that works, applying theories, methods and tools available • Software engineering– the entire technical process of software development, and the management of the whole process
Software Engineering: Definition Software Engineering is a collection of techniques, methodologies and tools that help with the production of • a high quality software system • with a given budget • before a given deadline while change occurs. 20
Why software engineering? • Demand for software is growing dramatically • Software costs are growing per system • Many projects have cost overruns • Many projects fail altogether • Software engineering seeks to find ways to build systems that are on time and within budget
Software development costs Software costs are increasing as hardware costs continue to decline. • Hardware technology has made • great advances • Simple and well understood tasks are encoded in hardware • Least understood tasks are encoded in software • Demands of software are growing • Size of the software applications is also increasing • Hence “the software crisis” Hardware costs vs. Software costs Hardware costs Software costs Time
Difference between software engineering & computer science • Computer science is the academic study of theories and methods underlying computers and software systems • Software engineering is the practice of producing software for specific applications. When the problem has no solution in theory, engineers often use ad hoc (“for this purpose only”) approaches to develop the software.
Scientist vs. Engineer • Computer Scientist • Proves theorems about algorithms, designs languages, defines knowledge representation schemes • Has infinite time… • Engineer • Develops a solution for an application-specific problem for a client • Uses computers & languages, tools, techniques and methods • Software Engineer • Works in multiple application domains • Has only 3 months... • …while changes occurs in requirements and available technology
Software engineering & system engineering • System engineering is concerned with all aspects of development and evolution of complex systems which often contain hardware as well as software • System engineers are involved in specifying the system, defining the architecture, and integrating the different parts to create the finished system
Factors affecting the quality of a software system • Complexity: • The system is so complex that no single programmer can understand it anymore • The introduction of one bug fix causes another bug • Change: • The “Entropy” of a software system increases with each change: Each implemented change erodes the structure of the system which makes the next change even more expensive • As time goes on, the cost to implement a change will be too high, and the system will then be unable to support its intended task. This is true of all systems, independent of their application domain or technological base.
How good is our software? • Failed developments • Accidents • Poor quality software
A story about- Air Traffic Control • FAA awarded IBM Federal Systems contract in 1989 • Deadline 2001, cost $2.5Billion • Constraints: 24x7x365, no downtime, 2-3 secs response time • Budget: $80K hardware, $2.5Billion software
ATC • 1994: Cost estimate > $5Billion, nothing delivered • IBM federal systems, bought by Loral, had already spent $2.3Billion • FAA enquiry: • Not enough oversight over IBM • FAA indecisive over requirements • Technology had evolved faster than their ability to use it • 1995/6: Formation, NJ to develop stopgap system • Lockheed Martin bought Loral, then lost most of the contract to Raytheon
Development failures • IBM survey, 1994 • 55% of systems cost more than expected • 68% overran schedules • 88% had to be substantially redesigned • Advanced Automation System (FAA, 1982-1994) • industry average was $100/line, expected to pay $500/line • Ended up paying $700-900/line • $6B worth of work discarded • Bureau of Labor Statistics (1997) • For every 6 new systems put into operation, 2 cancelled • probability of cancellation is about 50% for biggest systems • average project overshoots schedule by 50% • 3/4 systems are regarded as ‘operating failures’
State of the SW development practice What can you infer from this chart? Estimate Early On Time Delayed Canceled 13,000 6.06% 7.33% 74.77% 11.83% 130,000 1.24% 60.76% 17.67% 20.33% 1,300,000 0.14% 28.03% 23.83% 48.00% 0.00% 13.67% 21.33% 65.00% 13,000,000 Source: Patterns of software failures and successes, Capers Jones, 1996 • Delays common with mid- to –large projects. • Majority of the large projects are canceled.
Accidents “The most likely way for the world to be destroyed, most experts agree, is by accident. That’s where we come in. We’re computer professionals. We cause accidents.” Nathaniel Borenstein, inventor of MIME Programming as if People Mattered: Friendly Programs, Software Engineering and Other Noble Delusions (Princeton University Press, Princeton, NJ, 1991)
Accidents: Therac-25 (1985-87)A standard case study in software control of safety-critical systems & health informatics Radiation therapy machine with software controller • Two modes of operation: either low doses electron beam mode • or high power e-beam with target plate intervening to generate X-rays • Software failed to detect the target not rotated into proper position in the X-ray mode • Several deaths due to burning • Programmer had no experience with concurrent programming
Accidents: Ariane-5 (June 1996) • European Space Agency • complete loss of unmanned rocket shortly after takeoff • due to exception thrown in Ada code • faulty code was not even needed after takeoff • due to change in physical environment: undocumented assumptions violated
Why is SE difficult? Complexity Applicationdomain is complex Domain experts are not software engineers Difficulty for people with different background, knowledge, and vocabularies to communicate effectively. Working in large teams is complicated Difficult to grasp the details of large development projects Integration Ambiguity of natural language “Render the tertiary (3D) structure on the screen in such a way that the scientist can manoeuvre around the graphic representation”
What’s the problem? • ‘Hacking code’ isn’t all there is to building software. • In fact, it’s only a small part of it. Don’t think of code as part of the solution; often it’s part of the problem. • We need better ways to talk about software than code, that are less cumbersome, more direct, and less tied to technology that will rapidly become obsolete.
Role of design and designers • thinking in advance always helps! • contrast with reliance on testing: more effective, much cheaper • makes delegation and teamwork possible • design flaws affect user: incoherent, inflexible and hard to use software • design flaws affect developer: poor interfaces, bugs multiply
Software process • The set of activities that lead to the final software product, this includes: • Specification- engineer & customer define the requirement • Development- design & implementation • Validation- check to make sure the requirements are satisfied • Maintenance/evolution- modification to adapt to changing customer needs
Basic Process Steps in Software Development • Feasibility and planning • Requirements • System and program design • Implementation and testing • Acceptancetesting and release • Operation and maintenance It is essential to distinguish among these process steps.
Process Step: Feasibility and Planning • A feasibility study precedes the decision to begin a project. • What is the scope of the proposed project? • Is the project technically feasible? • What are the projected benefits? • What are the costs, timetable? A feasibility study leads to a decision: go or no-go.
Process Step: Requirements • Requirements define the function of the systemfrom the client's viewpoint. • The requirements establish the system's functionality, constraints and goals by consultation with the client and users. They are then defined in a manner that is understandable by both the client and the development staff. • This phase is sometimes divided into: • Requirements analysis • Requirements definition • Requirements specification
Process Step: System and Program Design • Design describes the system from the software developers' viewpoint • System design: Match the requirements to hardware or software systems. Establishes an overall system architecture • Program design: Represent the software system functions in a form that can be transformed into one or more executable programs • Unified Modeling Language (UML)
Process Step: Implementation and Testing Implementation (coding) The software design is realized as a set of programs or program units. (The software components may be written specifically, acquired from elsewhere, or modified.) Testing Individual components are tested against specifications. The individual program units are integrated and tested against thedesignby thedevelopment staff as a complete system.
Process Step: Acceptance Testing and Release Acceptance testing The complete system is tested against therequirements by theclient. Delivery and release The complete system is delivered to the client and released into production.
Process Step: Operation and Maintenance Operation: The system is put into practical use. Maintenance: Errors and problems are identified and fixed. Evolution: The system evolves over time as requirements change, to add new functions or adapt the technical environment. Phase out: The system is withdrawn from service. This is sometimes called the Software Life Cycle
Relative costs to fix errors: Cost Design Testing Maintenance Requirements Implementation Cost to fix an error increases as it is found later and later in the software lifecycle
Sequence of Processes Every software project will include these basic processes, in some shape or form, but: • They may be formal or informal • They may be carried out in various sequences Major alternatives • Sequential: Complete each process step before beginning the next (but see the next few slides). Waterfall model. • Iterative: Go quickly through all process steps to create a rough system, then repeat them to improve the system. Iterative refinement.
Software process models • A simplified description of the software process that present one view of the process • Some examples are: • Workflow models: the sequence of human activities in the process of producing the software • Dataflow model: more concern with how inputs are transformed to outputs in the process • Role/action model: concerns with the role of people involved
Most used software process (workflow) models • Waterfall approach: step-by-step approach from specifying requirements, designing, implementing to testing of software • Iterative approach: similar to the Waterfall approach, but in each step engineer & customer will interact to refine or make sure requirements will be satisfied • Component-based approach: many parts of the system already exist. The process focuses on integrating these parts to form the final system. • SCRUM -- http://en.wikipedia.org/wiki/Scrum_(development)
Waterfall Model Advantages: • Process visibility • Separation of tasks • Quality control at each step • Cost monitoring at each step Disadvantages: Each stage in the process reveals new understanding of the previous stages, that often requires the earlier stages to be revised.
Problem of the waterfall model • Due to the inflexible nature of the division of a project into separate stages, commitments are usually made early on. So it is difficult to react to changes in requirements. • Waterfall model is likely to be unsuitable if requirements are not well understood or are likely to change radically in the course of the project.