📚 Software Engineering Practices and Ethics

Chapter 1: Introduction

đŸŽ¯ Course Learning Outcomes

CLO1: Recognize Software Engineering Principles

Understand and identify software engineering principles, life cycle phases, processes, and activities that form the foundation of professional software development.

CLO3: Demonstrate Professional and Ethical Understanding

Show comprehension of professional and ethical responsibilities in software engineering, including adherence to codes of conduct and ethical decision-making.

🌟 What is Software Engineering?

Definition

Software Engineering is an engineering discipline that is concerned with all aspects of software production from the early stages of system specification through to maintaining the system after it has gone into use.

The Importance of Software Engineering

Critical Fact: The economies of ALL developed nations are dependent on software. More and more systems are software controlled, making software engineering a crucial discipline in modern society.

💰 Economic Impact

Expenditure on software represents a significant fraction of GNP (Gross National Products) in all developed countries.

📈 Cost Distribution

Software costs often dominate computer system costs. The costs of software on a PC are often greater than the hardware cost.

🔧 Maintenance

Software costs more to maintain than it does to develop. For systems with a long life, maintenance costs may be several times development costs.

💡 Focus

Software engineering is concerned with cost-effective software development using appropriate theories, methods, and tools.

Why Software Projects Fail

âš ī¸ Increasing System Complexity

As software engineering techniques improve, we can create larger and more advanced systems. This has changed expectations so systems now need to be developed faster, handle greater complexity, and have new capabilities that were previously thought impossible.

âš ī¸ Failure to Use Software Engineering Methods

It is fairly easy to write computer programs without using software engineering methods. Many companies have drifted into software development as their products evolved. They do not use software engineering methods in their everyday work. Consequently, their software is often more expensive and less reliable than it should be.

đŸ—ī¸ Software Engineering Fundamentals

Frequently Asked Questions about Software Engineering

Question Answer
What is software? Computer programs and associated documentation. Software products may be developed for a particular customer or for a general market.
What are attributes of good software? Good software should deliver the required functionality and performance to the user and should be maintainable, dependable and usable.
What is software engineering? Software engineering is an engineering discipline that is concerned with all aspects of software production.
What are fundamental software engineering activities? Software specification, software development, software validation and software evolution.
Difference between Computer Science and Software Engineering? Computer Science focuses on theory and fundamentals (the science behind computers, algorithms and mathematics). Software Engineering is concerned with the practicalities of building/developing and delivering useful software.
Difference between System Engineering and Software Engineering? System Engineering is concerned with all aspects of computer-based systems development including hardware, software and process engineering. Software Engineering is a specific part of this broader system engineering process.

Essential Attributes of Good Software

Attribute Description
Maintainability Software should be written in a way that it can evolve/progress to meet the changing needs of customers. This is a critical attribute because software change is an unavoidable requirement of a changing business environment.
Dependability Software dependability includes a range of characteristics including reliability, security and safety. Dependable software should not cause physical or economic damage in the event of system failure. Malicious users should not be able to access or damage the system.
Efficiency Software should not make wasteful use of system resources such as memory and processor cycles. Efficiency includes responsiveness, processing time, memory utilization, etc.
Acceptability Software must be acceptable to the type of users for which it is designed. This means it must be understandable, usable and compatible with other systems that they use.

Software Products

đŸ“Ļ Generic Products

Stand-alone systems that are marketed and sold to any customer who wishes to buy them.

Examples: PC software such as graphics programs, project management tools, CAD software, software for specific markets such as appointment systems for dentists.

Specification: Owned by the software developer and decisions on software changes are made by the developer.

đŸŽ¯ Customized Products

Software that is commissioned by a specific customer to meet their own needs.

Examples: Embedded control systems, air traffic control software, traffic monitoring systems.

Specification: Owned by the customer for the software and they make decisions on software changes that are required.

Application Types

đŸ’ģ Stand-alone Applications

Run on a local computer (e.g., PC). Include all necessary functionality and do not need network connection.

Example: Microsoft Word

🌐 Interactive Transaction-based Applications

Execute on a remote computer and are accessed by users from their own PCs or terminals.

