941 likes | 1.43k Views
1. Introduction to Software Engineering. Outline. Lecture 1 W hat is software Software is Everywhere Software Crisis and S oftware Failures From Software Development to S oftware Engineering D evelopment Activities. 1. What is software. 1.1 Software vs. Hardware.
E N D
Outline Lecture 1 • What is software • Software is Everywhere • Software Crisis and Software Failures • From Software Development to Software Engineering • Development Activities
1.1 Software vs. Hardware • Hardware - the physical components of the computer • Software - programs that run on the hardware The first general-purpose electronic computer, ENIAC After the program was figured out on paper, the process of getting the program "into" the ENIAC by manipulating its switches and cables took additional days. Glen Beck (background) and Betty Snyder (foreground) program the ENIAC in BRL building 328. (U.S. Army photo)
Woman and Software Engineering Ada Lovelace(1815-1852) Grace Murray Hopper (1906-1992) The First Programmer The Inventor of Cobol
1.2 Software Types • System Software • Itincludes the Operating System and all the utilities that enable the computer to function. • Application Software • It includes programs that do real work for user. • Open Source Software • Itis computer software whose source code is available under a license that permits users to use, change, and improve the software, and to redistribute it in modified or unmodified form • Proprietary Software (non-free software ) • It is software with restrictions on using, copying and modifying as enforced by the proprietor. Restrictions on use, modification and copying is achieved by either legal or technical means and sometimes both.
What is software? • Computer programs,associated documentation and configuration data • 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 • Bespoke (custom) - developed for a single customer according to their specification
Failure Rate Actual curve Failure Rate Infant mortality • Idealized curve Time Time 1.4 Software Characteristics • Software is developed or engineered, it is not manufactured in the classical sense • Software doesn’t wear out • Although the industry is moving toward component-based assembly, most software continues to be custom built Increased failure rate due to side effects Wear out Change
Computer Software • More and more systems are software controlled • Software is sold by retail
The economies of ALL developed nations are dependent on software • Software engineering expenditure represents a significant fraction of total spends in all developed countries
3.1 Software Crisis • The difficulty of writing correct, understandable, and verifiable computer programs
3.2 Software Failures We waste billions of dollars each year on entirely preventable mistakes Sources: Business Week, CEO Magazine, Computerworld, InfoWeek, Fortune, The New York Times, Time, and The Wall Street Journal.
Software Disasters • 20 Famous Software Disasters Source: http://www.devtopics.com/20-famous-software-disasters/ 1. Mariner Bugs Out (1962) Cost: $18.5 million Disaster: The Mariner 1 rocket with a space probe headed for Venus diverted from its intended flight path shortly after launch. Mission Control destroyed the rocket 293 seconds after liftoff. Cause: A programmer incorrectly transcribed a handwritten formula into computer code, missing a single superscript bar. Without the smoothing function indicated by the bar, the software treated normal variations of velocity as if they were serious, causing faulty corrections that sent the rocket off course
15. Y2K (1999) Cost: $500 billion Disaster: One man’s disaster is another man’s fortune, as demonstrated by the infamous Y2K bug. Businesses spent billions on programmers to fix a glitch in legacy software. While no significant computer failures occurred, preparation for the Y2K bug had a significant cost and time impact on all industries that use computer technology. Cause: To save computer storage space, legacy software often stored the year for dates as two digit numbers, such as “99″ for 1999. The software also interpreted “00″ to mean 1900 rather than 2000, so when the year 2000 came along, bugs would result.
Blue Screen of Death (or BSOD) refers to the error message displayed in Microsoft Windows operating systems. • During the presentation of a Windows 98 beta at COMDEX in April 1998, the demo computer crashed as one of the assistants tried to connect a scanner in demonstrating the Windows support for Plug & Play devices. With the BSoD message on slideshow display, the audience had a big laughter and applauded, to which Mr. Gates responded: “That must be why we’re not shipping Windows 98 yet.”
These problems will become worse because of the pervasive use of software in our civic infrastructure.
Factors of software development • Factors affecting the success of software development • Complexity: • The problem domain is difficult • The development process is very difficult to manage • Software offers extreme flexibility • Software is a discrete system • Continuous systems have no hidden surprises (Parnas) • Discrete systems have!
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 (“Second Law of Software Dynamics”). • 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.
Iron Triangle • What happens when you break the triangle? • 1) The project gets canceled. • 15% of projects are cancelled before they deliver a system. • A study of 1,027 IT projects cited scope management related to serial practices as the single largest contributing factor to project failure in 82% of the projects and was given a overall weighted failure influence of 25%.
Iron Triangle • What happens when you break the triangle? 2) The Project is deliver late, over budget, or both • According to the Chaos Report 51% of projects are challenged (severely over budget and/or late), with an average cost overrun of 43%.
Iron Triangle • What happens when you break the triangle? 3) The Project delivers poor quality software. • When development teams are forced to deliver more functionality than they have time or resources for, they are often motivated to take short cuts which inevitably result in poor quality.
Iron Triangle • What happens when you break the triangle? 4) The project under delivers. • The team fails to deliver all of the required functionality.
Iron Triangle… • What to do about it? • Recognize that the iron triangle must be respected. • So • Vary the Scope • Vary the Schedule • Vary the Resources • Vary two or more factors
4.1 Towards the engineering of software development • How to develop high quality software under the constraints of time and cost? • software development skill training • Qualified developers recruitment • Development process reengineering • …. • We need a systematic approach
4.2 Software Engineering • Software Engineering: • The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software. (IEEE Computer Society’s Software Engineering Body of Knowledge )
4.3 Understand the Software Engineering 1. It is a modeling activity • Model: an abstract representation of a system • Software engineers need to understand the environment in which the system has to operate • Software engineers need to understand the systems they could build, to evaluate different solutions and trade-offs
Chapter 2 Software Processes Topics covered • Software process models • Process activities • Coping with change • The Rational Unified Process • An example of a modern software process.
The software process • A structured set of activities required to develop a software system. • Many different software processes but all involve: • Specification – defining what the system should do; • Design and implementation – defining the organization of the system and implementing the system; • Validation – checking that it does what the customer wants; • Evolution – changing the system in response to changing customer needs. • A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective.
Software process descriptions • When we describe and discuss processes, we usually talk about the activities in these processes such as specifying a data model, designing a user interface, etc. and the ordering of these activities. • Process descriptions may also include: • Products, which are the outcomes of a process activity; • Roles, which reflect the responsibilities of the people involved in the process; • Pre- and post-conditions, which are statements that are true before and after a process activity has been enacted or a product produced.
Plan-driven and agile processes • Plan-driven processes are processes where all of the process activities are planned in advance and progress is measured against this plan. • In agile processes, planning is incremental and it is easier to change the process to reflect changing customer requirements. • In practice, most practical processes include elements of both plan-driven and agile approaches. • There are no right or wrong software processes.
Software process models • The waterfall model • Plan-driven model. Separate and distinct phases of specification and development. • Incremental development • Specification, development and validation are interleaved. May be plan-driven or agile. • Reuse-oriented software engineering • The system is assembled from existing components. May be plan-driven or agile. • In practice, most large systems are developed using a process that incorporates elements from all of these models.
Software Development Methods • Method = work strategy • The Feynman Problem-Solving Algorithm:(i) Write down the problem (ii) think very hard, and (iii) write down the answer. • Waterfall • Unidirectional, finish this step before moving to the next • Iterative + Incremental • Develop increment of functionality, repeat in a feedback loop • Agile • User feedback essential; feedback loops on several levels of granularity
Waterfall Method Unidirectional, no way backfinish this step before moving to the next
UML – Language of Symbols UML = Unified Modeling Language Online information: http://www.uml.org
Waterfall model phases • There are separate identified phases in the waterfall model: • Requirements analysis and definition • System and software design • Implementation and unit testing • Integration and system testing • Operation and maintenance • The main drawback of the waterfall model is the difficulty of accommodating change after the process is underway. In principle, a phase has to be complete before moving onto the next phase.
Waterfall model problems • Inflexible partitioning of the project into distinct stages makes it difficult to respond to changing customer requirements. • Therefore, this model is only appropriate when the requirements are well-understood and changes will be fairly limited during the design process. • Few business systems have stable requirements. • The waterfall model is mostly used for large systems engineering projects where a system is developed at several sites. • In those circumstances, the plan-driven nature of the waterfall model helps coordinate the work.
Incremental development benefits • The cost of accommodating changing customer requirements is reduced. • The amount of analysis and documentation that has to be redone is much less than is required with the waterfall model. • It is easier to get customer feedback on the development work that has been done. • Customers can comment on demonstrations of the software and see how much has been implemented. • More rapid delivery and deployment of useful software to the customer is possible. • Customers are able to use and gain value from the software earlier than is possible with a waterfall process.
Incremental development problems • The process is not visible. • Managers need regular deliverables to measure progress. If systems are developed quickly, it is not cost-effective to produce documents that reflect every version of the system. • System structure tends to degrade as new increments are added. • Unless time and money is spent on refactoring to improve the software, regular change tends to corrupt its structure. Incorporating further software changes becomes increasingly difficult and costly.
Reuse-oriented software engineering • Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems. • Process stages • Component analysis; • Requirements modification; • System design with reuse; • Development and integration. • Reuse is now the standard approach for building many types of business system
Types of software component • Web services that are developed according to service standards and which are available for remote invocation. • Collections of objects that are developed as a package to be integrated with a component framework such as .NET or J2EE. • Stand-alone software systems (COTS) that are configured for use in a particular environment.
Process activities • Real software processes are inter-leaved sequences of technical, collaborative and managerial activities with the overall goal of specifying, designing, implementing and testing a software system. • The four basic process activities of specification, development, validation and evolution are organized differently in different development processes. In the waterfall model, they are organized in sequence, whereas in incremental development they are inter-leaved.
Software specification • The process of establishing what services are required and the constraints on the system’s operation and development. • Requirements engineering process • Feasibility study • Is it technically and financially feasible to build the system? • Requirements elicitation and analysis • What do the system stakeholders require or expect from the system? • Requirements specification • Defining the requirements in detail • Requirements validation • Checking the validity of the requirements
Software design and implementation • The process of converting the system specification into an executable system. • Software design • Design a software structure that realises the specification; • Implementation • Translate this structure into an executable program; • The activities of design and implementation are closely related and may be inter-leaved.