Software Engineering Notes

Introduction to Software Engineering

What is Software?

  • Software is a set of machine-readable instructions for a computer's processor.
  • A software system includes intercommunicating components, programs, configuration files, and documentation.
  • Software products can be:
    • Generic: Sold to a range of customers.
    • Bespoke (custom): Developed for a single customer to their specifications.

Software Projects vs. Other Projects

  • Differences in software engineering compared to other engineering disciplines:
    • Difficulty for customers to completely specify requirements.
    • Difficulty for developers to fully understand customer needs.
    • Software requirements change regularly.
    • Environments change regularly.
    • Software is intangible, relying on experience, thought, and imagination.
    • Intangibility makes specifying software difficult.
    • Communication gaps between customers and developers.
    • Difficulty in exhaustively testing software.
  • Software can be developed in diverse contexts, from embedded systems to giant manufacturing systems, unlike other engineering disciplines with narrow scope.
  • Replication of software is trivial, making it elastic and complex over time.
  • Small code changes can significantly alter system behavior.

Main Types of Software

System Software
  • Designed to operate and control computer hardware and provide a platform for application software.
    • System Management Programs
      • Operating Systems
      • Operating Environments
      • Database Management Systems
    • System Support Programs
      • System Utilities
      • Performance Monitors
      • Security Monitors
    • System Development Programs
      • Programming Language Translators
      • Programming Environments
      • Computer Aided Software Engineering (CASE) Packages
Application Software
  • Designed to carry out operations for a specific application.
    • General Purpose Application Programs
      • Word Processing
      • Electronic Spread Sheets
      • Database Managers
      • Graphics Software
      • Integrated Packages
    • Application Specific Programs
      • Accounting, General Ledgers etc.
      • Marketing-Sales Analysis etc.
      • Manufacturing-Production Control etc.
      • Finance-Capital Budgeting etc.
Application Software Types Cont…
  • Stand-alone applications:
    • Run on a local computer (e.g., PC) with all necessary functionality and no network connection needed.
  • Interactive transaction-based applications:
    • Execute on a remote computer and are accessed by users from PCs or terminals (e.g., e-commerce applications).
  • Embedded control systems:
    • Control and manage hardware devices.
  • Batch processing systems:
    • Process data in large batches, creating corresponding outputs.
  • Entertainment systems:
    • Primarily for personal use.
  • Systems for modeling and simulation:
    • Model physical processes or situations with separate, interacting objects.
  • Data collection systems:
    • Collect data from the environment using sensors and send it to other systems for processing.
  • Systems of systems:
    • Composed of multiple other software systems.

Software Costs

  • Software costs often dominate computer system costs.
  • Maintenance costs exceed development costs as maintenance can be several times development costs for long-life systems.
  • Software engineering aims for cost-effective software development.

Cost of Hardware vs. Software

  • Software development cost has increased rapidly, while hardware costs have decreased with technological advancements.

Failure Curves for Software & Hardware

  • Software is engineered/developed, not manufactured.
  • Software does not wear out like hardware.
  • Hardware failure rate is high initially, decreases over time as quality improves, then increases again during the wear-out stage.
  • The hardware failure curve is a "bathtub" curve.
Failure "Bathtub" Curve for Hardware
  • Failure rate
    • Infant mortality
    • Wear out

Failure Curve for Software

  • Software projects fail due to:
    • Increasing system complexity: Demands change as systems need to be built and delivered more quickly, with larger capabilities.
    • Failure to use software engineering methods: Resulting in more expensive and less reliable software.
  • Software failure rate is initially high due to undetected bugs/errors.
  • Software becomes stable over time as it improves.
  • Software does not wear out unless new features cause instability.
  • Failure rate can increase with new changes introduced.
Failure Curve for Software Cont…
  • Failure rate
    • Increase failure rates due to side effects
    • change
    • Actual curve
    • Idealized curve

Professional Software Development

  • Software development includes programming, documenting, testing, and bug fixing.
  • A software development methodology is a framework to structure, plan, and control the software development process.
  • The software development process is considered a life cycle of a software product.

