Presentation is loading. Please wait.

Presentation is loading. Please wait.

An Introduction to Software Engineering CSCI 3333 Data Structures.

Similar presentations


Presentation on theme: "An Introduction to Software Engineering CSCI 3333 Data Structures."— Presentation transcript:

1 An Introduction to Software Engineering CSCI 3333 Data Structures

2 Acknowledgement  Dr. Yue  Krishani Abeysekera  Wei Ding  Charles Moen

3 Software Development With the rapid increase in technology, the complexity and expectation of computer capabilities also increased. Requirements have increased rapidly. However, while users expect and demand a many features, customers generally want to minimize the cost for the software and they want it developed very fast. This becomes a recipe for disaster!

4 Software Development With the rapid increase in technology, the complexity and expectation of computer capabilities also increased. Requirements have increased rapidly. However, while users expect and demand a many features, customers generally want to minimize the cost for the software and they want it developed very fast. This becomes a recipe for disaster!

5 System Cost  The relative cost of hardware and software changed drastically in the last 60 years. Time % Cost hardware software

6 Consequences  Cost: Software cost ↓ Hardware cost ↓↓: Moore’s Law, much faster.  Earlier day: optimizing hardware usage. Assembly language C

7 System Speed  Moore Law for hardware.  No Moore Law for software? Cloud computing, e.g. virtual servers, pay- per-use service, no licensing.  Wirth Law: software speed is decreasing more quickly than hardware speed is increasing. This is why efficient programs are always needed.

8 Consequences  Hardware is now relatively ‘free’? Selling software, not hardware: Microsoft.  Some software is becoming relatively ‘free’? Selling service, advertisement instead of software: Google.

9 Software Crisis (1965-1985)  Budget and Cost Overrun  Cancelled Projects  Damaged properties  Injury and death

10 Examples: Software Disasters Software has played a role in many high-profile disasters.  Mars probe - data calculated on the ground in Imperial units and reported that way to the navigation team who were expecting the data in metric units caused it to be destroyed.  Therac-25 - A radiation therapy machine responsible for six overdoses due to faulty software.  Airbus A320 - In the Airbus flight control systems, the computer has the final say on all decisions, meaning the safety of passengers depends upon the accuracy of the software specification, and the competence of the engineering teams producing the (multiple, independent) software stacks. The Strasbourg A320 crash of Jan 21, 1992 is partially related to software in that poor user interface design was a contributing factor.

11 Cause of the Software ‘Crisis’ Causes of the software crisis were linked to the overall complexity of the process and the relative immaturity of software engineering as a profession. The crisis manifested itself in several ways: Projects running over-budget. Projects running over-time. Software was of low quality. Software often did not meet requirements. Projects were unmanageable and code difficult to maintain.

12 Software Engineering This discipline deals with identifying, defining, and realizing the required performance characteristics of the resulting software. These performance characteristics include: reliability, maintainability, availability, testability, ease-of- use, portability, etc. Software engineering addresses these performance characteristics by preparing design and technology specifications, that if implemented properly, will enable the resulting software to meet these requirements.

13 Software Development Process What is the best way to make more and better software? Software engineers advocate many different technologies and practices, and the debate on how to accomplish this has gone on for many years and may continue forever.

14 Software Life Cycle Models With large numbers of software projects not meeting their expectations in terms of functionality, cost, or delivery schedule, effective project management is proving difficult. This has resulted in people apply project management techniques to writing software.

15 15 Software Life Cycle Models  Some examples Waterfall model (Royce) ‏ Spiral model (Boehm) ‏ Rational Unified Process (Booch, Jacobson, Rumbaugh) ‏ Software Engineering

16 Waterfall Model In Royce's original waterfall model, the following phases are followed perfectly in order: Requirements specification Design Construction (aka: implementation or coding) Integration Testing and debugging (aka: verification) Installation Maintenance

17 Waterfall Model 2  Some drawbacks: Difficult to make revisions due to unforeseen problems: no feedback loop Focus on paper documents  Major contributions: identify key activities.

18 Key Software Activities  5 Phases of Software Life Cycle: Phase 1: Problem Analysis and Specification Phase 2: Design Phase 3: Implementation (Coding) Phase 4: Testing, Execution and Debugging Phase 5: Maintenance

