Published on

Published in: Technology, Business
1 Like
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. Introduction <ul><li>Text Book: Sommerville (+Pressman) </li></ul><ul><li>Assessment: </li></ul><ul><ul><li>Project: 30 % (Doc 1: 20 in week 8 + Doc 2: 10 in week 12) </li></ul></ul><ul><ul><li>Tutorial participation: 10 % </li></ul></ul><ul><ul><li>Examination: 60% </li></ul></ul><ul><ul><li>Grades: (no one failed in CP3110 in the last 5 years !!) </li></ul></ul><ul><ul><ul><li>Pass : get at least a total of 50 marks (out of 100). </li></ul></ul></ul><ul><ul><ul><li>Credit : total > 65 and Exam > 30 Marks </li></ul></ul></ul><ul><ul><ul><li>Distinction : total > 75 and Exam > 39 Marks </li></ul></ul></ul><ul><ul><ul><li>High Distinction : total > 85 Marks </li></ul></ul></ul><ul><li>Tutorial participation: </li></ul><ul><ul><li>Questions released on Friday </li></ul></ul><ul><ul><li>Bring your solutions to the tutorial </li></ul></ul><ul><ul><li>Participate at least 10 tutorial sessions </li></ul></ul>
  2. 2. <ul><li>from a colleague in Netherlands (1990) </li></ul>A short story <ul><ul><li>Move to a new large house ? </li></ul></ul><ul><ul><li>No! Too good a location + sentiments </li></ul></ul><ul><ul><li>House too small </li></ul></ul><ul><ul><li>Study room became a child’s bedroom </li></ul></ul><ul><ul><li>Wife thought kitchen too small </li></ul></ul><ul><ul><li>Consulted an architect about renovation </li></ul></ul><ul><ul><li>Blueprint for large kitchen + 4 new rooms </li></ul></ul><ul><ul><li>Attractive and apparently cheaper than moving </li></ul></ul><ul><ul><li>Brother (building industry) warned of the mess </li></ul></ul><ul><ul><li>but, thought they can handle it </li></ul></ul><ul><ul><li>Applied for permission and got it in 6 months </li></ul></ul>
  3. 3. Short story - cont. <ul><li>In Aug 1991, contract signed for a fixed price </li></ul><ul><ul><li>September: 1 week’s work done in the 1st month </li></ul></ul><ul><ul><li>Oct: part of the roof to be removed </li></ul></ul><ul><ul><li>Surprise: more to be demolished </li></ul></ul><ul><ul><li>Nov: roof up (lucky, only 2 days rain) </li></ul></ul><ul><ul><li>New kitchen to be installed: remove a brick wall </li></ul></ul><ul><ul><li>problem: old heating systems right behind the wall </li></ul></ul><ul><ul><li>… </li></ul></ul><ul><ul><li>Finished in January </li></ul></ul><ul><ul><li>many tiny expenses (unaccounted for) added up to a pretty sum </li></ul></ul><ul><ul><li>Lot of trouble (big brother is right again!) </li></ul></ul><ul><ul><li>estimated time: 60 working days (November finish) </li></ul></ul><ul><ul><li>extra things: wiring, new central heating </li></ul></ul><ul><ul><li>estimated on the back of an envelop </li></ul></ul>
  4. 4. Story is true for many software projects <ul><li>Software too often delivered late </li></ul><ul><li>More expensive (time and money both) </li></ul><ul><li>Does not meet its specifications </li></ul><ul><li>Faulty </li></ul><ul><li>Underestimate non-technical factors </li></ul><ul><li>… </li></ul><ul><li>The Software Crisis </li></ul><ul><li>… </li></ul><ul><li>Want to avoid ? </li></ul><ul><ul><li>Take CP3110 seriously </li></ul></ul>
  5. 5. Software engineering <ul><li>The economies of ALL developed nations are dependent on software </li></ul><ul><li>More and more systems are software controlled </li></ul><ul><li>Software engineering expenditure represents a significant fraction of GNP in all developed countries </li></ul><ul><li>Therefore, cost-effective software production is essential to national & international economies </li></ul><ul><li>Software engineering is concerned with theories, methods and tools for professional software development </li></ul>
  6. 6. What is software? <ul><li>Computer programs and associated documentation </li></ul><ul><li>Software products may be developed for a particular customer or may be developed for a general market </li></ul><ul><li>Software products may be </li></ul><ul><ul><li>Generic - developed to be sold to a range of different customers </li></ul></ul><ul><ul><li>Bespoke (custom) - developed for a single customer according to their specification </li></ul></ul>
  7. 7. What is software engineering? <ul><li>Software engineering is an engineering discipline which is concerned with all aspects of software production </li></ul><ul><li>Software engineers should adopt a systematic and organised approach to their work and use appropriate tools and techniques depending on the problem to be solved, the development constraints and the resources available </li></ul>
  8. 8. What is a software process? <ul><li>A set of activities whose goal is the development or evolution of software </li></ul><ul><li>Generic activities in all software processes are: </li></ul><ul><ul><li>Specification </li></ul></ul><ul><ul><li>Development </li></ul></ul><ul><ul><li>Validation </li></ul></ul><ul><ul><li>Evolution </li></ul></ul><ul><li>Generic process models </li></ul><ul><ul><li>Waterfall </li></ul></ul><ul><ul><li>Evolutionary development </li></ul></ul><ul><ul><li>Formal transformation </li></ul></ul><ul><ul><li>Integration from reusable components </li></ul></ul>
  9. 9. <ul><li>Software costs often dominate system costs. The costs of software on a PC are often greater than the hardware cost </li></ul><ul><li>Software costs more to maintain than it does to develop. For systems with a long life, maintenance costs may be several times development costs </li></ul><ul><li>Roughly 60% of costs are development costs, 40% are testing costs. </li></ul><ul><li>Distribution of costs depends on the system being developed and the development model used </li></ul><ul><li>Software engineering is concerned with cost-effective software development </li></ul>Software costs
  10. 10. What are the attributes of good software? <ul><li>The software should deliver the required functionality and performance to the user and should be maintainable, dependable and usable </li></ul><ul><li>Maintainability </li></ul><ul><ul><li>Software must evolve to meet changing needs </li></ul></ul><ul><li>Dependability </li></ul><ul><ul><li>Software must be trustworthy </li></ul></ul><ul><li>Efficiency </li></ul><ul><ul><li>Software should not make wasteful use of system resources </li></ul></ul><ul><li>Usability </li></ul><ul><ul><li>Software must be usable by the users for which it was designed </li></ul></ul>
  11. 11. Emergent properties <ul><li>Properties of the system as a whole rather than properties that can be derived from the properties of components of a system </li></ul><ul><li>Emergent properties are a consequence of the relationships between system components </li></ul><ul><li>They can therefore only be assessed and measured once the components have been integrated into a system </li></ul>
  12. 12. Examples of emergent properties <ul><li>The overall weight of the system </li></ul><ul><ul><li>This is an example of an emergent property that can be computed from individual component properties. </li></ul></ul><ul><li>The reliability of the system </li></ul><ul><ul><li>This depends on the reliability of system components and the relationships between the components. </li></ul></ul><ul><li>The usability of a system </li></ul><ul><ul><li>This is a complex property which is not simply dependent on the system hardware and software but also depends on the system operators and the environment where it is used. </li></ul></ul>
  13. 13. Types of emergent property <ul><li>Functional properties </li></ul><ul><ul><li>These appear when all the parts of a system work together to achieve some objective. For example, a bicycle has the functional property of being a transportation device once it has been assembled from its components. </li></ul></ul><ul><li>Non-functional emergent properties </li></ul><ul><ul><li>Examples are reliability, performance, safety, and security. These relate to the behaviour of the system in its operational environment. They are often critical for computer-based systems as failure to achieve some minimal defined level in these properties may make the system unusable. </li></ul></ul>
  14. 14. What are the key challenges facing software engineering? <ul><li>Coping with legacy systems, coping with increasing diversity and coping with demands for reduced delivery times </li></ul><ul><li>Legacy systems </li></ul><ul><ul><li>Old, valuable systems must be maintained and updated </li></ul></ul><ul><li>Heterogeneity </li></ul><ul><ul><li>Systems are distributed and include a mix of hardware and software </li></ul></ul><ul><li>Delivery </li></ul><ul><ul><li>There is increasing pressure for faster delivery of software </li></ul></ul>
  15. 15. Professional and ethical responsibility <ul><li>Software engineering involves wider responsibilities than simply the application of technical skills </li></ul><ul><li>Software engineers must behave in an honest and ethically responsible way if they are to be respected as professionals </li></ul><ul><li>Ethical behaviour is more than simply upholding the law. </li></ul>
  16. 16. Issues of professional responsibility <ul><li>Confidentiality </li></ul><ul><ul><li>Engineers should normally respect the confidentiality of their employers or clients (even if no confidentiality agreement). </li></ul></ul><ul><li>Competence </li></ul><ul><ul><li>Engineers should not misrepresent their level of competence. Should not knowingly accept work beyond their competence. </li></ul></ul><ul><li>Intellectual property rights </li></ul><ul><ul><li>Engineers should be aware of local laws governing the use of intellectual property such as patents, copyright, etc. </li></ul></ul><ul><li>Computer misuse </li></ul><ul><ul><li>Should not misuse their technical skills (virus). </li></ul></ul>
  17. 17. Code of ethics - principles from IEEE/ACM <ul><li>1. PUBLIC </li></ul><ul><ul><li>Software engineers shall act consistently with the public interest. </li></ul></ul><ul><li>2. CLIENT AND EMPLOYER </li></ul><ul><ul><li>Software engineers shall act in a manner that is in the best interests of their client and employer consistent with the public interest. </li></ul></ul><ul><li>3. PRODUCT </li></ul><ul><ul><li>Software engineers shall ensure that their products and related modifications meet the highest professional standards possible. </li></ul></ul>
  18. 18. Code of ethics - principles <ul><li>JUDGMENT </li></ul><ul><ul><li>Software engineers shall maintain integrity and independence in their professional judgment. </li></ul></ul><ul><li>5. MANAGEMENT </li></ul><ul><ul><li>Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance. </li></ul></ul><ul><li>6. PROFESSION </li></ul><ul><ul><li>Software engineers shall advance the integrity and reputation of the profession consistent with the public interest. </li></ul></ul>
  19. 19. Code of ethics - principles <ul><li>7. COLLEAGUES </li></ul><ul><ul><li>Software engineers shall be fair to and supportive of their colleagues. </li></ul></ul><ul><li>8. SELF </li></ul><ul><ul><li>Software engineers shall participate in lifelong learning regarding the practice of their profession and shall promote an ethical approach to the practice of the profession. </li></ul></ul>
  20. 20. Software Myths (from Pressman) <ul><li>Myth: It’s in the software. So, we can easily change it. </li></ul><ul><ul><li>Reality: Requirements changes are a major cause of software degradation </li></ul></ul><ul><li>Myth : We can solve schedule problems by adding more programmers. </li></ul><ul><ul><li>Reality: Maybe. It increases coordination efforts and may slow things down . </li></ul></ul><ul><li>Myth : While we don’t have all requirements in writing yet, we know what we want and can start writing code . </li></ul><ul><ul><li>Reality: Incomplete up-front definition is the major cause of software project failures. </li></ul></ul>
  21. 21. Software Myths... <ul><li>Myth: I can’t tell you how well we are doing until I get parts of it running . </li></ul><ul><ul><li>Reality: Formal reviews of various types </li></ul></ul><ul><ul><ul><li>can give good information and </li></ul></ul></ul><ul><ul><ul><li>are critical to success in large projects. </li></ul></ul></ul><ul><li>Myth: The only deliverable that matters is working code . </li></ul><ul><ul><li>Reality: Documentation, test history, and program configuration are critical parts of the delivery. </li></ul></ul><ul><li>Myth: I am a (super) programmer. Let me program it, and I will get it done . </li></ul><ul><ul><li>Reality: A sign of immaturity. A formula for failure. Software projects are done by teams, not individuals, and success requires much more than just coding. </li></ul></ul>
  22. 22. Key points <ul><li>Software engineering is an engineering discipline which is concerned with all aspects of software production. </li></ul><ul><li>Software products consist of developed programs and associated documentation. Essential product attributes are maintainability, dependability, efficiency and usability. </li></ul><ul><li>Emergent properties are properties that are characteristic of the system as a whole and not its component parts </li></ul><ul><li>The software process consists of activities which are involved in developing software products. Basic activities are software specification, development, validation and evolution. </li></ul><ul><li>Software engineers have responsibilities to the engineering profession and society. They should not simply be concerned with technical issues. </li></ul>
  23. 23. 10 minute break: a brain teaser <ul><li>Your are in the cellar of your house. There are three light switches which individually switch on or off three light bulbs in your attic. You may go from your cellar to your attic only once. How can you find out which bulb is connected to which switch? </li></ul><ul><li>Initially, all switches are in the &quot;off&quot; position. Further tools or persons are not available. All bulbs are in perfect working order, you cannot see from the cellar to the attic, metaphysical and esoteric phenomena are not permitted. </li></ul>
  24. 24. Solution to the brain teaser <ul><li>switch 1 on </li></ul><ul><li>wait 5 minutes </li></ul><ul><li>switch 1 off </li></ul><ul><li>switch 2 on </li></ul><ul><li>go to your attic </li></ul><ul><li>feel: the hot bulb is connected with switch 1 </li></ul><ul><li>look: the shining bulb is connected with switch 2 </li></ul><ul><li>conclude: the last bulb is connected with switch 3 </li></ul>First lesson about modeling . If you use the simple model &quot;bulb has 2 states (on/off)&quot; to solve the problem, you forget an additional implicit aspect of the real world (&quot;heat&quot;), which must be taken into consideration.
  25. 25. Ch.3: Software Processes <ul><li>Coherent sets of activities for specifying, designing, implementing and testing software systems </li></ul><ul><li>Chapter Objectives </li></ul><ul><li>To introduce software process models </li></ul><ul><li>To describe a number of different process models and when they may be used </li></ul><ul><li>To describe outline process models for requirements engineering, software development, testing and evolution </li></ul><ul><li>To introduce CASE technology to support software process activities </li></ul>
  26. 26. The software process <ul><li>A structured set of activities required to develop a software system </li></ul><ul><ul><li>Specification </li></ul></ul><ul><ul><li>Design </li></ul></ul><ul><ul><li>Validation </li></ul></ul><ul><ul><li>Evolution </li></ul></ul><ul><li>A software process model is an abstract representation of a process. It presents a description of a process from some particular perspective </li></ul>
  27. 27. 3.1 Generic software process models <ul><li>The waterfall model </li></ul><ul><ul><li>Separate and distinct phases of specification and development </li></ul></ul><ul><li>Evolutionary development </li></ul><ul><ul><li>Specification, development and validation are interleaved </li></ul></ul><ul><li>Formal systems development </li></ul><ul><ul><li>A mathematical system model is formally transformed to an implementation </li></ul></ul><ul><li>Reuse-based development </li></ul><ul><ul><li>The system is assembled from existing components </li></ul></ul>
  28. 28. Waterfall model
  29. 29. Waterfall model problems <ul><li>The drawback of the waterfall model is the difficulty of accommodating change after the process is underway </li></ul><ul><ul><li>Inflexible partitioning of the project into distinct stages </li></ul></ul><ul><ul><li>This makes it difficult to respond to changing customer requirements </li></ul></ul><ul><li>Therefore, this model is only appropriate when the requirements are well-understood </li></ul>
  30. 30. Evolutionary development <ul><li>Exploratory development </li></ul><ul><ul><li>Objective is to work with customers and to evolve a final system from an initial outline specification. Should start with well-understood requirements </li></ul></ul><ul><li>Throw-away prototyping </li></ul><ul><ul><li>Objective is to understand the system requirements. Should start with poorly understood requirements </li></ul></ul>
  31. 31. Evolutionary development <ul><li>Problems (from engineering/management perspective) </li></ul><ul><ul><li>Lack of process visibility </li></ul></ul><ul><ul><li>Systems are often poorly structured </li></ul></ul><ul><ul><li>Special skills (e.g. in languages for rapid prototyping) may be required </li></ul></ul><ul><li>Applicability </li></ul><ul><ul><li>For small or medium-size interactive systems </li></ul></ul><ul><ul><li>For parts of large systems (e.g. the user interface) </li></ul></ul><ul><ul><li>For short-lifetime systems </li></ul></ul><ul><li>Further discussed in Ch. 8 </li></ul>
  32. 32. Formal systems development <ul><li>Based on the transformation of a mathematical specification through different representations to an executable program </li></ul><ul><li>Transformations are ‘correctness-preserving’ so it is straightforward to show that the program conforms to its specification </li></ul><ul><li>Embodied in the ‘Cleanroom’ approach to software development </li></ul>
  33. 33. Formal transformations <ul><li>Problems </li></ul><ul><ul><li>Need for specialised skills and training to apply the technique </li></ul></ul><ul><ul><li>Difficult to formally specify some aspects of the system (eg. UI) </li></ul></ul><ul><li>Applicability </li></ul><ul><ul><li>Safety Critical systems </li></ul></ul>
  34. 34. Reuse-oriented development <ul><li>Based on systematic reuse where systems are integrated from existing components or COTS (Commercial-off-the-shelf) systems </li></ul><ul><li>Process stages </li></ul><ul><ul><li>Component analysis </li></ul></ul><ul><ul><li>Requirements modification </li></ul></ul><ul><ul><li>System design with reuse </li></ul></ul><ul><ul><li>Development and integration </li></ul></ul><ul><li>This approach is becoming more important but still limited experience with it </li></ul>
  35. 35. Reuse-oriented development <ul><li>Based on systematic reuse where systems are integrated from existing components or COTS </li></ul>
  36. 36. 3.2 Process iteration <ul><li>System requirements ALWAYS evolve in the course of a project so process iteration where earlier stages are reworked is always part of the process for large systems </li></ul><ul><li>Iteration can be applied to any of the generic process models </li></ul><ul><li>Two (related) approaches </li></ul><ul><ul><li>Incremental development </li></ul></ul><ul><ul><li>Spiral development </li></ul></ul>
  37. 37. Incremental development <ul><li>Rather than deliver the system as a single delivery, the development and delivery is broken down into increments with each increment delivering part of the required functionality </li></ul><ul><li>User requirements are prioritised and the highest priority requirements are included in early increments </li></ul><ul><li>Once the development of an increment is started, the requirements are frozen </li></ul>
  38. 38. Incremental development advantages <ul><li>Customer value can be delivered with each increment so system functionality is available earlier </li></ul><ul><li>Early increments act as a prototype to help elicit requirements for later increments </li></ul><ul><li>Lower risk of overall project failure </li></ul><ul><li>The highest priority system services tend to receive the most testing </li></ul>
  39. 39. Spiral development <ul><li>Process is represented as a spiral rather than as a sequence of activities with backtracking </li></ul><ul><li>Each loop in the spiral represents a phase in the process. </li></ul><ul><li>No fixed phases such as specification or design - loops in the spiral are chosen depending on what is required </li></ul><ul><li>Risks are explicitly assessed and resolved throughout the process </li></ul>
  40. 40. Spiral model of the software process
  41. 41. Spiral model sectors <ul><li>Objective setting </li></ul><ul><ul><li>Specific objectives for the phase are identified </li></ul></ul><ul><li>Risk assessment and reduction </li></ul><ul><ul><li>Risks are assessed and activities put in place to reduce the key risks </li></ul></ul><ul><li>Development and validation </li></ul><ul><ul><li>A development model for the system is chosen which can be any of the generic models </li></ul></ul><ul><li>Planning </li></ul><ul><ul><li>The project is reviewed and the next phase of the spiral is planned </li></ul></ul>
  42. 42. 3.3 Software specification <ul><li>The process of establishing what services are required and the constraints on the system’s operation and development </li></ul><ul><li>Requirements engineering process (4 steps) </li></ul>
  43. 43. 3.4 Software design and implementation <ul><li>The process of converting the system specification into an executable system </li></ul><ul><li>Software design </li></ul><ul><ul><li>Design a software structure that realises the specification </li></ul></ul><ul><li>Implementation </li></ul><ul><ul><li>Translate this structure into an executable program </li></ul></ul><ul><li>The activities of design and implementation are closely related and may be inter-leaved </li></ul>
  44. 44. The software design process
  45. 45. Design methods <ul><li>Systematic approaches to developing a software design </li></ul><ul><li>The design is usually documented as a set of graphical models </li></ul><ul><li>Possible models </li></ul><ul><ul><li>Data-flow model </li></ul></ul><ul><ul><li>Entity-relation-attribute model </li></ul></ul><ul><ul><li>Structural model </li></ul></ul><ul><ul><li>Object models </li></ul></ul><ul><li>Will be discussed in Ch. 7 </li></ul>
  46. 46. Programming and debugging <ul><li>Translating a design into a program and removing errors from that program </li></ul><ul><li>Programming is a personal activity - there is no generic programming process </li></ul><ul><li>Programmers carry out some program testing to discover faults in the program and remove these faults in the debugging process </li></ul><ul><li>The debugging process </li></ul>
  47. 47. 3.5 Software validation <ul><li>Verification and validation is intended to show that a system conforms to its specification and meets the requirements of the system customer </li></ul><ul><li>Involves checking and review processes and system testing </li></ul><ul><li>System testing involves executing the system with test cases that are derived from the specification of the real data to be processed by the system </li></ul>
  48. 48. The testing process
  49. 49. Testing phases
  50. 50. 3.6 Software evolution <ul><li>Software is inherently flexible and can change. </li></ul><ul><li>As requirements change through changing business circumstances, the software supporting the business must also evolve and change </li></ul><ul><li>Although there has been a demarcation between development and evolution (maintenance) this is increasingly irrelevant as fewer and fewer systems are completely new </li></ul>
  51. 51. 3.7 Automated process support (CASE) <ul><li>Computer-aided software engineering (CASE) is software to support software development and evolution processes </li></ul><ul><li>Activity automation </li></ul><ul><ul><li>Graphical editors for system model development </li></ul></ul><ul><ul><li>Data dictionary to manage design entities </li></ul></ul><ul><ul><li>Graphical UI builder for user interface construction </li></ul></ul><ul><ul><li>Debuggers to support program fault finding </li></ul></ul><ul><ul><li>Automated translators to generate new versions of a program </li></ul></ul><ul><li>Case technology has led to significant improvements in the software process though not the order of magnitude improvements that were once predicted </li></ul><ul><ul><li>Software engineering requires creative thought - not automatable </li></ul></ul>
  52. 52. CASE classification <ul><li>Classification helps us understand the different types of CASE tools and their support for process activities </li></ul><ul><li>Functional perspective </li></ul><ul><ul><li>Tools are classified according to their specific function </li></ul></ul><ul><li>Process perspective </li></ul><ul><ul><li>Tools are classified according to process activities that are supported </li></ul></ul><ul><li>Integration perspective </li></ul><ul><ul><li>Tools are classified according to their organisation into integrated units </li></ul></ul>
  53. 53. Functional tool classification
  54. 54. Activity-based classification
  55. 55. CASE integration <ul><li>Tools </li></ul><ul><ul><li>Support individual process tasks such as design consistency checking, text editing, etc. </li></ul></ul><ul><li>Workbenches </li></ul><ul><ul><li>Support a process phase such as specification or design, Normally include a number of integrated tools </li></ul></ul><ul><li>Environments </li></ul><ul><ul><li>Support all or a substantial part of an entire software process. Normally include several integrated workbenches </li></ul></ul>
  56. 56. Tools, workbenches, environments
  57. 57. Key points <ul><li>Software processes are the activities involved in producing and evolving a software system. They are represented in a software process model </li></ul><ul><li>General activities are specification, design and implementation, validation and evolution </li></ul><ul><li>Generic process models describe the organisation of software processes </li></ul><ul><li>Iterative process models describe the software process as a cycle of activities </li></ul>
  58. 58. Key points <ul><li>Requirements engineering is the process of developing a software specification </li></ul><ul><li>Design and implementation processes transform the specification to an executable program </li></ul><ul><li>Validation involves checking that the system meets to its specification and user needs </li></ul><ul><li>Evolution is concerned with modifying the system after it is in use </li></ul><ul><li>CASE technology supports software process activities </li></ul>