Transcript

SE-381 Software Engineering

BEIT-V

Lecture no. 3

(Basis for Software Process)

Recap

• Definitions of Sw and SE• Student’s and Industrial Strength Software• Mini Test

– Retention Exercise– Comprehension Exercise

• Goal

– Results• Students Profiles’ Submission

What is common between the first two clips?_____________________________________________________________

______________In Grocery Store Clip

What two stores are compared? ______ and ________QR Code is to __________________________________TeSCo and E-Mart are the names for the same store (Yes/No) Customers of E-Mart increased by 130% after this online shopping

campaign (Y/N) ____Online Shopping Compaign

Exploited Koreans 2 habits •____________________________________•____________________________________

Exploited 3 widely available technologies•__________________________________________•__________________________________________•__________________________________________

How many customers visited the store online during the compaign? _______Did the store became number one in off-line shopping (Y/N)? __________

At which Institute, the Four Rotor Helicopter project was carried out? __________________________

What Sw/Hw Project you can figure out from the first three clips _____________________________ __________________________________________________________

Answers to Mini Test

From Google Earth

North Tweaked

What is in Today’s LectureCovered till now

– Definitions– Students’ Sw projects and Industrial Strength Sw

• Software Myths – Roger S Pressman (2005)

• Problem Domain– Software is Expensive, – Late and Unreliable, – Maintenance and Rework

• Solution Domain – Software Engineering Challenges – Scale, – Quality & Productivity, – Consistency and Repeatability, – Change

• Software Engineering Approach– Phased Development Process, – Managing the Process to get quality software

Software Myths (‘Tonies or Ponies’)

• Management Myths ( Also see www.mhhe.com/pressman )

– We already have a book that’s full of standards and procedures for building software. Won’t that provide my people with everything they need to know?

– If we get behind schedule, we can add more programmers and catch up

“Adding people to a late software project makes it later” – F Brooks (1975)

– If I decide to outsource the software project to a 3rd party, I can just relax and let that firm build it.

No substitute to misinformation

• Customer Myths– A general statement of objectives is sufficient to begin writing

programs – we can fill the details later• More information you have at start better equipped you are.

– Project requirements continually change, but change can be easily accommodated because software is (not physical and) flexible

• Practitioner’s Myths– Once we write the program and get it to work, our job is done

• This is the start, not the end, 60% - 80% of effort will be expended after the program is deployed. For every $ spent on development needs 2 $s for its maintenance

– Until I get the program running, I have no way of assessing its quality• Quality is whole some, of each part, so quality filters need to

be inserted in the process for various phases of Sw Development

– The only deliverable work product for a successful project is the working program• Documentation, data, rule base etc are all parts of software

– Software Engineering will make us create voluminous and unnecessary documentation and will invariably slow us down.• Will make things easy, and lead to quicker development and

easy and cost effective maintenance

Software is Expensive

• Bell 2005, quotes that US$ 500 B is spent annually for software purchase and development in USA and it is 1 % of her annual GNP (Gross National Product)

• Globally US$ 1000 B is spent on Software development

• Many countries exports like our neighbor’s have significant fraction coming from Sw

• Pakistan currently generates 1.5 to 2 B US$ annually from Sw exports – Ref to Mr Saleem Ghori, CEO, NetSol, 2009

Pak Software Exports

• Daily Express, Islamabad, dated Feb 21, 2011 quoted Federal Bureau of Statistics that for period of July to December 2010– Sw exports amounted to Rs 6.15 Billions, with an

increase of 13.13% from its last year figure– Overseas Sw Consultancy services Rs 1.3 B– Computers Repair and support Rs 0.05 B– Computer related Auxiliary Services Rs 1.3B

• Total sw exports were Rs 8.8 B with an increase of 8.37 % from previous year

Software is Expensive

Program Size

Program Size

C, C++40,000 KLOCWindows XP

C, c++30,000 KLOCLinux

C, sh100 KLOCAppache

C, perl, sh320 KLOCPerl

C, C++, yacc980KLOCGcc

C, C++40,000 KLOCWindows XP

C, c++30,000 KLOCLinux

C, sh100 KLOCAppache

C, perl, sh320 KLOCPerl

C, C++, yacc980KLOCGcc

Compute the Cost of a Software

A software of size say 100 KLOC, like Apache web server, is to be developed by a team of professional software developers, having an average productivity of 150 LOC per person-month, and drawing an average salary of Rs 30,000/- a month.

Program Size = 100 KLOC

Average Productivity = 150 LOC / Person-Month

Duration = Program Size / Productivity

= 100 KLOC/150 LOC/Per-Mon

= 2/3 K Per-Mon

Rate = 30 K Rs / Per-Mon

Total Cost = Duration * Rate

= 2/3 K Per-Mon * 30 K Rs / Per-Mon

= 20 K * K Rs = 20 M Rs

= Rs 20,000,000

Software – Problems and Prospects

Software is Open ended, complex and key mechanism in providing the requisite functionality of the system. It is of huge size, needs 000s of people and millions of $s of investment to develop.

The perceived problems in Sw development and goals the Sw Development needs to achieve are:

• Meeting Users’ Needs• Low Cost of Production• High Performance• Portability – it works at various envisaged

platforms• Low Cost of Maintenance• High Reliability• Scalability• Delivery on Time

– Till to-date each of the above goals is partially achieved, so it stays as a Sw dev problem. SE seeks to provide the techniques to resolve these problems i.e. to achieve these goals.