Problems in Software Development

  • Large software solves 'wicked' problems.
  • Software engineering requires coordination across disciplines.
  • Almost infinite possibilities for design trade-offs across components.
  • Mutual distrust and lack of understanding across engineering disciplines.
  • Systems must last many years in a changing environment.
  • Efficiently and effectively developing requirements is challenging.
  • Tooling may change as quickly as client's minds.
Problems in Software Development Cont…
  • User expectations increase as technology becomes more sophisticated.
  • Adding personnel to a late project will just make it later, and may not increase productivity
  • Communication among various constituencies is difficult due to different "languages." Developers may lack domain knowledge of clients/users. The larger the project, the more difficult the communications problems become.

Why do we need Professional Software Development?

  • Software development differs from other development products because:
    • Customers find it difficult to completely specify requirements.
    • Developers find it difficult to fully understand customer needs.
    • Software requirements change regularly.
    • Software is intangible.
    • It is difficult to test software exhaustively.
  • A proper approach is needed to develop good quality software.

Key Features of a Good Software

  • Maintainability
    • Software should evolve to meet changing customer needs.
  • Dependability and security
    • Includes reliability, security, and safety.
    • Dependable software should not cause physical or economic damage.
    • Malicious users should not access or damage the system.
  • Efficiency
    • Should not waste system resources (memory, processor cycles).
    • Includes responsiveness, processing time, memory utilization.
  • Acceptability
    • Must be understandable, usable, and compatible with other systems.

How to make a good quality software?

  • Cannot develop software simply by knowing programming languages, and you should follow some process and proper approach in order to develop a good quality software.

The Solution: Software Engineering

  • Software engineering is an engineering discipline concerned with all aspects of software production, from specification to maintenance.
  • Engineering discipline:
    • Uses appropriate theories and methods to solve problems within organizational and financial constraints.
  • All aspects of software production:
    • Includes project management and development of tools and methods.
The Solution: Software Engineering Cont…
  • Individuals and society rely on advanced software systems.
  • Need to produce reliable and trustworthy systems economically and quickly.
  • Cheaper in the long run to use software engineering methods for software systems.
  • Majority of costs are for changing software after it is in use.

Software Engineering: Definitions

  • Simple Definition: Designing, building and maintaining large software systems
  • A generic definition: Use of systematic, engineering approach in all stages of software development and project management to develop high quality and economical software using appropriate software tools

Software Engineering: Definitions

  • Software engineering is concerned with the theories, methods, and tools for developing, managing, and evolving software products.
  • I Sommerville ‘The practical application of scientific knowledge in the design and construction of computer programs and the associated documentation required to develop, operate and maintain them’
  • B.W.Boehm

Software Engineering: Definitions

  • 'The establishment and use of sound engineering principles in order to obtain economically software that is reliable and works efficiently on real machines’
  • F.L. Bauer
  • ‘The application of systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software’
  • IEEE Standard 610.12

Software Engineering Fundamentals

  • Fundamental principles apply to all software systems:
    • Systems should be developed using a managed and understood development process.
    • Dependability and performance are important.
    • Understanding and managing software specification and requirements are important.
    • Reuse existing software where appropriate.

Key Activities of Software Process

  • Software specification:
    • Customers and engineers define the software and constraints.
  • Software development:
    • Software is designed and programmed.
  • Software validation:
    • Software is checked to ensure it meets customer requirements.
  • Software evolution:
    • Software is modified to reflect changing requirements.

Key Challenges facing Software Engineering

  • Heterogeneity
    • Systems must operate across networks with different computers and mobile devices.
  • Business and social change
    • Need to change existing software and rapidly develop new software.
  • Scale
    • Software ranges from small embedded systems to Internet-scale, cloud-based systems.
  • Security and trust
    • Trust in software is essential.

Software Engineering vs. System Engineering

  • System engineering is concerned with all aspects of computer-based systems development, and Includes hardware, software, and process engineering.
  • Software engineering is part of system engineering and is concerned with developing the software infrastructure, control, applications, and databases in the system.
  • System engineers are involved in system specification, architectural design, integration, and deployment.

Software Engineering Diversity

  • There are many different types of software system and there is no universal set of software techniques that is applicable to all of these.
  • The software engineering methods and tools used depend on the type of application being developed, the requirements of the customer and the background of the development team.

