Comprehensive Study Guide for Software Engineering Principles, and Introduction to, Software Engineering

Professional Software Development and Engineering Foundations

  • Global Dependence on Software: The modern world cannot function without software. It controls national infrastructures, utilities, and electrical products. Industrial manufacturing, financial systems, and the entertainment industry (music, games, film, and television) are all software-intensive.
  • Software Characteristics: Software systems are abstract and intangible. They are not limited by material properties, physical laws, or manufacturing constraints, which provides unlimited potential but also leads to extreme complexity. This complexity makes software difficult to understand and expensive to modify.
  • The Software Crisis: The term 'software engineering' was proposed in 19681968 at a conference held to address the 'software crisis.' It was recognized that individual programming approaches did not scale to large systems, which were often unreliable, over budget, and delivered late.
  • Professional Activity vs. Individual Programming: Software engineering supports professional development intended for use by others, involving specification, design, and evolution. Most software is developed by teams for business purposes, devices, or products, rather than by individuals for personal use.
  • Software Definition: Software is not just computer programs; it includes all associated documentation and configuration data needed for correct operation. This includes system documentation (structure), user documentation (usage), and websites for product updates.
  • Costs of Software Engineering: In professional development, roughly 60%60\% of costs are devoted to development and 40%40\% to testing. For custom software, the cost of evolution (maintenance) often exceeds the initial development costs.
  • Distinction from Computer Science and System Engineering:
    • Computer Science: Focused on theory and fundamentals (e.g., algorithms, theories of computation).
    • Software Engineering: A practical engineering discipline concerned with all aspects of software production, applying theories where appropriate within organizational and financial constraints.
    • System Engineering: A broader discipline concerned with developing complex computer-based systems involving hardware, software, and process engineering.

Essential Software Attributes and Product Types

  • Attributes of Good Software:
    • Maintainability: Software must be written so it can evolve to meet changing customer needs.
    • Dependability and Security: Includes reliability, safety, and security. Software should not cause damage in case of failure, and malicious users must be prevented from damaging the system.
    • Efficiency: Software should not waste system resources like memory or processor cycles; it must be responsive and have low processing time.
    • Acceptability: Software must be understandable, usable, and compatible with other systems used by the target audience.
  • Types of Software Products:
    1. Generic Products: Stand-alone systems produced by a development organization and sold on the open market (e.g., databases, word processors, project-management tools). The developer controls the specification.
    2. Customized (Bespoke) Products: Systems commissioned by a specific customer and developed by a contractor (e.g., air traffic control systems, specific business process support). The customer controls the specification.
  • Product Blurring: Many systems now utilize a generic product (like SAP Enterprise Resource Planning systems) as a base, which is then adapted following customer-specific business rules and processes.

Ethical and Professional Responsibility for Software Engineers

  • Beyond Technical Skills: Software engineers must behave in a morally responsible way to be respected as professionals, adhering to standards of honesty and integrity.
  • Key Ethical Concerns:
    • Confidentiality: Respecting the confidentiality of employers or clients even without a formal agreement.
    • Competence: Avoiding misrepresentation of expertise and not accepting work outside of one's skill level.
    • Intellectual Property Rights: Awareness of patent and copyright laws and protecting the IP of clients and employers.
    • Computer Misuse: Avoiding the use of skills to misuse others' computers, from trivial game playing to serious virus dissemination.
  • ACM/IEEE Code of Ethics: A joint code of ethics and professional practice exists in short and long forms. The eight principles are:
    1. Public: Act consistently with the public interest.
    2. Client and Employer: Act in the best interests of the client and employer while remaining consistent with the public interest.
    3. Product: Ensure products meet the highest professional standards.
    4. Judgment: Maintain integrity and independence in professional judgment.
    5. Management: Promote an ethical approach to management.
    6. Profession: Advance the reputation of the profession.
    7. Colleagues: Be fair and supportive of colleagues.
    8. Self: Participate in lifelong learning and promote an ethical approach to practice.
  • Ethical Dilemmas: Choosing between employer loyalty and public safety in safety-critical systems or differing views on working for military and nuclear projects.

Software Process Models and Development Activities

  • Software Process Definition: A sequence of activities (Specification, Design and Implementation, Validation, Evolution) leading to a software product.
  • Process Perspectives: Descriptions include products (outcomes), roles (responsibilities), and pre- and post-conditions (truths before and after activities).
  • Waterfall Model: A plan-driven process where activities are separate phases: Requirements Definition, System/Software Design, Implementation/Unit Testing, Integration/System Testing, and Operation/Maintenance. It is best for well-understood requirements but is often too inflexible for modern needs.
  • Incremental Development: Specification, development, and validation are interleaved. The system is developed as a series of versions. Benefits include reduced cost of change, easier customer feedback, and rapid delivery. Drawbacks include low process visibility and potential degradation of system structure over time.
  • Reuse-Oriented Software Engineering: Focuses on professional reuse of existing components (Web services, object collections, COTS systems). Stages include Component Analysis, Requirements Modification, System Design with Reuse, and Development and Integration.
  • Design Activity Framework:
    • Inputs: Requirements specification, platform information, data description.
    • Activities: Architectural design, interface design, component design, and database design.
    • Outputs: System architecture, database specification, interface specification, component specification.