Examples: Amazon, Online Banking Systems

🤖 Embedded Control Systems

Software control systems that control and manage hardware devices.

Example: Smart Thermostats for heating and cooling

📊 Batch Processing Systems

Business systems designed to process data in large batches.

Example: Payroll systems

🎮 Entertainment Systems

Systems primarily for personal use intended to entertain the user.

Examples: Netflix, Spotify

đŸ”Ŧ Systems for Modeling and Simulation

Developed by scientists and engineers to model physical processes or situations.

Example: Weather Simulation Models

What Makes Software Unique?

  • Developed, not manufactured: Unlike physical products made in factories, software is created through design and coding processes
  • Does not wear out: Software doesn't age physically, but it can deteriorate over time due to maintenance issues
  • Moving toward component-based construction: Like building with Lego pieces, but many projects still built from scratch
  • Not mass-produced: Once created, software can be easily copied and shared

âš™ī¸ Software Engineering - A Layered Technology

The Four Layers of Software Engineering

đŸ› ī¸ TOOLS
📋 METHODS
🔄 PROCESS
⭐ A QUALITY FOCUS

Hover over each layer to explore

⭐ A Quality Focus (Foundation)

Any engineering approach must rest on an organizational commitment to quality. Total quality management, Six Sigma and similar philosophies foster a continuous process improvement culture.

🔄 Process Layer

Defines a framework that must be established for effective delivery of software engineering technology. Includes communication, planning, modeling, construction, and deployment.

📋 Methods Layer

Provides the technical how-to's for building software. Encompasses requirements analysis, design, program construction, testing, and support.

đŸ› ī¸ Tools Layer

Provides automated or semi-automated support for the process and methods. Includes CASE tools, IDEs, testing frameworks, etc.

The Software Process

Also known as Software Life Cycles, it mandates a phased approach to software development. It provides guidance on what must be created and when, and guides how to create and evaluate artifacts.

Process Components

Generic Process Framework Activities

  1. Communication & Planning: Collaborate with stakeholders to understand requirements and constraints
  2. Software Specification: Where customers and engineers define the software to be produced
    • Analysis of requirements
    • Modeling (creating abstract representations)
  3. Software Development:
    • Design
    • Construction
  4. Software Validation: Where the software is checked to ensure it meets customer requirements
  5. Deployment & Software Evolution: Where the software is modified to reflect changing customer and market requirements

Umbrella Activities

These activities support the framework activities and are ongoing throughout the software process:

📊 Project Management

Track progress, manage resources, and ensure project goals are met

âš ī¸ Risk Management

Identify, evaluate, and prevent risks related to activities

✅ Quality Assurance

Ensure software meets defined or standardized quality specifications

đŸ‘Ĩ Technical Reviews

Peer review examining the suitability of the software product

📏 Measurement

Ensure delivered results are accurate, objective and repeatable

🔧 Configuration Management

Track and control changes in the software

â™ģī¸ Reusability Management

Manage reusable components to increase productivity

📄 Work Product Preparation

Create models, documents and other software artifacts

Internet & Web-Based Software Engineering

The Web is now a platform for running applications, and organizations are increasingly developing web-based systems rather than local systems.

Key Characteristics

âš ī¸ Web Application Attributes

  • Network Intensiveness: Must serve diverse community of clients
  • Concurrency: Large number of users may access simultaneously
  • Unpredictable Load: Number of users may vary by orders of magnitude
  • Performance: Users may go elsewhere if they wait too long
  • Availability: Users demand "24/7/365" access
  • Data-Driven: Primary function often to present hypermedia content

âš–ī¸ Software Engineering Ethics

Why Ethics Matter

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 behavior is more than simply upholding the law but involves following a set of principles that are morally correct.

The Rationale for Code of Ethics

"Computers have a central and growing role in commerce, industry, government, medicine, education, entertainment and society at large. Software engineers are those who contribute by direct participation or by teaching, to the analysis, specification, design, development, certification, maintenance and testing of software systems."

Because of their roles in developing software systems, software engineers have significant opportunities to do good or cause harm, to enable others to do good or cause harm, or to influence others to do good or cause harm.

