Ch1 Introduction

Fundamentals and Definitions of Software Engineering

  • Definition of Software:

    • Software consists of instructions (computer programs) that, when executed, provide desired features, functions, and performance.

    • Software includes data structures that enable the programs to adequately manipulate information.

    • Software encompasses documentation that describes the operation, deployment, and use of the programs.

  • Definition of Software Engineering:

    • IEEE Definition: The application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software; that is, the application of engineering to software, as well as the study of these approaches.

    • SeeDiscipline Context: An engineering discipline concerned with all aspects of software production from the early stages of system specification through to maintaining the system after it has gone into active use.

    • Engineering Discipline Aspect: Employs appropriate theories and systematic methods to solve problems while operating within organizational, schedule, and financial constraints.

    • Scope of Production: Extends beyond the technical processes of coding and development to encompass project management, quality assurance, and the creation of tools, methods, and frameworks supporting software production.

  • Ubiquity of Software:

    • Software is integrated into virtually all aspects of modern daily life, critical infrastructure, and advanced technology.

    • Examples of software-driven domain applications include consumer appliances (such as automated digital toasters), aviation and commercial airliners, high-speed rail transportation networks, urban traffic signal management systems, aerospace exploration vehicles (such as space shuttles), and modern medical and personal care devices.


Everyday embedded software applications

Software Project Failure Rates and Common Drivers

  • Software Failure Statistics:

    • In 20252025, general IT software project failure rates remain high, ranging between 31%31\% and 70%70\%.

    • Generative AI (20252025): Approximately 95%95\% of enterprise AI pilot projects fail to deliver measurable financial returns within 6 months6\,\text{months}, primarily due to high-level organizational and adoption failures.

    • General IT/Software Project Outcomes:

    • Only about 25%25\% to 30%30\% of software projects are fully successful (delivered on time, within budget, and containing all specified features).

    • Between 50%50\% and 70%70\% of projects experience significant cost, schedule, or quality issues.

    • Approximately 31%31\% of all initiated software projects are cancelled prior to completion.

  • Key Drivers and Causes of Software Failure:

    • Lack of clear project goals and vision (identified as the primary factor in 37%37\% of project failures).

    • Poor underlying code quality and architectural flaws.

    • Inadequate unit, integration, and system testing.

    • Inefficient or non-standardized development processes.

    • Unrealistic project goals and impossible deadlines.

    • Inaccurate estimation of required resources, personnel, and time.

    • Poorly defined or changing system requirements.

    • Inadequate or misleading status reporting.

    • Unmanaged project risks.

    • Inability to handle growing system complexity.

    • Premature adoption of immature technologies.

    • Sloppy development practices and poor software hygiene.

    • Ineffective project management.

    • Stakeholder politics and organizational misalignments.

  • Communication Gaps in Development:

    • Software projects frequently fail due to severe misalignments between different project roles across the lifecycle (demonstrated by the classic tree swing model).

    • Disconnects exist between how the customer explains a requirement, how the project leader interprets it, how the analyst designs it, how the programmer writes it, how the business consultant describes it, how the system is documented, what operations installs, how the customer is billed, how the project is supported, and what the customer actually needed.


Tree swing software development communication gap

Case Studies: Financial and Human Costs of Software Failures

  • High-Profile Product Failures:

    • Google Wave: Discontinued due to poor adoption and lack of clear market fit.

    • Google Video: Retired following the acquisition and prioritized growth of YouTube.

    • Google Buzz: Discontinued over privacy concerns and limited traction.

    • Google Notebook and Shared Stuff: Development halted to shift focus to other core tools.

    • Google Answers: Halted after failing to achieve long-term commercial viability.

  • Massive Financial Losses Due to Software Faults:

    • NASA Mars Climate Orbiter/Lander (September 1999): Crashed during atmospheric entry due to a unit integration fault where software failed to convert imperial units to metric units, resulting in a loss of over 50 million50\,\text{million} dollars.


