Click here to load reader

Lecture 3

  • Upload
    raine

  • View
    29

  • Download
    0

Embed Size (px)

DESCRIPTION

Lecture 3. Scope and necessity of software engineering. Engineering is an engineering approach for software development. We can alternatively view it as a systematic collection of past experience. The experience is arranged in the form of methodologies and guidelines. - PowerPoint PPT Presentation

Citation preview

Introduction

Lecture 3Scope and necessity of software engineering

Engineering is an engineering approach for software development. We can alternatively view it as a systematic collection of past experience. The experience is arranged in the form of methodologies and guidelines. A small program can be written without using software engineering principles. But if one wants to develop a large software product, then software engineering principles are MUST to achieve a good quality software cost effectively. Without using software engineering principles it would be difficult to develop large programs. A program of size 1,000 lines of code has some complexity. But a program with 10,000 LOC is not just 10 times more difficult to develop, but may as well turn out to be 100 times more difficult unless software engineering principles are used. In such situations software engineering techniques come to rescue. Software engineering helps to reduce the programming complexity. Software engineering principles use two important techniques to reduce problem complexity. Abstraction and DecompositionScope and necessity of software engineering

AbstractionThe principle of abstraction implies that a problem can be simplified by omitting irrelevant details. In other words, the main purpose of abstraction is to consider only those aspects of the problem that are relevant for certain purpose and suppress other aspects that are not relevant for the given purpose. Once the simpler problem is solved, then the omitted details can be taken into consideration to solve the next lower level abstraction, and so on. Abstraction is a powerful way of reducing the complexity of the problem.Abstraction

DecompositionIn this technique, a complex problem is divided into several smaller problems and then the smaller problems are solved one by one. However, in this technique any random decomposition of a problem into smaller parts will not help. The problem has to be decomposed such that each component of the decomposed problem can be solved independently and then the solution of the different components can be combined to get the full solution. A good decomposition of a problem should minimize interactions among various components. If the different subcomponents are interrelated, then the different components cannot be solved separately and the desired reduction in complexity will not be realized.Decomposition

Program vs. Software product Programs are developed by individuals for their personal use. They are therefore, small in size and have limited functionality but software products are extremely large such as Windows 7.In case of a program, the programmer himself may or may not be sole user but on the other hand, in case of a software product, most users are not involved with the development. For a program, the user interface may not be very important, because the programmer is the sole user. On the other hand, for a software product, user interface must be carefully designed and implemented because developers of that product and users of that product are totally different. In case of a program, very little documentation is expected, but a software product must be well documented. A program can be developed according to the programmers individual style of development, but a software product must be developed using the accepted software engineering principles. Future of Software EngineeringMicrosoft, IBM Any Commercial Software App DevelopmentApple StoreAndroid Two TierSoftware Engineering

SoftwareSOFTWARE ENGINEERING10Q : If you have to write a 10,000 line program in C to solve a problem, how long will it take?Answers: generally range from 2-4 monthsLet us analyze the productivityProductivity = output/input resourcesIn SW output is considered as LOCInput resources is effort - person months; overhead cost modeled in rate for person monthThough not perfect, some productivity measure is needed, as project has to keep it highSoftware SOFTWARE ENGINEERING11The productivity is 2.5-5 KLOC/PMQ: What is the productivity in a typical commercial SW organization ?A: Between 100 to 1000 LOC/PMQ: Why is it low, when your productivity is so high? (people like you work in the industry)A: What the student is building and what the industry builds are two different thingsSoftwareSOFTWARE ENGINEERING12In a univ a student system is built while the commercial org builds industrial strength swWhat is the difference between a student program and industrial strength sw for the same problem? Software (IEEE): collection of programs, procedures, rules, and associated documentation and data

SoftwareSOFTWARE ENGINEERING13StudentDeveloper is the userbugs are tolerableUI not importantNo documentationIndustrial StrengthOthers are the usersbugs not toleratedUI v. imp. issueDocuments needed for the user as well as for the organization and the projectSoftwareSOFTWARE ENGINEERING14StudentSW not in critical useReliability, robustness not importantNo investmentDont care about portabilityIndustrial StrengthSupports important functions / businessReliability , robustness are very importantHeavy investmentPortability is a key issue here

