26
Software is (1) instructions (computer programs) that when executed provide desired features, function, and performance; (2) data structures that enable the programs to adequately manipulate information; and (3) documents that describe the operation and use of the programs. Software Characteristics: 1. Software is developed or engineered; it is not manufactured in the classical sense. 2. Software does not wear out Wear out Infant mortality Failure curve for hardware Increased failure rate due to side effects Change Actual Curve Idealized curve Failure curve for software 3. Most software continue to be custom built Types of Software

Introduction to software_engineering

Embed Size (px)

Citation preview

Page 1: Introduction to software_engineering

Software is (1) instructions (computer programs) that when executed provide desired features, function, and performance; (2) data structures that enable the programs to adequately manipulate information; and (3) documents that describe the operation and use of the programs.

Software Characteristics:

1. Software is developed or engineered; it is not manufactured in the classical sense.2. Software does not wear out

Wear out

Infant mortality

Failure curve for hardware

Increased failure rate due to side effects

Change Actual Curve

Idealized curve

Failure curve for software

3. Most software continue to be custom built

Types of Software

1. System Software is a collection of programs written to service other programs. E.g. compilers, editors and file management utilities.

2. Application Software consists of standalone programs that solve a specific business need3. Engineering/ Scientific software4. Embedded software resides within a product or system and is used to implement and

control features and functions for the end user and for the system itself

Page 2: Introduction to software_engineering

5. Product-line software are designed to provide a specific capability for use by many different customers, product line software can focus o a limited and esoteric marketplace.

6. Web-applications can be a little more than a set of linked hypertext files that present information using text and limited graphics.

7. Artificial intelligence software makes use of non-numerical algorithms to solve complex problems that are not amenable to computation or straightforward analysis.

8. Legacy software

Nature of Software1. Software is flexible, or open for changes2. Software is developed for long term usage3. Software is complex4. Software involves communication with the machine

Software Engineering is the establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines. It is a layered technology.The engineering approach must rest on an organizational commitment to quality. The foundation of software engineering is the process layer, which defines a framework for effective delivery of software engineering technology. Methods provide the technical how-to’s for building software. Software engineering tools provide automated or semi-automated support for the process and methods.

Software engineering is about solving problems. It can be broken into analyzing (problem) and synthesis (solution).

Computer Science Customer

Software Engineering

Tools and techniques to solve problems

ProblemComputer functions

Theories

Page 3: Introduction to software_engineering

Evolution of Software Engineering

Emergence of Software Engineering

Software Engineering Challenges

1. Scale: Rules for small scale do not apply on large scale2. Quality and productivity: These are the terms that are vaguely defined. Productivity directly

depends upon the people in development. Quality includes N number of parameters.3. Consistently and repeatability: The methods for software development should be repeatable

across projects leading to consistency in the quality of software produced.4. Change: Software should accommodate and embrace change. Since as businesses change, they

require that the software supporting it should change.

Art

Craft

Engineering

Esoteric use of past experience

Unorganized use of past experience Systematic use of past

experience . Formulation of scientific basis

Time

Technology

Object Oriented Design

Data Flow Oriented Design

Exploratory Style

Control Flow Oriented Design

Data Structure Oriented Design

Page 4: Introduction to software_engineering

5. Heterogeneity: Developing techniques for building software that can cope with heterogeneous platforms and execution environments;

6. Delivery: Developing techniques that lead to faster delivery of software;7. Trust: Developing techniques that demonstrate that software can be trusted by its users.

What is good software?

Good software includes a few qualities that can be grouped into the following categories.

1. Quality of product2. Quality of the process3. Quality in the context of business environment (ROI or Return On Investment)

Essential qualities of a good software include correctness, reliability, robustness, performance, usability, verifiability, maintainability, repair ability, evolve ability, portability, understandability, interoperability, productivity, timeliness, visibility and reusability, to name a few.

Measurable Characteristics for Software1. Functionality: The capability to provide functions which meet stated and implied needs

(suitability) when the software is used, accuracy and security.2. Reliability: The capability to maintain a specified level of performance3. Usability: The capability to be understood (understandability), learned (learn ability) and used

(operability)4. Efficiency: The capability to provide appropriate performance relative to the amount of

resources used.5. Maintainability: The capability to be modified for purposes of making corrections (changeability,

testability), improvements, or adaptation (stability)6. Portability: The capability to be adopted (adaptability) for different specified environments

(install ability) without applying actions or means other than those provided for this purpose in the product.