NASA Mars Lander
  • High-Volume Web Application Downtime Costs:

    • Financial Services: System outages cost an average of 6.5 million6.5\,\text{million} dollars per hour.

    • Credit Card Sales Applications: Outages result in losses of approximately 2.4 million2.4\,\text{million} dollars per hour.

    • Amazon Outage (August 2013): A 30 minute30\,\text{minute} service failure resulted in an estimated direct loss of 2 million2\,\text{million} dollars.

  • Security Failures: In 20072007, security firm Symantec established that the majority of digital security vulnerabilities are caused directly by faulty, bug-ridden software.

    • Ariane-5 Rocket Launch Failure Case Study:

  • Launch Date: June 1996.

  • Cost of Failure: Over 10 years10\,\text{years} of engineering development and 7 billion7\,\text{billion} dollars in economic loss.

  • Background and Cause:

    • Ariane-5 reused flight control software directly from the successful Ariane-4 rocket launcher.

    • On Ariane-4, software variables were calibrated to prevent contract arithmetic exceptions that were physically impossible given Ariane-4's performance profile.

    • Because the software passed simulations on Ariane-4, developers assumed it would work seamlessly on Ariane-5.

    • However, Ariane-5 possessed a higher acceleration profile, causing a faster velocity trajectory. This caused an unexpected sensor data overflow when a 64-bit floating-point value was converted into a 16-bit signed integer register.

  • Cascade Failure:

    • The arithmetic overflow produced an "Unhandled Exception" error.

    • The flight computer automatically switched execution to the redundant backup computer, which was running identical code and suffered the exact same arithmetic overflow error.

    • Interpreting the hardware crash as a catastrophic loss of orientation control, the flight software initiated a self-destruct sequence 37 seconds37\,\text{seconds} after launch.


Ariane-5 rocket explosion
  • Fatal Software Failures Involving Loss of Human Life:

    • Therac-25 Medical Radiation Accelerator (1985–1987):

    • A radiation therapy machine designed to deliver targeted low doses of radiation through beam-shaping filters to treat cancer patients.

    • Contained a software race condition bug that allowed the machine to operate in high-energy mode without placing the protective beam-shaping filter in place.

    • Delivered lethal doses of radiation directly to patients, resulting in 66 verified patient deaths.


Therac-25 medical radiation machine
  • Boeing 737 MAX Crashes (October 2018 & March 2019):

    • Lion Air Flight 610 (October 2018) crashed into the ocean, resulting in 189189 fatalities.

    • Ethiopian Airlines Flight 302 (March 2019) crashed shortly after takeoff, resulting in 157157 fatalities.

    • Technical Failure Mechanism: Faulty readings from a single angle-of-attack (AoA) sensor caused the Maneuvering Characteristics Augmentation System (MCAS) software to misinterpret flight pitch and repeatedly push the aircraft nose down automatically, overcoming pilot manual intervention.

    • Total Human and Financial Impact: Tragic loss of 346346 lives, worldwide grounding of the aircraft fleet, and operational losses to Boeing estimated in tens of billions of dollars.

Software Myths vs. Realities in Professional Practice

  • General Perspective:

    • Meilir Page-Jones Statement: "Software is too important to be left to programmers."

  • Myth 1: Documentation vs. Quality

    • Myth: Software engineering practices slow development down by forcing teams to generate voluminous, unnecessary documentation.

    • Reality: Software engineering focuses on creating product quality rather than paperwork. High quality significantly reduces rework. Reduced rework leads directly to faster delivery times.

  • Myth 2: Sufficiency of Informal Requirements

    • Myth: A general statement of objectives is sufficient to start writing code; functional details can be added later in the cycle.

    • Reality: Poor up-front definition is the leading root cause of software project failure. A detailed formal description of the information domain, functions, behavior, performance bounds, and system interfaces is mandatory, requiring thorough communication between customer and developer prior to coding.

  • Myth 3: Final Deliverables

    • Myth: The only deliverable work product required for a successful project is the executable computer program.

    • Reality: A working program represents only one part of a complete software configuration. Documentation forms the core foundation for software engineering practices and provides mandatory guidance for post-release software support.

  • Myth 4: Project Completion Scope

    • Myth: Once the code is written, compiled, and verified to work, the engineering process is finished.

    • Reality: "The sooner you begin 'writing code', the longer it'll take you to get done." Industry statistics demonstrate that between 60%60\% and 80%80\% of all overall lifetime software effort occurs after the application is initially delivered to the customer.