To ensure their efforts are used for good, software engineers must commit themselves to making software engineering a beneficial and respected profession.

Issues of Professional Responsibility

🔒 Confidentiality

Engineers should normally respect the confidentiality of their employers or clients irrespective of whether or not a formal confidentiality agreement has been signed.

đŸ’ŧ Competence

Engineers should not misrepresent their level of competence. They should not take on work beyond their abilities or expertise.

ÂŠī¸ Intellectual Property Rights

Engineers should be aware of local laws governing intellectual property such as patents and copyright. They should protect the intellectual property of employers and clients.

đŸšĢ Computer Misuse

Software engineers should not use their technical skills to misuse other people's computers, from trivial (game playing) to serious (dissemination of viruses).

ACM/IEEE Code of Ethics and Professional Practice

ACM = Association for Computing Machinery

IEEE = Institute of Electrical and Electronics Engineers

Professional societies have cooperated to produce a code of ethical practice. Members sign up to the code when they join. The Code contains Eight Principles for professional software engineers.

PUBLIC

Software engineers shall act consistently with the public interest.

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.

PRODUCT

Software engineers shall ensure that their products and related modifications meet the highest professional standards possible.

JUDGMENT

Software engineers shall maintain integrity and independence in their professional judgment.

MANAGEMENT

Software engineering managers and leaders shall subscribe to and promote an ethical approach to the management of software development and maintenance.

PROFESSION

Software engineers shall advance the integrity and reputation of the profession consistent with the public interest.

COLLEAGUES

Software engineers shall be fair to and supportive of their colleagues.

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.

Why Have a Professional Code of Ethics?

Important Notes:

  • These are not clear-cut rules or policies for all situations
  • Rather, they are statements of professional belief that should inform decision-making
  • They are not laws - not passed by legislative bodies and not intended to encourage lawsuits
  • They might help resolve important questions in certain disputes

Ethical Dilemmas

Software engineers may face difficult situations such as:

  • Disagreement in principle with the policies of senior management
  • Employer acts unethically and releases a safety-critical system without finishing testing
  • Participation in the development of military weapons systems or nuclear systems

📖 Case Studies

Case Study 1: Personal Insulin Pump

Type: Embedded Control System

Description: An insulin pump used by diabetics to maintain blood glucose control.

Function:

  • Collects data from a blood sugar sensor
  • Calculates the amount of insulin required
  • Calculation based on rate of change of blood sugar levels
  • Sends signals to micro-pump to deliver correct dose

Safety-Critical Aspects:

  • Low blood sugar: Can lead to brain malfunctioning, coma, and death
  • High blood sugar: Long-term consequences such as eye and kidney damage

Requirements:

  • System shall be available to deliver insulin when required
  • System shall perform reliably and deliver correct amount of insulin
  • System must be designed and implemented to always meet these requirements

Case Study 2: Mentcare - Mental Health Care Patient Management System

Type: Information Management System

Description: A medical information system that maintains information about patients suffering from mental health problems and the treatments they have received.

Context:

  • Most mental health patients don't require dedicated hospital treatment
  • Need to attend specialist clinics regularly
  • Clinics can be held in hospitals, local medical practices, or community centers

System Architecture:

  • Uses centralized database of patient information
  • Designed to run on PC for sites without secure network connectivity
  • Can download and use local copies of patient records when disconnected
  • Multiple Mentcare clients connect via network to Mentcare server
  • Server connects to patient database

Goals:

  • Generate management information for health service managers
  • Provide medical staff with timely information to support patient treatment

Key Features:

  • Individual Care Management: Create records, edit information, view patient history, data summaries
  • Patient Monitoring: Monitor records and issue warnings if problems detected
  • Administrative Reporting: Generate monthly management reports

System Concerns:

  • Privacy: Patient information must be confidential and never disclosed to unauthorized personnel
  • Safety: System should warn about potentially suicidal or dangerous patients
  • Availability: System must be available when needed to prescribe correct medication

🔑 Key Points 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 systems and each requires appropriate software engineering tools and techniques for development.

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 behavior expected of their members.

↑