Software crisis

There is a rise in software prices as compared to hardware prices. Also the software is difficult to alter, debug and enhance. This is because of lack of adequate training in software engineering. Large software has failed and has caused huge losses and was called software runways.

Reasons for software Crisis

1. Lack of communication between developers and users2. Increase in size of software3. Increase in cost of developing software4. Increased complexity of problems5. Lack of understanding of problem and environment6. High optimistic estimates7. Difficult estimation of time8. Quality parameters not standardized

Page 5: Introduction to software_engineering

9. Maintenance problems with code

Software process

Software projects utilize a process to organize the execution of tasks to achieve the goals on the cost, schedule and quality fronts.

A process model specifies a general process, usually as a set of stages in which a project should be divided; the order in which the stages should be executed and any other constraints and conditions on the execution of stages. A project’s process may utilize some process model.

The process that deals with the technical and management issues of software development is called a software process.

The desired Characteristics of a Software Process are:1. Predictability: It determines how accurately the outcome of following the process can be

predicted. The fundamental basis for quality prediction is that quality of the product is determined largely by the process followed for developing it. Effective management of quality control activities depends upon the predictability of the process.

2. Support Testability and Maintainability: One of the most important objectives of software development should be to reduce the maintenance effort. The process used, should ensure that maintainability. Both testing and maintenance depend heavily on the quality of design and code, and these costs can be considerably reduced if the software is designed and coded to make testing and maintenance easier.

3. Support change: Software changes are driven by business need, people’s mindset etc. Thus change is prevalent, and a process that can handle change easily is desirable.

4. Early Defect removal: We should attempt to detect errors that occur in a phase, during that phase itself, to reduce effort and cost or removing them. Error detection and correction should be a continuous process.

5. Process improvement and feedback: To satisfy the objectives of quality improvement are cost reduction, the software process must be improved.

Software Components

In engineering disciplines, products are always constructed from parts or components. Similarly, software engineering is component based. Until the early 1990’s, components were routines and libraries. With advances in programming languages, other mechanisms like generic constructs in languages as ADA and C++ and objects and frameworks in object oriented language also came.

A framework is a collection of related classes that are designed to be used together in developing applications in a certain domain. Standard template library in C++ is fine grained, code level component. While swing and Java Beans that provide classes and objects for visual approach to software development are medium grained components. Large grained components such as database management systems act as components in the architecture.

Page 6: Introduction to software_engineering

A component is a software element that confirms to a component model and can be independently deployed and composed without modification, according to a composition standard. Components are standardized, Independent, comparable, deployable and documented.

Software Costs Software costs often dominate computer system costs. The costs of software on a PC

are often greater than the hardware costs. 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. Cost of the software includes the cost of developers, the hardware resources used for

development and the cost of infrastructure required for such development.

Thus following points become important considerations for software engineering• Attempt to estimate cost/effort• Define plan• Prepare schedules• Involve user• Identify stages• Define milestones• Reviews• Define deliverables• Quality assurance steps (testing)

Job of a Software developerEvery developer has to become accurate in three forms of communication

1. Communication with the user. The user is not always well informed. There is also a gap between the user and the developer in terms of field of work. Thus getting the right information from the user is very critical task for the developer

2. Communication with the technical specialists. It is difficult to understand the jargon of a technical specialist and thus the developer has to convey the information correctly to him, in the way he can understand.

3. Communication with the management. The management personnel have business knowledge and understanding of the application of the software. But they are not well versed with the technicalities involved. Judging correctly the importance of the requirement stated by the management is an important task for the developer.

Page 7: Introduction to software_engineering

Software Engineering Code of Ethics

The preamble of the code states that

Computers have a central and growing role in commerce, industry, government, medicine, education, entertainment, and society at large. Software engineers are those who contribute by direct participation or by teaching, to the analysis, specification, design, development, certification, maintenance, and testing of software systems. Because of their roles in developing software systems, software engineers have significant opportunities to do good or cause harm. To ensure, as much as possible, that their efforts will be used for good, software engineers must commit themselves to making software engineering a beneficial and respected profession.Software engineers shall commit themselves to making the analysis, specification, design, development, testing and maintenance of software a beneficial and respected profession. In accordance with their commitment to the health, safety and welfare of the public, software engineers shall adhere to the following Eight Principles:

The eight principles are as follows:

