Software Engineering I – Comprehensive Study Notes
Introduction to Software Engineering
- Software Engineering is an engineering discipline concerned with all aspects of software production from early system specification through to maintenance after use.
- It covers theories, methods and tools for professional software development.
- The field is driven by the essential role software plays in economies and daily life, including the fact that the economies of developed nations are dependent on software and an increasing number of systems are software-controlled.
- Software expenditure represents a significant fraction of Gross National Product (GNP) in all developed countries.
Economic Significance and Costs
- Software costs often dominate total computer system costs; on PCs, software costs can exceed hardware costs.
- Maintenance costs usually exceed development costs, especially for systems with long lifespans where maintenance can be several times development.
- Therefore, software engineering aims for cost-effective software development.
- For most systems, the majority of lifecycle costs arise after initial deployment due to maintenance and evolution.
- extDevelopmentcosts=0.60×Total costs,Testing costs=0.40×Total costs. (as cited in the FAQs on software engineering)
Software Project Failure and Challenges
- Increasing system complexity drives the need for better software engineering methods.
- As systems scale up, there is demand for faster delivery, larger scope, and new capabilities previously thought impossible.
- Failure occurs when organizations write programs without applying software engineering methods; drift into ad-hoc practices can lead to higher costs and less reliable software.
Professional Software Development: Core Concepts
- Software engineering is an engineering discipline that addresses all aspects of software production, not just coding.
- Fundamental activities include: software specification, software development, software validation, and software evolution.
- There is a distinction between software engineering and computer science (the latter focuses more on theory and fundamentals; the former on practical development and delivery of usable software).
- Software engineering also differs from system engineering; system engineering covers hardware, software and process engineering, while software engineering is the software-specific portion of this broader process.
Frequently Asked Questions (Key Definitions)
- What is software?
- Computer programs and associated documentation; may be customer-specific or mass-produced.
- Attributes of good software?
- Delivers required functionality and performance; maintainable, dependable and usable.
- What is software engineering?
- An engineering discipline concerned with all aspects of software production.
- Fundamental software engineering activities?
- Software specification, software development, software validation, software evolution.
- Difference between software engineering and computer science?
- CS emphasizes theory; SE emphasizes practical development and delivery.
- Difference between software engineering and system engineering?
- System engineering covers hardware, software and processes; software engineering is the software-focused part of that process.
- Key challenges in SE?
- Coping with increasing diversity, reducing delivery times, and developing trustworthy software.
- Costs of SE?
- Roughly 60% development costs and 40% testing costs; for custom software, evolution costs often exceed development costs.
- Best SE techniques?
- No one-size-fits-all method; different techniques suit different systems (e.g., prototypes for games, complete specifications for safety-critical systems).
- Web impact on SE?
- Web enables software services and distributed service-based systems; has driven advances in languages and reuse.
Software Products and Customization
- Generic (stand-alone) products
- Marketed to a broad audience; examples include PC graphics software, project management tools, CAD, market-specific software like dentist appointment systems.
- Customized products
- Commissioned by a specific customer to meet their needs (embedded control, air traffic control, traffic monitoring).
Product Specification Ownership
- Generic products
- The developer owns the specification; changes are decided by the developer.
- Customized products
- The customer owns the specification and makes decisions about changes.
Essential Attributes of Good Software
- Maintainability
- Software should be written so it can evolve with changing customer needs; maintenance is inevitable.
- Dependability and security
- Reliability, security, and safety; prevent damage if failures occur; protect against malicious access.
- Efficiency
- Avoid wasteful use of resources (memory, CPU); consider responsiveness, processing time, memory utilization.
- Acceptability
- Usable and understandable by intended users; compatible with other systems.
Software Engineering Fundamentals
- Software engineering applies to all aspects of software production from specification to maintenance.
- Engineering discipline involves using theories and methods within organizational/financial constraints.
- All aspects of production are included: not just technical development but also project management and tool development to support production.
Importance of Software Engineering
- Society increasingly relies on reliable and trustworthy software; must be produced economically and quickly.
- Long-term costs favor the use of SE methods over ad-hoc programming.
- For many systems, most costs arise from changing software after deployment.
Software Process Activities
- Software specification: define software to be produced and constraints with customer involvement.
- Software development: design and implement the software.
- Software validation: ensure the software meets customer requirements.
- Software evolution: modify the software to reflect changing requirements.
General Issues that Affect Software
- Heterogeneity: distributed systems across networks and devices; diverse hardware/software ecosystems.
- Business and social change: rapid change in economy, technology; need for rapid adaptation.
- Security and trust: software must be trustworthy given its pervasive role.
- Scale: software must operate from tiny embedded devices to large cloud systems; architecture must scale.
Software Engineering Diversity and Application Types
- No universal toolkit; methods depend on application type, customer requirements, and team background.
- Application types include:
- Stand-alone applications (local PC, self-contained).
- Interactive transaction-based applications (remote servers, e.g., web apps).
- Embedded control systems (control hardware).
- Batch processing systems (large data processing in batches).
- Entertainment systems (consumer-focused).
- Systems for modelling and simulation (scientific/engineering models).
- Data collection systems (sensor data gathering).
- Systems of systems (enterprise deployments, micro-service trend).
- Movement toward micro-service architectures to handle enterprise complexity.
Software Engineering Fundamentals (Deep Dive)
- Managed and understood development processes are essential; different processes for different types of software.
- Dependability and performance are important for all types of systems.
- Understanding and managing software specifications and requirements is critical.
- Reuse of existing software where appropriate is encouraged.
Internet Software Engineering and Web-based Systems
- The Web is a platform for running applications; organizations increasingly develop web-based systems.
- Web services expose functionality over the web; cloud computing provides remote application hosting.
- Users pay for software by use rather than owning it outright (concept of software as a service).
- Web-based systems are complex, distributed; fundamental SE principles still apply.
Web-Based Software Engineering Practices
- Software reuse is dominant in web-based systems; assemble from pre-existing components.
- Incremental and agile development is common; complete upfront specification is often impractical.
- Service-oriented systems enable components to be stand-alone services; supports incremental updates.
- Rich interfaces are enabled by modern front-end frameworks (e.g., Vue, React).
Mentcare Case Study: Insiders into Case-based Software Ethics
- Insulin pump: embedded system controlling insulin delivery based on blood sugar sensor data.
- Safety-critical due to risk of brain damage or death with incorrect dosing.
- System architecture includes sensor, micro-pump, controller, alarms, displays, power, clock.
- Activity model involves data flow from blood sugar readings to insulin dose calculations to pump command and logging.
- Essential high-level requirements include reliability and correct insulin delivery when needed.
- Purpose: support mental health care; centralized database with local PC access when disconnected.
- Goals: provide management information for local/government targets; deliver timely information to clinicians.
- Organization includes Mentcare clients, server, and network connectivity; data flows between clients and central database.
- Key features:
- Individual care management: record creation, editing, history review; data summaries for quick understanding.
- Patient monitoring: monitoring of treatment and warning generation for potential issues.
- Administrative reporting: monthly reports on patient numbers, admissions/discharges, treatments, drug prescriptions, costs.
- System concerns:
- Privacy: confidentiality of patient data; restricted access to authorized staff and patients.
- Safety: alerts for potentially suicidal or dangerous patients.
- Availability: system must be available to ensure safe treatment and prescribing.
Wilderness Weather Station Case Study
- Government deploys hundreds of weather stations in remote areas.
- Each station measures parameters: temperature, pressure, sunshine, rainfall, wind speed/direction; multiple instruments controlled by software.
- Environment comprises three interacting systems: Weather station, Data management/archiving, Station maintenance.
- The weather information system architecture distributes responsibilities across data collection, management, and maintenance.
- Additional software functionality includes:
- Instrument/power/communication monitoring and fault reporting.
- Power management: battery charging when possible; generator shutdown during damaging weather.
- Dynamic reconfiguration: replacement of software parts with new versions; backup instruments can be swapped in case of failure.
iLearn: A Digital Learning Environment
- iLearn provides a framework with general-purpose tools and domain-specific learning applications.
- Tools and applications are chosen by teachers and learners to fit their needs (spanning spreadsheets, VLEs, games, simulations).
- Includes service-oriented architecture and integration of learning content and tools.
- Architecture includes a browser-based UI, Learn app, configuration services, group management, application services and management, identity management, email, messaging, conferencing, content resources, and utility services (authentication, logging, monitoring, interfacing).
iLearn Services and Architecture
- Integrated services have APIs and can communicate service-to-service.
- Independent services are accessed via browser interfaces; sharing information with other services requires user actions or re-authentication.
- iLearn architecture components include:
- Browser-based user interface
- ¡Learn app (Learn)
- Configuration services
- Group management
- Application services and application management
- Identity management
- Email, Messaging, Video conferencing, Newspaper archive, Word processing, Simulation, Video storage, Resource finder, Spreadsheet, Virtual learning environment, History archive
- Utility services: Authentication, Logging and monitoring, Interfacing
- User storage, Application storage
ACM/IEEE Code of Ethics: Principles and Rationale
- The ACM/IEEE Code of Ethics provides eight core principles guiding professional behavior and decision-making for software engineers, including practitioners, educators, managers, supervisors, policy-makers, and students.
- Rationale: Computers play a central, growing role in commerce, industry, government, medicine, education, entertainment, and society; software engineers have opportunities to do good or harm; the code aims to ensure software engineering remains beneficial and respected.
- The preamble emphasizes commitment to making software analysis, specification, design, development, certification, maintenance and testing a beneficial and respected profession; adherence to health, safety and welfare of the public.
- Eight Principles (summarized):
- PUBLIC – Act in the public interest.
- CLIENT AND EMPLOYER – Act in the best interests of clients/employers consistent with public interest.
- PRODUCT – Ensure products and modifications meet high professional standards.
- JUDGMENT – Maintain integrity and independence in professional judgment.
- MANAGEMENT – Promote ethical management of software development and maintenance.
- PROFESSION – Advance the integrity and reputation of the profession.
- COLLEAGUES – Be fair to and supportive of colleagues.
- SELF – Commit to lifelong learning and promote ethical practice.
Ethical Dilemmas (Examples)
- Disagreement with senior management policies.
- Releasing a safety-critical system without full testing.
- Participation in development of military or nuclear systems.
Case Studies: Overview
- Insulin pump (insulin delivery system): embedded system controlling insulin dosing based on blood sugar sensor data; safety-critical due to risks of hypo/hyperglycemia.
- Mentcare (mental health patient management system): centralized patient data with local offline capability; emphasizes privacy, safety and timely clinical access.
- Wilderness weather station: remote data collection and monitoring; involves distributed data flows and maintenance.
- iLearn: digital learning environment with service-oriented components; supports different learner needs and accessibility.
Insulin Pump Case Study: Insulin Pump Control System
- Data flow: blood sugar sensor collects data; calculation uses rate of change of blood sugar to determine insulin dosage; pump delivers insulin accordingly.
- Safety-critical concerns: hypo-/hyperglycemia risks leading to brain impairment, coma, death; long-term complications (eye, kidney) from prolonged hyperglycemia.
- Hardware architecture (example components): Needle assembly, insulin reservoir, pump, clock, sensor, controller, alarm, displays, power supply.
- Activity model: sequence from sensor reading to insulin dose calculation to pump command to dose logging; monitoring and control loop.
- Essential high-level requirements: system shall be available to deliver insulin when required; must deliver correct amount reliably; design to meet these requirements.
- Purpose: medical information system for mental health care, supporting clinics and remote or local sites with or without secure network connectivity.
- System design: centralized patient database with local PC access; downloads local copies when disconnected.
- Goals: provide management information for performance against targets; provide clinicians with timely patient data.
- Organization: Mentcare client devices connected to a Mentcare server and patient database via network.
- Key features:
- Individual care management: create/edit/view patient records; data summaries for quick reference.
- Patient monitoring: monitoring of patient records; warnings for potential issues.
- Administrative reporting: monthly reports on patient counts, admissions/discharges, treatments, drugs and costs.
- System concerns:
- Privacy: confidentiality of patient data; access restricted to authorized staff and patients.
- Safety: flag potential suicidal or dangerous patients to clinicians.
- Availability: system needs to be available to ensure safe prescribing.
Wilderness Weather Station Case Study: System Overview
- Government initiative to deploy hundreds of weather stations in remote areas.
- Each station collects data from instruments measuring temperature, pressure, sunshine, rainfall, wind speed and direction.
- Instruments are controlled by software that takes periodic readings and manages data collection.
- The weather station environment comprises:
- Weather station system (data collection, processing, transmission)
- Data management and archiving system (centralized data processing and storage)
- Station maintenance system (satellite communication with stations and problem reporting)
- Additional software functionality includes:
- Monitor instruments, power and communications; fault reporting to management system.
- Power management: manage batteries and generators; shut down generators in severe weather conditions when safe to do so.
- Dynamic reconfiguration: replace parts with newer versions; swap backup instruments as needed.
iLearn Architecture and Service Integration
- iLearn architecture highlights:
- Browser-based user interface
- Learn app, configuration services, group management
- Application services and management, identity management
- Email, messaging, video conferencing, newspaper archive, word processing, simulations, video storage, resource finder, spreadsheet, virtual learning environment, history archive
- Utility services: authentication, logging and monitoring, interfacing
- User storage and application storage
- Service integration concepts:
- Integrated services provide APIs (APIs enable direct service-to-service communication).
- Independent services are accessed through a browser; sharing data with other services requires explicit user action (copy/paste, re-authentication).
Key Points and Weekly Summary
- Software engineering is an engineering discipline covering all aspects of software production.
- Essential product attributes: maintainability, dependability & security, efficiency, and acceptability.
- High-level activities include specification, development, validation, and evolution across all software processes.
- Foundational SE principles apply to all types of system development; different toolsets may be appropriate for different contexts.
- Software engineers have responsibilities to the profession and society; professional societies publish codes of conduct.
- Ethics, confidentiality, competence, IP rights, computer misuse, and professional codes of ethics guide professional behavior.
- The ACM/IEEE Code of Ethics outlines eight principles and provides rationale for ethical practice in software engineering.
- Various case studies (Insulin pump, Mentcare, Wilderness weather station, iLearn) illustrate software engineering in practice, including safety, privacy, availability, and service design considerations.
Next Week Preview
- Topics to be covered: Software Processes, Software Process Models, Process Activities, Coping with Change, Process Improvement