Web-based Software Engineering

  • The Web is a platform for running applications.
  • Organizations are increasingly developing web-based systems.
  • Web services allow application functionality to be accessed over the web.
  • Cloud computing is an approach to the provision of computer services where applications run remotely on the ‘cloud’ .
  • Users do not buy software but pay according to use.
Web-based Software Engineering Cont…
  • Though the web-based systems are complex distributed systems, the fundamental principles of software engineering discussed previously are as applicable to them as they are to any other types of system.
  • The fundamental ideas of software engineering apply to web-based software in the same way that they apply to other types of software system.

Features of Web-based Software Engineering

  • Software reuse
    • Software reuse is the dominant approach for constructing web-based systems.
  • Incremental and agile development
    • Web-based systems should be developed and delivered incrementally.
Features of Web-based Software Engineering Cont…
  • Service-oriented systems
    * Software may be implemented using service-oriented software engineering, where the software components are stand-alone web services.
  • Rich interfaces
    • Interface development technologies such as AJAX and HTML5 have emerged that support the creation of rich interfaces within a web browser.

Software engineering ethics

  • Software engineering involves wider responsibilities than simply the application of technical skills.
  • Software engineers must behave in an honest and ethically responsible way if they are to be respected as professionals.
  • Ethical behaviour is more than simply upholding the law but involves following a set of principles that are morally correct.

Issues of Professional Responsibility

  • Confidentiality
    • Engineers should normally respect the confidentiality of their employers or clients.
  • Competence
    • Engineers should not misrepresent their competence.
  • Intellectual property rights
    • Engineers should be aware of local laws governing the use of intellectual property such as patents, copyright, etc.
  • Computer misuse
    • Software engineers should not use their technical skills to misuse other people’s computers.

ACM/IEEE Code of Ethics

  • The professional societies in the US have cooperated to produce a code of ethical practice.
  • Members of these organisations sign up to the code of practice when they join.
  • The Code contains eight Principles related to the behaviour of and decisions made by professional software engineers, including practitioners, educators, managers, supervisors and policy makers, as well as trainees and students of the profession.

Rationale for the Code of Ethics

  • Software engineers have significant opportunities to do good or cause harm.
  • Software engineers must commit themselves to making software engineering a beneficial and respected profession.

The ACM/IEEE Code of Ethics

  • Software Engineering Code of Ethics and Professional Practice
    ACM/IEEE-CS Joint Task Force on Software Engineering Ethics and Professional Practices
    Without the aspirations, the details can become legalistic and tedious; without the details, the aspirations can become high sounding but empty; together, the aspirations and the details form a cohesive code.

Ethical Principles

  1. PUBLIC - Software engineers shall act consistently with the public interest.
  2. CLIENT AND EMPLOYER - Software engineers shall act in a manner that is in the best interests of their client and employer consistent with the public interest.
  3. PRODUCT - Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.
  4. JUDGMENT - Software engineers shall maintain integrity and independence in their professional judgment.
  5. MANAGEMENT - Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.
  6. PROFESSION - Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.
  7. COLLEAGUES - Software engineers shall be fair to and supportive of their colleagues.
  8. SELF - 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.

Ethical Dilemmas

  • Disagreement in principle with the policies of senior management.
  • Your employer acts in an unethical way and releases a safety-critical system without finishing the testing of the system.
  • Participation in the development of military weapons systems or nuclear systems.

Activity

  • Identify the differences between Software development projects and other type of development projects.
  • Identify the differences between generic software product development and custom software development?
  • Briefly discuss why it is usually cheaper in the long run to use software engineering methods and techniques for software systems.

Summary

  • Software engineering is an engineering discipline concerned with all aspects of software production.
  • Essential software product attributes are maintainability, dependability and security, efficiency and acceptability.
  • The high-level activities of specification, development, validation and evolution are part of all software processes.
  • The fundamental notions of software engineering are universally applicable to all types of system development.
  • There are many different types of system and each requires appropriate software engineering tools and techniques for their development.

Summary

  • The fundamental ideas of software engineering are applicable to all types of software system.
  • Software engineers have responsibilities to the engineering profession and society. They should not simply be concerned with technical issues.
  • Professional societies publish codes of conduct which set out the standards of behaviour expected of their members.