Frequently Asked Questions & Core Software Engineering Concepts

  • Essential Attributes of Good Software:

    • Maintainability: Code must be structured so that it can evolve continually to meet the changing business requirements of clients.

    • Dependability and Security: Includes reliability, safety, and security. Software must not inflict physical or financial damage during system failures, and malicious entities must be prevented from accessing or compromising system assets.

    • Efficiency: Systems must optimize compute resource utilization (such as memory overhead, CPU cycles, processing latency, and user interface responsiveness).

    • Acceptability: Software must be usable, understandable, accessible, and compatible with the target user base and their existing toolchains.

  • Fundamental Software Engineering Activities:

    • Software Specification: Defining the functionality, operational scope, and system constraints through collaboration between users and engineers.

    • Software Development: Designing the system architecture, component structures, and writing code.

    • Software Validation: Verifying and testing the application to confirm it satisfies customer requirements.

    • Software Evolution: Modifying, maintaining, and updating the application over time to adjust to changing market or client demands.

  • Disciplines Comparison:

    • Computer Science vs. Software Engineering:

    • Computer Science: Focuses primarily on theoretical foundations, algorithms, and computational principles.

    • Software Engineering: Focuses on the practicalities of engineering, building, and delivering usable software systems.

    • System Engineering vs. Software Engineering:

    • System Engineering: Encompasses all domain elements of complex computer system development, including hardware components, software systems, infrastructure, and process engineering.

    • Software Engineering: Formally functions as a specialized subset within the overarching system engineering discipline.

  • Key Industry Challenges:

    • Coping with rapidly increasing system diversity across platforms.

    • Meeting market demands for drastically reduced delivery schedules.

    • Building trustworthy, safe, and secure software applications.

  • Cost Distribution Profile:

    • Approximate distribution of initial software engineering costs: 50%50\% for development, 20%20\% for testing, and 30%30\% for deployment and maintenance.

    • For custom-built enterprise systems, long-term evolution and maintenance costs routinely exceed initial project development expenditures.

  • Methodological Flexibility:

    • No single development methodology applies universally across all domain types.

    • Prototyping strategies are appropriate for interactive software like video games, whereas safety-critical systems (e.g., flight or medical control) mandate complete, mathematically verifiable specifications prior to implementation.

  • Impact of Artificial Intelligence:

    • AI transforms software engineering workflows by automating code generation and analysis, improving testing efficiency, and raising overall software reliability.

Classification of Software Products and Applications

  • Classification by Target Distribution:

    • Generic Software Products:

    • Stand-alone, off-the-shelf software packages produced by a commercial vendor and sold on the open market to any customer.

    • System specification decisions are owned solely by the software vendor.

    • Examples: Graphics manipulation programs, computer-aided design (CAD) applications, project management suites, and specific vertical market applications (such as dental office management systems).

    • Customized Software Products:

    • Bespoke software systems specifically commissioned by a single client to satisfy unique operational specifications.

    • System specifications and modification approvals are controlled directly by the client.

    • Examples: Air traffic control infrastructure, embedded automotive controllers, and municipality traffic monitoring networks.

  • Major Application Domains:

    • System Software: Operating systems, drivers, and infrastructure components that manage hardware directly.

    • Application Software: Standalone desktop or enterprise programs that process discrete business functions.

    • Engineering/Scientific Software: High-performance computational applications executing numerical simulations, CAD models, or physical analytics.

    • Embedded Software: Microcode embedded into physical products to manage hardware behaviors (such as engine controllers or smart appliances).

    • Product-Line Software: Reusable platform software adapted across a family of related products.

    • Web/Mobile Applications: Systems hosted across networked environments or executed on handheld platform operating systems.

    • Artificial Intelligence Software: Systems executing non-algorithmic solutions, pattern recognition, neural networks, robotics, and complex game-playing routines.