Software Engineering Challenges

• Scale

• Quality and Productivity

• Consistency and Repeatability• Change

Software Engineering Approach

High Quality and Productivity (Q&P) is the basic objective of Software Engineering. The main three forces governing Q&P are:

Software Process

• Software Process is the way we produce software, it starts with the concept exploration and ends when the product is decommissioned. During this product goes through a series of phases like

Requirements, Specifications, Planning, Design, Implementation, Testing, Integration, Maintenance, Documentation and finally the Retirement

Quality Product

• For a quality software product, both the quality of product itself and quality of software process is important.

• The cost of error recovery in the later phases of software is many times more than the earlier phases, so higher attention should be paid in the earlier phases, and these should be made error-free.

Software Processes

– Software Process is comprised of a number of processes working in Series and in parallel to achieve the software product

– These processes can be Software Development Process, Business Process, Training Process, Human Resource Management or Social Process, Quality Assurance Process, Software Monitoring and Control Process, Inspection Process and Software Management Process etc

– Process is execution of a number of steps in a specified order

Process, Project and Product

– Process is a series of steps or activities conducted in an orderly manner

– Project is execution of a Process, to achieve or develop a product. It is an instance of Process executed in specific time frame to get the product that meets the needs of a user

– Product is the outcome of a successfully executed project

– Process can be initiated on a number of Projects, and a project can yield a number of Products

– Process works as Check List and its pre-defined stages are executed in the pre-specified order

– The main objective of Software Engineering is to develop Reliable, High Quality Software that can be built within price and time budget, hence we need to focus on Software Related Processes and more precisely on Software Development Process

Software Process

• Software should be – Reliable (high quality)– Affordable (Cheap, low cost)– Small Time Cycle (so that the software could

be developed speedily)

• For better management and control software process should be– Phased i.e. consist of multiple stages

Software Development Process

Software Development Process

Requirements Software Product

In fact, this SD Process consists of:

Analysis DesignImplementa-

tionDeployment

And each one of these is further divided into sub phases, like

Analysis Requirements Analysis Specification

Design ArchitecturalDesign

Lower Level orDetailed Design

Implement-ation

Coding

Testing Unit TestingSub-system

Testing

SystemTesting

Acceptance Tst

=

=

=

=

Higher LevelDesign

Software Process

• Software Process is the way we produce software, it starts with the concept exploration and ends when the product is decommissioned or retired. During this life, the product goes through a series of phases like

Requirements, Specifications, Planning, Design, Implementation, Testing, Integration, Maintenance, Documentation and finally the Retirement

Software Development Life Cycle

• Life Cycle• All what is done on a product from its conception to its

physical realization and retirement is called its Life Cycle

• Software Development Life Cycle Model• It is a description of all the stages/phases that should be

performed when building a software product. Number of

stages differ from author to author, from 4 to 10 or even

more, but in general the Classical Software Development

Life Cycle model has eight (highlighted) stages

Different Phases of SDLC

Authors partition the SDLC activities differently, Eg[Jal98] mentions the following 4 stages

• Requirement Analysis• Design (further divided into System Design & Detailed Des, or Jal05

mentions them as Architectural Des, High Level Des and Low Level Des)• Coding and• Testing (including Unit Testing, Integration Testing and Acceptance Testing)

– Towards over-all Effort/Cost, each one of them contributed 10%, 20%, 30% and 40% respectively, and

– Error distribution among the first three phases was 20%, 30% and 50% respectively

Software Development Life Cycle (SDLC) Stage or Phases

1. Requirements Phase2. Analysis (Specification) Phase3. Planning Phase4. Design Phase

a. Architectural Designb. High Level Designc. Detailed Design

5. Implementation Phase 6. Integration Phase 7. Testing8. Documentation9. Post delivery Maintenance Phase

Corrective, Perfective, Adaptive

10. Retirement Phase

Comparative Effort Spent in Different Stages of SDLC

Different types of MaintenancePost-delivery Maintenance

• Done after deployment at the clients premises

This is of two types:

Corrective Maintenance or Software RepairRemoval of Residual faults leaving the Specifications unchanged

Enhancement or Software UpdateConsists of changes to specification and implementation of those changes. It further consists of two types:

Perfective MaintenanceThe changes which client thinks will improve the effectiveness of the product, such as Additional Functionality, Decreased response time, or Optimal memory usage

Adaptive MaintenanceChanges made in response to changes in the environment in which the product operates, such as, a new hardware, OS or new government regulations or conformance to new standard like UNICODE

Stage-wise Cost of SD

Relative Costs of the Stages of SD

Cost of Error Recovery / Correction

• The cost of error recovery in the later phases of software is many times more than the earlier phases, so higher attention should be paid in the earlier phases, and respective stages/phases errors be identified and eradicated, making these phases error-free.

Stage-wise Number of Errors

Cost of Fixing of Errors

Reading Assignment

1. Ch-1 Problems and Prospects, pp 3-22From Douglas Bell (2005); Software Engineering for

Students; Pearson Education Limited

2. Ch – 1 Introduction, pp 1-20 + Ch-2 From Pankaj Jalote (2005); An Integrated Approach to

Software Engineering, 3rd Edition, Narosa Publishing House, New Delhi

3. Ch – 1 Introduction to Software Engineering, pp 33-50

From Roger S Pressman (2005); Software Engineering – A Practitioner’s Approach, 6th Edition, McGraw Hill Higher Education, Boston