se300 software engineering...

17
January 8, 2015 Sam Siewert SE300 Software Engineering Practices Lecture 2 Transformational Requirements and Architecture

Upload: others

Post on 21-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

  • January 8, 2015 Sam Siewert

    SE300

    Software Engineering Practices

    Lecture 2 – Transformational

    Requirements and Architecture

  • Motivation to Get Assignment Done

    Early

    Scan, Question, Read – then Complete

    Start Early so You can Enjoy your Weekend!

    Sam Siewert 2

  • Learning Objective

    Software Engineering Process? – Lifecycle Phases

    Agile – Manifesto that Hosts Spiral, XP, Scrum, Feature-

    Driven or any Iterative Process [Waterfall with Feedback]

    Requirements? Architecture? – First Phase

    Sam Siewert 3

    SPIRAL

    XP - Extreme

    WATERFALL

    feedback

  • SWE Pattern – Anti-Pattern Pattern Anti-Pattern

    Process Spiral Model (Risk, Effort,

    Resource Control)

    Mythical Man Month

    Planning, Metrics, Re-

    planning

    Death March

    Agile with XP (Extreme

    Programming)

    Silos

    Concurrent Engineering

    (HW/SW, Test/Dev)

    Missed Market

    Opportunity

    Specification Formal, Validated Incomplete, Informal

    Architecture Pattern Transformation (SIMD,

    MIMD, Map-Reduce)

    Sequential Processing

    Design Patterns UML (Use, Behavior,

    Information, States,

    Interfaces) or SA/SD

    Ad-hoc, pseudo-code,

    Long natural language

    paragraphs

    Code Feature Engineering Lava Code

    Structured Programming Goto, Arithmetic if

    Test Regression Test Suite,

    Unit Tests

    Regression

    Sam Siewert 4

    http://www.wiley.com/WileyCDA/WileyTitle/productCd-0471958697.htmlhttp://www.antipatterns.com/http://www.antipatterns.com/http://www.antipatterns.com/http://en.wikipedia.org/wiki/The_Mythical_Man-Monthhttp://en.wikipedia.org/wiki/Architectural_patternhttp://en.wikipedia.org/wiki/Software_design_patternhttps://www.doc.ic.ac.uk/~alw/edu/theses/turner-phd-0599.pdfhttp://www.antipatterns.com/lavaflow.htmhttp://en.wikipedia.org/wiki/Arithmetic_IF

  • Notes on Pattern Approach

    Not Universally Agreed Upon as Ideal Approach to SWE – Description of Patterns – Pattern Languages

    – Hard to Capture Experience

    – Sheer Number of Patterns, Levels and Phases

    History as a Guide, Helpful, but Not Sufficient – Avoid Common Mistakes

    – Follow Best Practices

    – But, Make New Mistakes

    Software Engineering Institute Capability and Maturity Model – L1 – Ad-hoc

    – L2 – Repeatable (E.g. Phases or Stages, Activities, Planning)

    – L3 – Defined (E.g. Waterfall)

    – L4 - Managed (Metrics Required – Code Coverage, Bug Rate, …)

    – L5 – Optimizing (Feedback – Spiral, XP, Evolutionary)

    Instructive and Can Help with Analysis Paralysis and Designer’s Block

    Sam Siewert 5

    http://www.c2.com/cgi/wiki?PatternIndex

  • Software Crisis – Anti-Patterns

    The Anti-Patterns for Process and Architecture Were

    Noted in first 20 years of Computing (Between 1948 and

    1968)

    NATO Conference in 1968 – “Software Crisis”

    The Idea of Engineering Software Was First Proposed at

    this Conference

    Similar Session on Embedded Software Systems - 2006,

    Austin Texas, http://varma.ece.cmu.edu/cps/, focus on

    position papers (similar to 1968 NATO Software Crisis

    Conference)

    Sam Siewert 6

    http://homepages.cs.ncl.ac.uk/brian.randell/NATO/nato1968.PDFhttp://varma.ece.cmu.edu/cps/http://varma.ece.cmu.edu/cps/

  • Infamous System Software Defects

    Infamous & Famous Field Defects

    1. Toyota ABS Software Recall, 2010

    2. Windows Genuine Advantage Outage, 2006

    3. Mars Climate Orbiter Units Interoperability, Loss, 1999

    4. Mars Pathfinder Priority Inversion, Recovered, 1997

    5. Ariane-5 501 Cluster Launch Software Failure, 1996

    6. Pentium FPU Bug – Software Acceleration Co-Processor Recall, 1994

    7. ATT 4ESS Upgrade, Outage, 1990

    8. Therac-25 Radiation Therapy Patient Overdosing, 1985-86

    9. NORAD False Alarms, User Error for Test Mode, Device Failures, 1979/1980

    10. Apollo 11 Guidance Computer Overload, 1969 - Recovered

    Sam Siewert 7

    http://en.wikipedia.org/wiki/Software_bug

    RCA, Patch, Test, Fix!

    http://history.nasa.gov/SP-350/ch-11-4.html

    Rear Admiral Grace Hopper

    http://www.computerworld.com/article/2515483/enterprise-applications/epic-failures--11-infamous-software-bugs.htmlhttp://en.wikipedia.org/wiki/2009%E2%80%9311_Toyota_vehicle_recalls#Anti-lock_brake_software_recallhttp://blogs.msdn.com/b/wga/archive/2006/10/05/wga-service-outage.aspxhttp://blogs.msdn.com/b/wga/archive/2006/10/05/wga-service-outage.aspxhttp://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failurehttp://en.wikipedia.org/wiki/Mars_Climate_Orbiter#Cause_of_failurehttp://research.microsoft.com/en-us/um/people/mbj/mars_pathfinder/Authoritative_Account.htmlhttp://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_failurehttp://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_failurehttp://en.wikipedia.org/wiki/Cluster_(spacecraft)#Launch_failurehttp://en.wikipedia.org/wiki/Pentium_FDIV_bughttp://www.phworld.org/history/attcrash.htmhttp://en.wikipedia.org/wiki/Therac-25http://en.wikipedia.org/wiki/Therac-25http://en.wikipedia.org/wiki/Therac-25http://en.wikipedia.org/wiki/North_American_Aerospace_Defense_Command#False_alarmshttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://en.wikipedia.org/wiki/Software_bughttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://history.nasa.gov/SP-350/ch-11-4.htmlhttp://en.wikipedia.org/wiki/Grace_Hopper

  • SEI Capability and Maturity Model Test Coverage Criteria, Bug Open/Close Rate Metrics, Pass/Fail Statistics Provide Quantitative Management [Level 4]

    Automation is a Step Toward Optimization – Necessary, but Not Sufficient (Metrics for Feedback Process Improvement)

    Sam Siewert 8

    Ad Hoc, “Code & Fix” – Driven by

    Individual Styles, Un-coordinated,

    More of an Art than Practice

    Clear Phases with Key

    Deliverables – Analysis,

    Design, Units, Test Plans

    E.g. Boehm’s “V” and

    Spiral Model, Applied to

    All Projects - Repeatable

    Entry/Exit Criteria for

    Phases, Metrics Drive

    Decisions in Process [Gates]

    Feedback Used to

    Improve Process with

    Automation and Innovation

    SEI CMM Levels

    http://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htm

    http://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htmhttp://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htmhttp://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htmhttp://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htmhttp://www.tutorialspoint.com/cmmi/cmmi-maturity-levels.htm

  • Transformation Systems - Examples Continuous

    Brightness

    and Contrast

    Canny Edges

    Hough Linear

    Hough

    Circular

    Sam Siewert 9

  • Learning Objectives

    Why is Transformation an Important Architecture and Design Pattern? – Class of Applications that Transform Data Sets

    How do We Architect, Design, Code? – OO or Structured Dataflow?

    CPU Clocks are Hitting Limits – Use Concurrency

    How Much Concurrency is Enough? – Prototype and Measure [Let’s Do that …]

    Define High Level and Detailed Requirements

    Sam Siewert 10

  • Activity #1

    Demo – Continuous Image Transformation

    Requirement #1 – Purpose of Transformation [Enhance,

    Segment, Recognize, other?]

    Requirement #2 – On-line Real-Time, Off-line

    Requirement #3 – Transform Mathematics / Algorithm

    Requirement #4 - Thread Grid Sizing? [Inter/Intra Frame]

    Requirement #5 – Frame Rate? [24Hz, 30Hz, 60Hz, ?]

    Requirement #6 – Resolution? [Fixed, Variable]

    Sam Siewert 11

  • Assignment #1

    Specify Major Requirements

    Test Prototype Reference Code - http://mercury.pr.erau.edu/~siewerts/se300/code/

    High-Level Block Diagram – Dataflow, I/O, Processing

    Requirements Detail

    Prototype Revision and Testing

    http://mercury.pr.erau.edu/~siewerts/se300/assignments/

    Sam Siewert 12

    http://mercury.pr.erau.edu/~siewerts/se300/code/http://mercury.pr.erau.edu/~siewerts/se300/code/http://mercury.pr.erau.edu/~siewerts/se300/assignments/

  • Let’s Look at Some Code – At Home

    Threading and Image Segmentation for Multi-Core

    Processing

    Example Published in IBM Paper

    – Thread, Vector Processing, Optimization

    – Grids for Threading, Step One toward Real-Time Processing

    Example of Concurrency and Throughput

    Sam Siewert 13

    https://www.ibm.com/developerworks/industry/library/ind-cloud-e-learning2/index.html

  • How to Grid?

    Conceptual N x M, but Perhaps Just Columns or Rows?

    What is Simplest?

    Does it Matter at Architecture or Design Level?

    Sam Siewert 14

  • A Couple Examples to Get You Going ... Review, Build, Run

    1. simplethread

    2. simple-imageproc

    3. imageproc-thread

    Speed-Up?

    – 15.77 sec, 99.8%

    – 04.66 sec, 562.6%

    4 Hyper-threaded

    CPUs

    8 VCPUs

    Sam Siewert 15

    http://mercury.pr.erau.edu/~siewerts/se300/code/simplethread/http://mercury.pr.erau.edu/~siewerts/se300/code/simple-imageproc/http://mercury.pr.erau.edu/~siewerts/se300/code/simple-imageproc/http://mercury.pr.erau.edu/~siewerts/se300/code/simple-imageproc/http://mercury.pr.erau.edu/~siewerts/se300/code/imageproc-thread/http://mercury.pr.erau.edu/~siewerts/se300/code/imageproc-thread/http://mercury.pr.erau.edu/~siewerts/se300/code/imageproc-thread/http://mercury.pr.erau.edu/~siewerts/se300/code/imageproc-thread/http://mercury.pr.erau.edu/~siewerts/se300/code/imageproc-thread/

  • Assignment #1 – Q&A

    Discussion – Status from Individuals or Small Teams

    Challenges?

    Observations?

    Process Issues, Likes, Dislikes? – Waterfall, Waterfall

    with Feedback, Evolutionary, Other

    Sam Siewert 16

  • Assessment

    Quiz on Pressman Chapters 1 to 3

    Foundational Concepts Discussed in Class

    2+ Quizzes, I will Likely Drop One of Your Lowest

    Scores

    The Reading is Important Reinforcement to In-Class

    Discussion, At-Home Exercises, and We Won’t Just

    Lecture to “Read you the Text”, so Please Read on your

    Own and Bring Questions to Class

    Sam Siewert 17