1. Public: Software engineers shall act consistently with the public interest.2. Client and Employer: Software engineers shall act in a manner that is in the best interests of their client and employer, consistent with the public interest.3. Product: Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.4. Judgment: Software engineers shall maintain integrity and independence in their professional judgment.5. Management: Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.6. Profession: Software engineers shall advance the integrity and reputation of the profession, consistent with the public interest.7. Colleagues: Software engineers shall be fair to, and supportive of, their colleagues.8. Self: Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession.

Software Metrics are quantifiable measures that could be used in Software engineering to calculate1. The complexity of the software which in turn helps in other ways2. Cost estimation based on the calculations3. Allocation of appropriate resources as per the complexity of project4. Correct scheduling of tasks as per the complexity5. Evaluation of Quality and reliability of system6. Improving quality of the system7. Help in management of risks

Page 8: Introduction to software_engineering

They help in the overall development of the system in a more organized and methodical way. Metrics are important to manage the project successfully. There are three types of software metrics:

1. Product metrics measure the software2. Process metrics quantify characteristics of the process used3. Project metrics quantifies the whole project such as amount of project completion

There are different scales for measuring metrics such as:1. Nominal which categorizes in groups and is thus a qualitative and not a quantitative measure2. Ordered scale and tell the sequence 3. Interval can be incremental or regression analysis4. Ratio can tell exact quantitative differences which can be ordered and grouped

Examples: Measures are of different types1. Size metrics

a. LOCb. ELOC/NLOCc. CLOCd. Functionalitye. Effort

2. Function points3. Complexity

a. ‘O’ notationb. Algorithm/ logic

4. Structurea. Cyclomatic complexity

5. Process measurementa. Time taken for process activities to be

completed E.g. Calendar time or effort to complete an activity or process.b. Resources required for processes or activities E.g. Total effort in person-days.c. Number of occurrences of a particular event E.g. Number of defects discovered.

Page 9: Introduction to software_engineering

Issue Software Engineering Engineering

FoundationsBased on computer science, information science, and discrete mathematics.

Based on science, mathematics, and empirical knowledge.

Cost

Compilers and computers are cheap, so software engineering and consulting are often more than half of the cost of a project. Minor software engineering cost-overruns can adversely affect the total project cost.

In some projects, construction and manufacturing costs can be high, so engineering may only be 15% of the cost of a project. Major engineering cost overruns may not affect the total project cost.

Replication

Replication (copying CDs or downloading files) is trivial. Most development effort goes into building new (unproven) or changing old designs and adding features.

Radically new or one-of-a-kind systems can require significant development effort to create a new design or change an existing design. Other kinds of systems may require less development effort, but more attention to issues such as manufacturability.

InnovationSoftware engineers often apply new and untested elements in software projects.

Engineers generally try to apply known and tested principles, and limit the use of untested innovations to only those necessary to create a product that meets its requirements.

DurationSoftware engineers emphasize projects that will live for years or decades.

Some engineers solve long-ranged problems (bridges and dams) that endure for centuries.

Management Status

Few software engineers manage anyone.

Engineers in some disciplines, such as civil engineering, manage construction, manufacturing, or maintenance crews.

Page 10: Introduction to software_engineering

BlameSoftware engineers must blame themselves for project problems.

Engineers in some fields can often blame construction, manufacturing, or maintenance crews for project problems.

Practitioners in U.S.

611,900 software engineers 1,157,020 total non-software engineers

AgeSoftware engineering is about 50 years old.

Engineering as a whole is thousands of years old.

Title Regulations

