Software Engineering CS305, Autumn 2020 Nikhil Hegde, IIT Dharwad - - PowerPoint PPT Presentation

software engineering
SMART_READER_LITE
LIVE PREVIEW

Software Engineering CS305, Autumn 2020 Nikhil Hegde, IIT Dharwad - - PowerPoint PPT Presentation

Software Engineering CS305, Autumn 2020 Nikhil Hegde, IIT Dharwad 1 Software Engineering Software + Engineering What is Software? An abstraction that: Defines a set of computations Becomes concrete/useful only in the presence of


slide-1
SLIDE 1

Software Engineering

CS305, Autumn 2020

Nikhil Hegde, IIT Dharwad 1

slide-2
SLIDE 2

Software Engineering

Software + Engineering

What is Software?

– An abstraction that:

  • Defines a set of computations
  • Becomes concrete/useful only in the presence of hardware and

context (e.g. human activity)

What is Engineering?

– Traditionally: “use of scientific principles to design and build machines, structures, and other items” - Wikipedia / Oxford dictionary

Nikhil Hegde, IIT Dharwad 2

slide-3
SLIDE 3

Why Software Engineering?

  • Why is it so difficult to build software?
  • Why is it so difficult to build good software?

Software engineering is a fundamental discipline

Nikhil Hegde, IIT Dharwad 3

slide-4
SLIDE 4

Software Engineering

  • Systematic study of:

– Methodology – Techniques – Tools to build high quality software that is correct and is built in a given time and price budget

Nikhil Hegde, IIT Dharwad 4

slide-5
SLIDE 5

Lines of Code in Software

Lines of code: 101 102 103 104 105 106………………...

Individual effort Software Engineering

Nikhil Hegde, IIT Dharwad 5

slide-6
SLIDE 6

Picture of a Crisis

9 Software Projects worth $7M

Delivered but not used Not delivered Used after extensive modification Used after changes Used as delivered

Davis A. M. (1990) Software Requirements Analysis & Specification. Prentice-Hall, NJ.

  • $5M / $7M projects either not delivered or never used!

Nikhil Hegde, IIT Dharwad 6

slide-7
SLIDE 7

Software Processes

  • Transforming an idea to software is a complex

task

  • Processes help manage the complexity

– Break the task into several steps/phases that are:

  • Systematic
  • Formal

Nikhil Hegde, IIT Dharwad 7

slide-8
SLIDE 8

Software Processes

  • Transforming an idea to software is a complex

task

  • Processes help manage the complexity

– Break the task into several steps/phases that are:

  • Systematic
  • Formal

– E.g. 1) Waterfall model, 2) Evolutionary prototype 3) Unified Software Process, 4) Agile methodology

Nikhil Hegde, IIT Dharwad 8

slide-9
SLIDE 9

Exercise

  • How many lines of code (LOC) does an average

software developer produce per day? LOC/day:

  • < 25
  • 25-50
  • 50-100
  • 100-1000
  • > 1000
  • https://forms.gle/uyCqG6rMrnGavmhz8

Nikhil Hegde, IIT Dharwad 9

slide-10
SLIDE 10

Software Phases

  • Processes are characterized by phases – steps

in systematic software development

  • Software Phases:
  • 1. Requirements / System Engineering
  • 2. Design
  • 3. Implementation
  • 4. Verification and Validation
  • 5. Maintenance

Nikhil Hegde, IIT Dharwad 10

slide-11
SLIDE 11

Last Class…

  • What is Software Engineering ?
  • What lead to Software Engineering as a discipline?

– Software boom, Complexity, Failures

  • Why is it so difficult to build good software?

– Correctness, Price and Time constraints

  • What are different phases or activities of software

development?

– Ordering of activities – Duration of activities

Nikhil Hegde, IIT Dharwad 11

Processes

slide-12
SLIDE 12

Turning Ideas into Software

Nikhil Hegde, IIT Dharwad 12

Source: Alex Orso (CS 3300)

is complicated!

slide-13
SLIDE 13

Today’s Class…

  • Managing Software Complexity Through Software