Modern Paradigms: Mobile Apps, Cloud Computing, and Software Product Lines

  • Mobile Application Characteristics:

    • Mobile applications execute on mobile platform architectures (smartphones, tablets) using responsive interfaces optimized for device screens and geographic location contexts.

    • Access both cloud-hosted application programming interfaces (APIs) and local platform hardware capabilities.

    • Architecture Categories:

    • Native Applications: Written specifically for the host mobile OS, allowing direct, uninhibited interaction with onboard hardware peripherals (such as cameras, GPS sensors, and accelerometers).

    • Mobile Web / Hybrid Applications: Accessed via platform web browsers or thin web-wrapper runtimes.

    • Security Threats in Mobile Platforms:

    • In August 20172017, technology publication Ars Technica (reported by Dan Goodin) disclosed that over 4,0004{,}000 mobile applications contained the SonicSpy spyware strain.

    • SonicSpy applications posed as benign utilities while covertly capturing microphone audio recordings and stealing system logs without user consent.


SonicSpy malware news report
  • Importance of Mobile Connectivity:

    • Survey research conducted by The Boston Consulting Group (BCG) and comScore demonstrated user reliance on connected mobile devices:

    • More than 3 in 103\,\text{in}\,10 respondents (>30%> 30\%) indicated they would stop meeting friends in person rather than give up their mobile devices.

    • 45%45\% of respondents would postpone taking a vacation for an entire year.

    • 46%46\% of respondents expressed willingness to surrender one day off per week.

    • More than 55%55\% of respondents would forgo dining out for 12 months12\,\text{months}.

  • Cloud Computing Ecosystems:

    • Delivers elastic distributed compute, data storage, and networking resources accessible on demand over network connections.

    • Requires designing clear separation between frontend and backend software architecture:

    • Frontend Services: Client execution environments, native interfaces, and web applications running on desktops, laptops, smartphones, or tablets.

    • Backend Services: Physical or virtualized compute instances, database clusters, message queues, runtime environments, and storage systems.


Cloud Computing Architecture Ecosystem
  • Cloud Service Categorization:

    • Infrastructure as a Service (IaaS): Provides raw virtualized hardware resources over the internet, including cloud servers, virtual network topologies, and block storage (e.g., AWS EC2, Google Compute Engine).

    • Platform as a Service (PaaS): Provides managed execution platforms and application runtimes allowing developers to build and deploy software without configuring hardware infrastructure (e.g., Microsoft Azure App Services, Google App Engine).

    • Software as a Service (SaaS): Delivers complete applications directly over the web, accessible via browsers on subscription models (e.g., Google Workspace, Salesforce, Dropbox).

    • Function as a Service (FaaS): Serverless event-driven compute models executing discrete code blocks dynamically without managing persistent backend servers (e.g., AWS Lambda, Google Cloud Functions).

  • Software Product Line (SPL) Engineering:

    • A Software Product Line consists of a suite of software-intensive systems sharing a common set of features, underlying architecture, and strategic core assets.

    • Shared assets include functional requirements, software architectures, design patterns, reusable code components, test suites, and configuration models.

    • Product lines streamline development by systematically building new software variants from shared core components.

    • Industrial Analogy: Fast food menus (e.g., McDonald's creating items like the Big Mac, Quarter Pounder, McChicken, and File