Verification, Validation, and Testing Stages

  • Verification and Validation (V&V): Intended to show the system conforms to its specification and meets customer expectations.
  • Stages of Testing:
    1. Development Testing: Components are tested by developers independently. Commonly utilizes tools like JUnit.
    2. System Testing: Integrated components are tested to find errors in interactions and verify functional and non-functional requirements.
    3. Acceptance Testing: Final stage where the system is tested with customer data before being accepted for operational use.
  • Specific Testing Types:
    • Alpha Testing: A version of the V&V process where custom systems are developed for a client until an agreement is reached.
    • Beta Testing: Delivering software to potential customers to detect errors in real-world usage scenarios before general release.

Incremental Delivery, Change, and Risk Management

  • Coping with Change: Change adds costs due to rework. Rework can be mitigated by:
    • Change Avoidance: Using prototypes to anticipate changes.
    • Change Tolerance: Using incremental development to accommodate changes at a lower cost.
  • System Prototyping: Creating an initial version to demonstrate concepts or explore design options. Objectives must be explicit (e.g., UI design, feasibility). It can reduce delivery time and help refine requirements but prototypes should generally be 'throwaway' due to lack of documentation and degraded structure.
  • Incremental Delivery: Highest priority services are delivered first. Customers gain value early and the most important services receive the most testing. Challenges include identifying common facilities used across increments and the difficulty of fitting this into traditional procurement contracts.
  • Boehm's Spiral Model: A risk-driven framework where each loop represents a phase. Sectors include:
    1. Objective Setting: Define constraints and management plans.
    2. Risk Assessment and Reduction: Analyze and mitigate risks (e.g., through prototyping).
    3. Development and Validation: Choose an appropriate development model.
    4. Planning: Decide if another loop is necessary.
  • Rational Unified Process (RUP): A hybrid model with four phases: Inception (business case), Elaboration (architectural framework), Construction (design/programming/testing), and Transition (operational deployment). Core workflows include Business Modeling, Requirements, Analysis and Design, Implementation, Testing, and Deployment.

Principles of Requirements Engineering

  • Requirement Definition: Descriptions of what a system should do and the constraints on its operation.
  • User Requirements: High-level abstract statements in natural language and diagrams.
  • System Requirements: Detailed descriptions of functions and constraints, often serving as a functional specification for the contract.
  • Functional vs. Non-functional Requirements:
    • Functional: Services the system should provide and specific reactions to inputs.
    • Non-functional: Constraints such as timing, standards, or performance. Categories include Product (availability, speed), Organizational (identity card authentication), and External (privacy regulations).
  • Quantitative Metrics for Non-functional Requirements:
    • Speed: Transactions per second (T/sT/s), user/event response time, or screen refresh time.
    • Size: Megabytes (Mbytes\text{Mbytes}) or number of ROM chips.
    • Reliability: Mean time to failure, probability of unavailability (PuP_u), or rate of failure occurrence.
    • Robustness: Time to restart after failure.

Requirements Elicitation, Specification, and Validation

  • The RE Process Spiral: Feasibility study, Elicitation and Analysis, Specification, and Validation.
  • Elicitation Techniques:
    • Interviewing: Open or closed sessions to understand stakeholder needs.
    • Scenarios: Descriptions of interaction sessions including the normal flow, error handling, and terminal states.
    • Use Cases: UML-based technique identifying actors and classes of interaction.
    • Ethnography: Observational studies to understand social and organizational contexts and implicit work practices.
  • Requirements Validation Checklist:
    • Validity: Does it perform the required functions?
    • Consistency: Are there any contradictions?
    • Completeness: Are all user-intended functions included?
    • Realism: Can it be implemented within budget and technology constraints?
    • Verifiability: Can tests be written to prove the requirement is met?
  • Requirements Management: The process of controlling changes. It involves unique identification of requirements, change management processes, and traceability policies to link requirements to design and source.

Case Studies and Practical Applications

  • Insulin Pump Control System: A safety-critical embedded system simulating a pancreas.
    • Hardware Components: Sensor, pump, controller, needle assembly, alarm, display, power supply, and insulin reservoir.
    • Logic: The blood sensor measures conductivity to determine sugar level. The controller computes the dose. If blood sugar levels fall within the safe zone of 33 and 77 units, logic determines the dose based on readings r0,r1,r2r0, r1, r2.
    • Formula: CompDose=round(r2−r14)\text{CompDose} = \text{round} \left( \frac{r2 - r1}{4} \right).
    • Safety Requirements: The system must be available and deliver correct doses to prevent coma or death.
  • Mental Health Care-Patient Management System (MHC-PMS): A medical information system with a centralized database but designed for PC use in remote clinics.
    • Goals: Generate management info to assess performance and provide medical staff with patient treatment info.
    • Constraints: Must adhere to data protection laws and mental health laws regarding compulsory detention ('sectioning'). Privacy is facilitated through access control lists.
  • Wilderness Weather Station: A sensor-based data collection system in remote areas.
    • Constituent Systems: Weather station, data management/archiving, and station maintenance.
    • Operational Context: Powered by solar/wind power and battery; uses satellite links for communication. It aggregate data locally due to narrow bandwidth and must monitor its own hardware health and power levels.