Development Life Cycle (SDLC) Models / Processes

– Waterfall Model – Spiral Model – Evolutionary Prototyping – Rational Unified Process – Agile Methodology

  • Software Complexity and Programmer Productivity

Nikhil Hegde, IIT Dharwad 13

slide-14
SLIDE 14

SDLC Activities / Steps – Requirements Engineering

  • Establish stakeholders’ needs that are to be satisfied

by the software

  • Why Important?

– Cost of correcting errors

  • Grows exponentially as we move to maintenance phase
  • How to get it right?

– Elicit, Analyze, Specify, Validate, Manage - Iterate

Nikhil Hegde, IIT Dharwad 14

slide-15
SLIDE 15

SDLC Activities / Steps – Design

  • Translate Requirements to internal structure

– Architecture, Interface, Component, Data structure, algorithm

Nikhil Hegde, IIT Dharwad 15

slide-16
SLIDE 16

SDLC Activities / Steps – Coding

  • Translate design into software
  • How to get it right? Keep a tab on..

– Complexity – Diversity – Validation – Standards

Nikhil Hegde, IIT Dharwad 16

slide-17
SLIDE 17

SDLC Activities / Steps – Verification and Validation

  • Have we built the right system? - validation
  • Have we built the system right? – verification
  • Done at:

– Unit, Integration, System levels

Nikhil Hegde, IIT Dharwad 17

slide-18
SLIDE 18

SDLC Activities / Steps – Maintenance

  • Deals with handling issues / requests seen after the

software is delivered

  • Corrective – Bug fixes
  • Perfective – enhancements
  • Adaptive – environment changes

Nikhil Hegde, IIT Dharwad 18

slide-19
SLIDE 19

Waterfall Model

  • Go from one phase to another like a cascading

waterfall

Software Concept Requirements Analysis Architectural Design Detailed Design Coding and Debugging System Testing – Very old

– Pros: Finds errors easily – Cons: Not flexible

Nikhil Hegde, IIT Dharwad 19

slide-20
SLIDE 20

Spiral Model

  • Incremental Risk-Oriented Model

– Determine Objectives – Identify and Resolve Risks – Develop and Test Software – Plan Next Iteration Iterate…

– Cons: Complex, Dependent on Risk Analysis, Requires Specific Expertise – Pros: Risk Reduction, Easy to Enhance, Software Produced Early

Nikhil Hegde, IIT Dharwad 20

slide-21
SLIDE 21

Evolutionary Prototyping

  • Evolve an initial prototype based on customer

feedback

– Start with an initial Prototype – Design and Implement the Prototype – Refine Until Acceptable – Complete and Release

– Pros: Immediate Feedback, Helps Requirements Understanding – Cons: Difficult to Plan, Can Deteriorate to Code-and-fix

Nikhil Hegde, IIT Dharwad 21

slide-22
SLIDE 22

Rational Unified Process

  • Use Unified Modeling Language (UML) to formally

capture the order and duration of different activities

– Inception, Elaboration, Construction, Transition

Nikhil Hegde, IIT Dharwad 22

slide-23
SLIDE 23

Agile

  • Be more flexible (trading off discipline) in

accommodating changes in requirements

– Fail, Pass, Refactor

Nikhil Hegde, IIT Dharwad 23

slide-24
SLIDE 24

Choosing A Model

  • Requirements Understanding
  • Expected Lifetime
  • Risk
  • Schedule Constraints
  • Interaction with Customers
  • Expertise

Nikhil Hegde, IIT Dharwad 24

slide-25
SLIDE 25

Tools for Software Engineering

  • Software Complexity vs. Developer Productivity
  • Productivity:

– Development : punch cards vs. IDE (Eclipse, Microsoft Visual Studio) – Language: machine code vs. high-level language (e.g. C++, SQL) – Debugging: print statements vs. debuggers (e.g. GDB) – Others: Version control (e.g. Git), Code coverage and verification (e.g.

Coverity, GCov)

Software Size and Complexity Developer Productivity

Nikhil Hegde, IIT Dharwad 25

Desired Developer Productivity