Industrial strength softwareSOFTWARE ENGINEERING15Student programs for a problem & industrial strength software are two different thingsKey difference is in quality (including usability, reliability, portability, etc.)Brooks thumb-rule: Industrial strength sw costs 10 time more than student swIn this course, software means industrial strength softwareThis software has some characteristicsIs ExpensiveSOFTWARE ENGINEERING16Let us look at costs involvedProductivity = Appx 1000 LOC/PMCost = $3K to $10K/PMCost per LOC = $5 to $15I.e, each line of delivered code costs many $sA simple application for a business may have 20KLOC to 50KLOCCost = $100K to $2.25MillionCan easily run on $10K-$20K hardwareSo HW costs in an IT solution are small as compared to SW costs.Requires tight Schedule17Business requirements today demand short delivery times for softwareIn the past, software products have often failed to be completed in timeAlong with cost, cycle time is a fundamental driving force18 That quality, cost, and schedule are the main forces that drive a (industrial strength)software project. How cost and productivity are defined and measured for such a project, and how quality of software is characterized and measured. That large scale and change are important attributes of the problem domain and solution approaches have to handle them.Cost, Schedule and QualityProductivity for cost and scheduleSOFTWARE ENGINEERING19An industrial strength software project is driven by cost and scheduleBoth can be modeled by productivity, measured in terms of output per unit effort (e.g. LOC per person month)Higher productivity leads to lower costHigher productivity leads to lower cycle timeHence, for projects (to deliver software), quality and productivity are basic driversQualitySOFTWARE ENGINEERING20Along with productivity, quality is the other major driving factorDeveloping high Q sw is a basic goalQuality of sw is harder to defineQuality ISO standardSOFTWARE ENGINEERING21

Quality ISO stdSOFTWARE ENGINEERING22ISO std has six attributesFunctionality The capability to provide functions which meet stated and implied needs when the software is used.ReliabilityThe capability to provide failure-free service.UsabilityThe capability to be understood, learned, and used.EfficiencyThe capability to provide appropriate performance relative to the amount of resources used.Quality ISO stdSOFTWARE ENGINEERING23ISO std has six attributesMaintainabilityThe capability to be modified for purposes of making corrections, improvements, or adaptation.PortabilityThe capability to be adapted for different specified environments without applying actions or means other than those provided for this purpose in the product.QualitySOFTWARE ENGINEERING24Multiple dimensions mean that not easy to reduce Q to a single numberConcept of Q is project specificFor some reliability is most importantFor others usability may be more importantReliability is generally considered the main Q criterionQualitySOFTWARE ENGINEERING25Reliability => Probability of failure hard to measureapproximated by no. of defects in softwareTo normalize, Quality = Defect densityQuality = No. of defects delivered / SizeDefects delivered - approximated with no. of defects found in operationCurrent practices: less than 1 def/KLOCWhat is a defect? Project specific!Quality MaintainabilitySOFTWARE ENGINEERING26Once sw delivered, it enters the maintenance phase, in whichResidual errors are fixed this is corrective maintenanceUpgrades and environment changes are done this is adaptive maintenanceMaintenance can consume more effort than development over the life of the software (can even be 20:80 ratio!)Hence maintainability is another quality attribute of great interestQuality and ProductivitySOFTWARE ENGINEERING27Hence, quality and productivity (Q&P) are the basic drivers in a sw projectThe aim of most methodologies is to deliver software with a high Q&PBesides the need to achieve high Q&P there are some other needsChangeSOFTWARE ENGINEERING28Only constant in business is change!Requirements change, even while the project is in progressIn a project, up to 40% of development effort may go in implementing changes

Practices used for developing software must accommodate changeScaleSOFTWARE ENGINEERING29Most industrial strength software tend to be large and complexMethods for solving small problems do not often scale up for large problemsTwo clear dimensions in a projectengineeringproject managementFor small, both can be done informally, for large both have to be formalized ScaleSOFTWARE ENGINEERING30

ScaleSOFTWARE ENGINEERING31An illustration of issue of scale is counting the number of people in a room vs taking a censusBoth are counting problemsMethods used in first not useful for censusFor large scale counting problem, must use different techniques and modelsManagement will become criticalScale: ExamplesGcc980KLOCC, C++, yaccPerl320 KLOCC, perl, shAppache100 KLOCC, shLinux30,000 KLOCC, c++Windows XP40,000 KLOCC, C++SOFTWARE ENGINEERING32The computer program Yacc is a parser generator developed by Stephen C. Johnson at AT&T for the Unix operating system in 1970. The name is an acronym for "Yet Another Compiler Compiler." It generates a parser (the part of a compiler that tries to make syntactic sense of the source code) based on an analytic grammar written in a notation similar to BNFThe GNU Compiler Collection includes front ends forC,C++, Objective-C, Fortran,Java, Ada, and Go, as well as libraries for these languages (libstdc++, libgcj,...). GCC was originally written as the compiler for the GNU operating system.Perl is a high-level, general-purpose, interpreted, dynamic programming language. Linux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of Linux is the Linux kernel, an operating system kernel first released 5 October 1991 by Linus Torvalds.[11][12]32ScaleSOFTWARE ENGINEERING33As industry strength software tends to be large, hence methods used for building these must be able to scale up

For much of the discussion, we will high Q&P as the basic objectiveSummarySOFTWARE ENGINEERING34The problem domain for SE is industrial strength softwareSE aims to provide methods for systematically developing (industrial strength) softwareBesides developing software the goal is to achieve high quality and productivity (Q&P)Methods used must accommodate changes, and must be able to handle large problems