19 Phase 1: Problem Analysis and Specification Computer Science programming assignment - specific statement of problem quantitative description clearly defined requirements: input, output, calculations, test data Computer Science programming assignment - specific statement of problem quantitative description clearly defined requirements: input, output, calculations, test data Easy in CS courses, not always in the real world.

20 “Real World” request - general statement of problem qualitative not quantitative precision missing for input, output, processing “Real World” request - general statement of problem qualitative not quantitative precision missing for input, output, processing Phase 1: Problem Analysis and Specification

21 Phase 2: Design  CS courses small systems few hundred lines of code simple, straightforward self-contained  “Real” world large systems Tens of thousands of lines of code complex many components

22 OOD: Object-Oriented Design 1. Identify the objects in the problem's specification and their types. 2. Identify the operations of the objects (methods) needed to solve the problem. 3. Arrange the operations in a sequence of steps, called an algorithm, which, when applied to the objects, will solve the problem.

23 OOD Goals  Robust “Capable of handling unexpected inputs”  Adaptable Able to evolve over time in response to changes  Reusable Code should be reusable in other applications Components – e.g., code libraries like the Java libraries

24 Phase 3: Implementation (Coding)  Select language of implementation  Encode the design  Verify integration  Combining program units into a complete software system.  Ensure quality programs must be correct, readable, and understandable, that is, well-structured, documented, and stylistic.

25 Phase 4: Testing, Execution, and Debugging  Validation: "Are we building the right product?" The software should do what the user really requires  check that documents, program modules, etc. match the customer's requirements.  Verification: "Are we building the product right?" The software should conform to its specification  check that products are correct, complete, consistent with each other and with those of the preceding phases.

26 Errors can occur anytime Specifications don't accurately reflect given information or the user's needs/requests Logic errors in algorithms Incorrect coding or integration Failure to handle boundary data or test values

27 Different kinds of tests required Unit tests:  Each individual program unit works? Program components tested in isolation Integration tests :  Units combined correctly? Component interface and information flow tested System tests:  Overall system works correctly?

28 Unit testing  Probably the most rigorous and time- intensive  Surely the most fundamental and important  Kinds of errors tested: syntax linking run-time logic  Two major types: Black-box and White- box tests

29 Black box or functional test  Outputs produced for various inputs are checked for correctness without considering the internal structure of the program component itself.  Program unit is viewed as a black box that accepts inputs and produces outputs, but the inner workings of the box are not visible.

30 White box or structural test  Performance is tested by examining code’s internal structure.  Test data is carefully selected so that specific parts of the program unit are exercised. Boundary test: test data with boundary values Statement coverage test: test cases that cover all the statement in a program Conditional statement coverage test: test cases that test all the conditions in the conditional statements.

31 Phase 5: Maintenance  Large % of computer center budgets Large % of programmer's time Largest % of software development cost  Why? Includes modifications and enhancements Due to poor structure, poor documentation, poor style  less likely to catch bugs before release  make fixing of bugs difficult and time-consuming  impede implementation of enhancements

32 Some Lessons  Implementation (Coding) A small part of the software lifecycle. Easy to outsource (or out-shore) than requirement analysis and design.  A program is not successful if it gives some output.  Course assignments are usually not a good training for the whole software life-cycle.

33 Iterative Process  Waterfall model: no visible feedback loop.  Iterative models/overlapping phases: Spiral model – top down and bottom up concepts Rational Unified Process

34 An example of an iterative process

35 New Factors  The Internet age (1994-2003) Browsers as the universal client agents.  Web 2.0 (~2004-present) New software distribution: software as a service perpetual beta Machine to machine interaction

36 New Trends: Lightweight Methodologies  Examples: Extreme Programming Agile Software Development Scrum list for software project management - iterative incremental process of software development

37 What should we do?  Aware of the software life-cycle.  Aware of the new forces affecting software development.  Aware of the new software methodologies.  Eventually need to learn: Modeling Language: e.g. UML Software Process

38 Relevance to our course  Software will always need to be correct and efficient: Need to learn data structures and algorithms well.

39 Questions?


Download ppt "An Introduction to Software Engineering CSCI 3333 Data Structures."

Similar presentations


Ads by Google