Software engineers are typically self-appointed. A computer science degree is common but not at all a formal requirement.[

In many jurisdictions it is illegal to call yourself an engineer without specific formal education and/or accreditation by governmental or engineering association bodies.

Analysis Methodology

Methods for formally verifying correctness are developed in computer science, but they are rarely used by software engineers. The issue remains controversial.

Some engineering disciplines are based on a closed system theory and can in theory prove formal correctness of a design. In practice, a lack of computing power or input data can make such proofs of correctness intractable, leading many engineers to use a pragmatic mix of analytical approximations and empirical test data to ensure that a product will meet its requirements.

Synthesis Methodology

SE struggles to synthesize (build to order) a result according to requirements.

Engineers have nominally refined synthesis techniques over the ages to provide exactly this. However, this has not prevented some notable engineering failures, such as the collapse of Galloping Gertie (the original Tacoma Narrows Bridge), the sinking of the Titanic, and the Pentium FDIV bug. In addition, new technologies inevitably result in new challenges that cannot be met using existing techniques.

Research Software engineering is often Traditional engineering nominally separates

Page 11: Introduction to software_engineering

during Projects

busy with researching the unknown (e.g. to derive an algorithm) right in the middle of a project.

these activities. A project is supposed to apply research results in known or new clever ways to build the desired result. However, ground-breaking engineering projects such as Project Apollo often include a lot of research into the unknown.

Codified Best Practice

Software engineering has just recently started to codify and teach best practice in the form of design patterns.

Some engineering disciplines have thousands of years of best practice experience handed over from generation to generation via a field's literature, standards, rules and regulations. Newer disciplines such as electronic engineering and computer engineering have codified their own best practices as they have developed.

Page 12: Introduction to software_engineering

Software Development Life Cycle

The software Life Cycle encompasses all activities required to define, develop, test deliver, operate and maintain a software product. Planning the software development process involves several important considerations. The first is to define a product life cycle model. The SDLC activities are:

1. Feasibility: Determine if the software has significant contribution to business. It includes market analysis if similar software is in demand in market. Software is evaluated on the basis of cost, schedule and quality.

2. Requirements are determined such as functional properties desired by users, system requirements such as availability, performance and safety, establishing set of objectives the system should meet, characteristics that the system should not exhibit. Such requirements are obtained by various methods such as interviews, communication with stake holders, scenario discussions, use cases and ethnography. These requirements are then verified and tested.

3. Project Planning, cost analysis, scheduling, quality assurance plans are made 4. Designing i.e. Architectural design, Interface design and detailed design5. Implementation includes writing the code for the project as per the designs and plan6. Testing ensures accuracy and reliability7. Delivery, Installation, Training, Help Desk8. Maintenance, software configuration management.

Another view of SDLC emphasizes the milestone, documents and reviews throughout product development. It is difficult for project managers to assess progress or anticipate problems. Establishing milestones, improves product visibility. The following are the milestones for the project.

1. Feasibility report 2. System definition, project plan3. Software requirement specification, Preliminary user manual4. Architectural design document5. Detailed design document6. Software verification plan7. Product Schedule8. Software test plan, Acceptance test9. Software quality assurance plan10. User manual11. Source code12. Test results13. Defect report

Page 13: Introduction to software_engineering

Every software engineering organization should describe a unique set of framework activities for the software process it adopts. Various models have been developed over the years to accommodate these activities.

Models for Software Development

Evolutionary models

1. Waterfall Model suggests a systematic sequential approach to software development that begins with customer specification of requirements. The principle stages of the model map onto fundamental development activities.

a. Requirement Analysis and definitionb. System and software designc. Implementation and unit testingd. Integration and system testinge. Operation and maintenance

Page 14: Introduction to software_engineering

The verification at each stage ensures that the output is consistent with its input and overall requirement of the system. These outputs are often called work products and can be listed as:

a. Requirements documents

b. Project plan

c. Design documents

d. Test plan and test reports

e. Final code

f. Software manuals (e.g. user, installation, etc)

Advantages

1. Simple method with clear steps

2. Easy to administer as it is systematic

Page 15: Introduction to software_engineering

3. Verification at each stage ensures early detection of errors / misunderstanding

4. Documentation helps in future maintenance and revisions

Disadvantage

1. Unchanging requirements are not realistic

2. Document driven process

3. Change adaptability is very slow

2. Incremental Model: Customer identifies the services to be provided. The delivery increments are then defined, with each increment providing a sub-set of the system functionality. Once the system increments for the services have been identified, the requirements to be delivered in the first increment are defined in detail and the increment is developed.

3. Prototyping: First a working prototype of the software is developed instead of developing the actual software. The developers use this prototype to refine the requirements and prepare final specification document. After the finalization of SRS document, the prototype is discarded and actual system is then developed using the waterfall approach.

Define outline requirement

Assign requirements to increments

Design System Architecture

Develop System increment

Validate Increment

Integrate Increment

Validate System

Final System

Page 16: Introduction to software_engineering

There are 2 types of prototypes; throw-away, where the initial prototype is discarded after the requirements are defined and the evolutionary prototype, where the system is built further on the prototype itself. A prototype is built for those requirements which are critical for the project and are not understood well. If the number of requirements which need clarification is more, then a working prototype is built for them. The importance or criticality of such requirements is also a significant factor in determining the need of a prototype.

Advantages of Prototyping

1. Users are actively involved in the development2. It provides a better system to users, as users have natural tendency to change their mind in specifying requirements and this method of developing systems supports this user tendency.

3. Since in this methodology a working model of the system is provided, the users get a better understanding of the system being developed.

4. Errors can be detected much earlier as the system is mode side by side.

5. Quicker user feedback is available leading to better solutions.

Requirements

Quick Design / Prototype

Implement

Customer Evaluation

Design

Implementation and Unit Testing

Integration and System Testing

Operation and Maintenance

Refinement of Requirements as per

suggestions

Page 17: Introduction to software_engineering

Disadvantages

1. Leads to implementing and then repairing way of building systems.2. Practically, this methodology may increase the complexity of the system as scope of the system may expand beyond original plans.

4. Spiral Model: Boehm tried to incorporate the ‘project risk’ factor into a life cycle model. Each phase is split roughly into four sections namely planning, risk analysis, development and assessment. There are 4 phases namely feasibility, requirements analysis, design and coding and testing.

The development spiral consists of four quadrants as shown in the figure aboveThe first step in each phase is to identify the objective, alternatives and constraints of that phase. The next stage involves identifying the best alternative, by comparing all and performing risk analysis. One

Page 18: Introduction to software_engineering

the alternative is chose, prototypes are built using simulation and benchmarks. Each phase is completed with a review by the people concerned with the project.

Specialized process models

1. Extreme programming includes creating a set of stories and assigning their priority. The commitment defines the order for development. The objects are organized for development. Designing occurs both after and before programming, in the form of design and refactoring. Programming happens in the form of pain programming where two people work together at one workstation. Writing test cases before starting the coding is a key feature of extreme programming. Acceptance testing is followed by system testing.

2. Component-Based Development uses commercial-off-the-shelf (COTS) software components.3. Unified Process is a use-case driven, architecture centric, iterative and incremental software

process.4. Dynamic Systems Development Method (DSDM) suggests an iterative software process. After

the feasibility study follows the business study that establishes the functional and information requirements for the application. The iteration steps include Functional model iteration which creates a prototype. New requirements might be generated through the prototype, by the user. Subsequently or simultaneously designs are built or rebuilt. Implementation iteration places the latest software increments.

5. Feature driven development emphasizes project management guidelines and techniques. The processes defined for such development are to develop an overall model, build a feature list, plan by feature, design by feature, build by feature..

Process improvement

Process improvement is about understanding existing processes and introducing process changes to improve product quality reduce costs or accelerate schedules. Most process improvement work so far has focused on defect reduction. This reflects the increasing attention paid by industry to quality. However, other process attributes can also be the focus of improvement. Feedback is important for process improvement to initiate.

Why is it difficult to improve a software process?

1. Not enough time: Developers, because of unrealistic schedules are left with no time to explore problems of development and find solutions.

2. Lack of knowledge: many developers are not aware of best practices

Page 19: Introduction to software_engineering

3. Wrong motivation: The basic motivation should be to eradicate current difficulties and not just to achieve a higher CMM level.

4. Insufficient commitment

Process

Improvement

Begins Improved future state

Do not quit here

Learning curve

Time

Process improvement stages

Process measurement

Attributes of the current process are measured. These are a baseline for assessing improvements.

Process analysis

The current process is assessed and bottlenecks and weaknesses are identified.

Process change

Changes to the process that have been identified during the analysis are introduced.

Productivit

Page 20: Introduction to software_engineering

Process choice

Process used should depend on type of product which is being developed

• For large systems, management is usually the principal problem so you need a strictly managed process;

• For smaller systems, more informality is possible.There is no uniformly applicable process which should be standardised within an organisation

• High costs may be incurred if you force an inappropriate process on a development team;

• Inappropriate methods can also increase costs and lead to reduced quality.

Process analysis and modelling

1. Study an existing process to understand its activities.2. Produce an abstract model of the process. You should normally represent this graphically.

Several different views (e.g. activities, deliverables, etc.) may be required.3. Analyse the model to discover process problems. This involves discussing process activities with

stakeholders and discovering problems and possible process changes.

Process analysis techniques

Published process models and process standards: It is always best to start process analysis with an existing model. People then may extend and change this.

Questionnaires and interviews: Must be carefully designed. Participants may tell you what they think you want to hear.

Ethnographic analysis: Involves assimilating process knowledge by observation. Best for in-depth analysis of process fragments rather than for whole-process understanding.

Process change stages

Improvement identification. Improvement prioritization.

Page 21: Introduction to software_engineering

Process change introduction. Process change training. Change tuning.