Post on 13-Jan-2016
transcript
1
Software EngineeringSoftware Engineering
CS 421 / SWE 421 CS 421 / SWE 421 Kinga DobolyiKinga Dobolyi
Why are you taking this course?
Alternatively, why are we teaching this course? Do you need a course in software engineering? How is writing the code for a 211 project
different from software engineering (or is it)? What do you think we will be focusing on in this
class?
What is Software Engineering?What is Software Engineering?
According to Wikipedia: According to Wikipedia: ““Software Software engineeringengineering ( (SESE) is a profession dedicated ) is a profession dedicated
to designing, to designing,
implementing, and implementing, and
modifying software so modifying software so
that it is of that it is of higher qualityhigher quality,,
more more affordableaffordable, ,
maintainablemaintainable, and , and faster faster
to buildto build””
3
4
Why worry about SW Why worry about SW Engineering?Engineering?
Quality issues: History of SW failures from Quality issues: History of SW failures from http://www.wired.com/software/coolapps/news/2005/11/69355
Many more incidents…Many more incidents…
Software is expensive to Software is expensive to maintainmaintain
Maintenance activities consume 70-90% of the Maintenance activities consume 70-90% of the total lifecycle cost of software, summing to over total lifecycle cost of software, summing to over $70 billion per year$70 billion per year
We want to “get it right” the first timeWe want to “get it right” the first time But as we’ll see this is non-trivialBut as we’ll see this is non-trivial
5
6
Why is it so hard?Why is it so hard?
Lots of “parts”. Many more thanLots of “parts”. Many more than
mechanical devicesmechanical devices Dishwasher - 128 partsDishwasher - 128 parts Car - 14,000 partsCar - 14,000 parts Space shuttle - 2.5 million partsSpace shuttle - 2.5 million parts Red Hat Linux 7.1 - 30 million source lines of code (SLOC)Red Hat Linux 7.1 - 30 million source lines of code (SLOC) Mac Office - 30 million SLOCMac Office - 30 million SLOC
Using 70 programmers = 428,000 SLOC / programmerUsing 70 programmers = 428,000 SLOC / programmer But those are big… what about “normal size programs”?But those are big… what about “normal size programs”?
Average programmer SLOC (Source lines of code) / day = 100Average programmer SLOC (Source lines of code) / day = 100 5 days/week * 52 weeks/year = 26,000 SLOC / year5 days/week * 52 weeks/year = 26,000 SLOC / year 15 programmer team = 390,000 SLOC / year15 programmer team = 390,000 SLOC / year
7
Why is it so hard? (continued)Why is it so hard? (continued)
We’re a young field We’re a young field ENIAC/ MARK-I in 1946ENIAC/ MARK-I in 1946 FORTRAN - 1957FORTRAN - 1957
But giant - But giant - As of 2004, the U. S. Bureau of Labor Statistics counts As of 2004, the U. S. Bureau of Labor Statistics counts 760,840 software engineers holding jobs in the U.S.; for comparison, in 760,840 software engineers holding jobs in the U.S.; for comparison, in the U.S. there are some 1.4 million practitioners employed in all other the U.S. there are some 1.4 million practitioners employed in all other engineering disciplines combined.engineering disciplines combined. - - http://en.wikipedia.org/wiki/Software_engineeringhttp://en.wikipedia.org/wiki/Software_engineering
Unanticipated growthUnanticipated growth
Still more art than scienceStill more art than science Everything we do is “new”. (We don’t build the exact same Everything we do is “new”. (We don’t build the exact same
house 30 times.)house 30 times.) Need to have more reproducible results Need to have more reproducible results Need to have more measurementsNeed to have more measurements
8
Why do projects fail?Why do projects fail?Why do projects fail so often?Why do projects fail so often? Unrealistic or unarticulated project goalsUnrealistic or unarticulated project goals Inaccurate estimates of needed resourcesInaccurate estimates of needed resources Badly defined system requirementsBadly defined system requirements Poor reporting of the project's statusPoor reporting of the project's status Unmanaged risksUnmanaged risks Poor communication among customers, developers, and usersPoor communication among customers, developers, and users Use of immature technologyUse of immature technology Inability to handle the project's complexityInability to handle the project's complexity Sloppy development practicesSloppy development practices Poor project managementPoor project management Stakeholder politicsStakeholder politics Commercial pressuresCommercial pressuresList from: http://www.spectrum.ieee.org/sep05/1685List from: http://www.spectrum.ieee.org/sep05/1685
How many of these are caused by technical incompetence in your developers?A.0B.5C.8D.All of them
How many of these are caused by technical incompetence in your developers?A.0B.5C.8D.All of them
Question:Question:
9
How do we fix it?How do we fix it?
Need to have more Need to have more reproducible resultsreproducible results Standard processes / procedures to produce good Standard processes / procedures to produce good
outcomesoutcomes Design patternsDesign patterns Object oriented programming (reuse)Object oriented programming (reuse)
More More measurementsmeasurements of both the software and the process of both the software and the process More More testingtesting at all stages of development at all stages of development By creating a better understanding of the By creating a better understanding of the processprocess we use we use
to create software, we’ll create better software faster.to create software, we’ll create better software faster.
“Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software.” - IEEE Standard Glossary of Software Engineering Terminology
10
Software Engineering: A Practitioner’s Software Engineering: A Practitioner’s Approach, 7/eApproach, 7/e
Chapter 1Chapter 1Software and Software Software and Software
EngineeringEngineering
copyright © 1996, 2001, 2005
R.S. Pressman & Associates, Inc.
For University Use OnlyMay be reproduced ONLY for student use at the university level
when used in conjunction with Software Engineering: A Practitioner's Approach.Any other reproduction or use is expressly prohibited.
12
Why is software different thanWhy is software different thanhardware? Or manufacturing?hardware? Or manufacturing?
software is engineered software doesn’t wear out most software is still custom built software is complex
13
Wear vs. Wear vs. DeteriorationDeterioration
idealized curve
change
actual curve
Failurerate
Time
increased failurerate due to side effects
14
There are many types of There are many types of applicationsapplications system software - system software - OS, file management, networking, drivers, etc…OS, file management, networking, drivers, etc…
application software - application software - data processing, point of sale, other data processing, point of sale, other business functions…business functions…
engineering/scientific software - engineering/scientific software - CAD, stress analysis, CAD, stress analysis, orbital mechanicsorbital mechanics
embedded software - embedded software - microwave oven keypad, automobile control, microwave oven keypad, automobile control, cell phone software, etc…cell phone software, etc…
product-line software - product-line software - word processing, inventory control, etc…word processing, inventory control, etc…
WebApps (Web applications) - WebApps (Web applications) - many different things todaymany different things today
AI software - AI software - robotics, data mining, expert systemsrobotics, data mining, expert systems
15
Legacy SoftwareLegacy Software
software must be software must be adaptedadapted to meet the needs of new to meet the needs of new computing environments or technology.computing environments or technology.
software must be software must be enhancedenhanced to implement new business to implement new business requirements.requirements.
software must be software must be extended to make it interoperableextended to make it interoperable with with other more modern systems or databases.other more modern systems or databases.
software must be software must be re-architectedre-architected to make it viable within a to make it viable within a network environmentnetwork environment.
Why must it change?
16
Software – Software – A.True or A.True or B.False?B.False?
1.1. If we get behind schedule we can add more If we get behind schedule we can add more programmers to catch upprogrammers to catch up
2.2. A general statement of objectives is sufficient to begin A general statement of objectives is sufficient to begin writing programs - we can fill in the details laterwriting programs - we can fill in the details later
3.3. Project requirements change, but change can be easily Project requirements change, but change can be easily accommodated because software is flexibleaccommodated because software is flexible
4.4. Once we write the program and get it working our job Once we write the program and get it working our job is doneis done
5.5. Software engineering will make us create unnecessary Software engineering will make us create unnecessary documentation and will invariably slow us downdocumentation and will invariably slow us down
17
Software MythsSoftware Myths
Affect managers, customers (and other non-Affect managers, customers (and other non-technical stakeholders) and practitionerstechnical stakeholders) and practitioners
Are believable because they often have elements Are believable because they often have elements of truth, of truth,
but …but … Invariably lead to bad decisions, Invariably lead to bad decisions,
therefore …therefore … Insist on reality as you navigate your way Insist on reality as you navigate your way
through software engineeringthrough software engineeringOne of the goals in this class is to learn you
how to determine what reality is!
Fixing the problemFixing the problem
Software engineering!Software engineering! Software engineering is really Software engineering is really
just a set of ideas and tools to just a set of ideas and tools to
use (when it makes sense) to use (when it makes sense) to
give you a higher likelihood of give you a higher likelihood of
success on a software project.success on a software project.
Will your project fail if you don’t use any software Will your project fail if you don’t use any software engineering techniques? No…. but you have a better engineering techniques? No…. but you have a better chance at success if you do.chance at success if you do.
18
19
A Generic FrameworkA Generic Framework CommunicationCommunication
Heavy collaboration with the customer, other stakeholders and Heavy collaboration with the customer, other stakeholders and encompasses requirements gathering and related activitiesencompasses requirements gathering and related activities
PlanningPlanning Establish a plan for the work. Technical task to be conducted, risks, Establish a plan for the work. Technical task to be conducted, risks,
needed resources, work products to be created, and a scheduleneeded resources, work products to be created, and a schedule ModelingModeling
Creation of models to allow the customer and the developer to better Creation of models to allow the customer and the developer to better understand the requirements and design that will achieve those understand the requirements and design that will achieve those requirementsrequirements
ConstructionConstruction Combines code generation and testing required to uncover errors in the Combines code generation and testing required to uncover errors in the
codecode DeploymentDeployment
The software (as a complete entity or partially complete increment) is The software (as a complete entity or partially complete increment) is delivered to the customer who evaluates it and provides feedback.delivered to the customer who evaluates it and provides feedback.
20
Framework ActivitiesFramework Activities
CommunicationCommunication PlanningPlanning ModelingModeling
Analysis of requirementsAnalysis of requirements DesignDesign
ConstructionConstruction Code generationCode generation TestingTesting
DeploymentDeployment
What are some artifacts (work tasks, work products, milestones & deliverables, QA checkpoints) of each activity? What tools may help support them?
What are some artifacts (work tasks, work products, milestones & deliverables, QA checkpoints) of each activity? What tools may help support them?
21
Umbrella ActivitiesUmbrella Activities Software project management Formal technical reviews Software quality assurance Software configuration management Work product preparation and
production Reusability management Measurement Risk management
23
The Process Model:The Process Model:AdaptabilityAdaptability
The framework activities will The framework activities will alwaysalways be be applied on applied on everyevery project ... BUT project ... BUT
The tasks (and degree of rigor) for each The tasks (and degree of rigor) for each activity will vary based on:activity will vary based on: the type of project the type of project characteristics of the projectcharacteristics of the project common sense judgment; common sense judgment;
concurrence of the project teamconcurrence of the project team
QuestionQuestion
Pick any one of the project types below and tell Pick any one of the project types below and tell me which process activity would be emphasized me which process activity would be emphasized or deemphasized and whyor deemphasized and why
24
Project Types:Project Types:- 1.Space Shuttle control system1.Space Shuttle control system- 2.Web-based calendar2.Web-based calendar- 3.Embedded controller in your 3.Embedded controller in your refrigeratorrefrigerator- 4.Automatic “daily fortune” text-4.Automatic “daily fortune” text-messengermessenger
Framework ActivitiesFramework Activities CommunicationCommunication PlanningPlanning ModelingModeling
Analysis of requirementsAnalysis of requirements DesignDesign
ConstructionConstruction Code generationCode generation TestingTesting
DeploymentDeployment
How to solve any problemHow to solve any problem
Polya 1945 Polya 1945 Understand the problemUnderstand the problem Plan a solutionPlan a solution Carry out the planCarry out the plan Examine the result for accuracyExamine the result for accuracy
Do these agree with our basic framework? Do these agree with our basic framework? communication, planning, modeling, construction communication, planning, modeling, construction deployment? deployment?
25
How do we improve our How do we improve our performance?performance?
We want to “provide guidance for developing or We want to “provide guidance for developing or improving processes that meet the business improving processes that meet the business goals of an organization”goals of an organization”
Capability Maturity Model IntegrationCapability Maturity Model Integration (CMMI) is a (CMMI) is a process improvement approach that approach that helps organizations improve their performancehelps organizations improve their performance
26
27
The CMMIThe CMMI CMMI defines characteristics shown to achieve CMMI defines characteristics shown to achieve
good results.good results. The CMMI defines each process area in terms of The CMMI defines each process area in terms of
“specific goals” and the “specific practices” “specific goals” and the “specific practices” required to achieve these goals.required to achieve these goals.
Specific goalsSpecific goals establish the characteristics that establish the characteristics that must exist if the activities implied by a process must exist if the activities implied by a process area are to be effective. area are to be effective.
Specific practicesSpecific practices refine a goal into a set of refine a goal into a set of process-related activities.process-related activities.
PP - project planningREQM - Requirements MgmtMA - Measurement and AnalysisCM - Configuration MgmtPPQA - Process and Product QA
28
The CMMIThe CMMI
The Waterfall ModelThe Waterfall Model
Do all process steps in the following order (this is Do all process steps in the following order (this is generally thought of as the most basic model)generally thought of as the most basic model)
31
Communication Planning
ModelingConstruction
Deployment analysis design code
test
project initiation requirement gathering estimating
scheduling tracking
delivery support feedback
1998, the Standish Group analyzed 23,000 projects to determine failure 1998, the Standish Group analyzed 23,000 projects to determine failure factors. The top reasons for project failure, according to the report, factors. The top reasons for project failure, according to the report, were associated with waterfall practices. were associated with waterfall practices.
- http://www2.umassd.edu/SWPI/xp/articles/r6047.pdf- http://www2.umassd.edu/SWPI/xp/articles/r6047.pdf
Different families of modelsDifferent families of models
32
Prescriptive Agile
Prescriptive Models 1970->Present
-Waterfall (1970)-Evolutionary (1975)-Incremental (1975)-Spiral (1988)-RAD (1991)
Agile Models 2001->Present
- eXtreme Programming (1999)- SCRUM (1990s)- DSDM (1997)- Crystal (2001)
All dates are approximate based on publications
Different families of modelsDifferent families of models
33
Prescriptive Agile
Goal: Higher Quality Software
Philosophy:•Bring order to chaos•Provide repeatability/consistency•Provide ability to control•Provide ability to coordinate teams
Goal: Higher Quality Software
Philosophy:•Individuals and interaction over process and tools•Working software over large documentation•Customer collaboration over contract negotiation•Responding to change over following a plan
Which is probably better for large teams? A. Prescriptive B. Agile C. Same
Which is probably better for a web application?
Which is probably better for Mars rover control system?
Which is produces better software?
ProjectProject
Team decisions due tomorrow/today (depending Team decisions due tomorrow/today (depending on section)on section) Post to blackboard a document containing your team Post to blackboard a document containing your team
name, and the names and emails of the members of name, and the names and emails of the members of your teamyour team
4-5 students per team4-5 students per team Turn in your team interview sheets (handed out Sept Turn in your team interview sheets (handed out Sept
1/2) in class, if you are not part of a team. If I didn’t get 1/2) in class, if you are not part of a team. If I didn’t get an email from your team, I will use these sheets for the an email from your team, I will use these sheets for the rest of you to assign teams for you.rest of you to assign teams for you.
I will then set up accounts for teams on XP-dev; you will I will then set up accounts for teams on XP-dev; you will be emailed informationbe emailed information
34
HomeworkHomework
Pressman ch 1 exercises: 5, 8, 10Pressman ch 1 exercises: 5, 8, 10 Due next Thursday by 10pmDue next Thursday by 10pm Submit on blackboardSubmit on blackboard
35