Software engineering
CHAPTER 1
1. Evolving Role of Software
Software is a product that transforms, manages, acquires, modifies, and transmits information.
It delivers computing power and controls programs (OS, networking software, tools).
Used in various domains: communication, automation, and software development.
2. What is Software?
Software consists of:
Instructions – Execute specific functions.
Data Structures – Organize and manipulate data.
Documentation – Helps in operation and maintenance.
Types of Software Products:
Generic Software – Sold to multiple customers (e.g., MS Word, Excel).
Bespoke (Custom) Software – Tailored for a specific client’s needs.
3. Hardware vs. Software
Manufacturing vs. Development: Hardware is mass-produced, while software is continuously developed and updated.
Failure & Maintenance:
Hardware fails due to physical wear, requiring replacement.
Software "fails" due to design flaws or bugs, requiring debugging.
Component-Based vs. Custom:
Hardware uses standardized components.
Software is often custom-built but is shifting towards reusable components.
4. Software Characteristics
Developed, not manufactured – Built using engineering principles.
Does not wear out – Instead, it becomes outdated or inefficient.
Custom-built – Though industries are moving towards component-based development.
5. Changing Nature of Software
Different categories of software:
System Software – Manages hardware (e.g., OS, compilers, device drivers).
Application Software – Solves business needs (e.g., banking software).
Engineering/Scientific Software – Used in research and simulations (e.g., CAD, weather forecasting).
Embedded Software – Controls devices, often in ROM (e.g., Microwave, Car ABS).
Product Line Software – Generic products for various customers (e.g., Word processors, multimedia apps).
Web Applications – Websites, online platforms, and cloud-based applications.
Artificial Intelligence Software – Uses non-numeric algorithms for complex decision-making (e.g., Robotics, Expert systems).
6. Software Myths
Management Myths
"We have a book full of standards; that’s enough."
- Reality: Standards must evolve and align with modern practices.
"Adding more programmers can speed up a delayed project."
- Reality: Adding people late can slow down progress (Brooks’ Law).
"Outsourcing means we don’t need to manage the project."
- Reality: Poor management internally leads to outsourcing failures.
Customer Myths
"A general requirement statement is enough; details can be added later."
- Reality: Vague requirements cause project failures; detailed specifications are needed.
"Software is flexible, so changes can be accommodated anytime."
- Reality: Late-stage changes are expensive and risky.
Practitioner Myths
"Once the software works, our job is done."
- Reality: 60-80% of effort is spent on maintenance.
"Quality can only be assessed when the program runs."
- Reality: Reviews and testing should start early.
"The only deliverable is a working program."
- Reality: Documentation, design, and maintenance guides are also crucial.
"Software engineering just creates unnecessary documentation and slows us down."
- Reality: Proper engineering reduces rework and speeds up delivery.
Conclusion
This chapter introduces software engineering, highlighting software’s evolving role, key characteristics, challenges, and myths that can mislead managers, customers, and developers. It emphasizes the importance of proper planning, engineering practices, and realistic expectations in software development.
Chapter 2: Software Process
A structured approach to software development
1. Introduction to Software Process
What is a Software Process?
A software process is a framework that defines tasks, activities, and deliverables required to develop high-quality software.
Who is involved? Managers, software engineers, customers.
Why is it important? Provides structure, control, and stability.
Outputs? Programs, documents, and data.
2. Software Engineering & Layered Technology
Software Engineering Definition
"The application of a systematic, disciplined, and quantifiable approach to software development, operation, and maintenance."
Ensures structured and organized development.
Requires appropriate tools and techniques based on constraints and resources.
Layered Technology (Foundation of Software Engineering)
Quality Focus – Continuous improvement using methodologies like Six Sigma, TQM.
Process Model – Defines how tasks are structured and executed.
Methods – Techniques for analysis, design, coding, testing, and support.
Tools – CASE (Computer-Aided Software Engineering) tools automate and support development.
3. Software Process Framework
A process framework consists of framework activities and umbrella activities.
Framework Activities (Core Tasks in All Software Projects)
| Activity | Description |
| Communication | Gathering requirements from customers/stakeholders. |
| Planning | Defining tasks, risks, resources, and schedules. |
| Modeling | Understanding requirements and designing software architecture. |
| Construction | Coding (manual or automated) and testing. |
| Deployment | Delivering the product and gathering customer feedback. |
Umbrella Activities (Supportive Activities Throughout Development)
Project tracking & control – Monitor progress and adjust plans.
Formal technical reviews – Identify errors early.
Software quality assurance (SQA) – Ensure product quality.
Configuration management – Handle software changes.
Documentation – Maintain logs, models, and reports.
Risk management – Identify and mitigate risks.
Measurement – Track project and product metrics.
4. Process Model & Adaptability
The framework remains constant, but activities vary based on:
Project type.
Complexity.
Team decisions.
5. Capability Maturity Model Integration (CMMI)
Developed by SEI (Software Engineering Institute) to measure process maturity.
CMMI Maturity Levels
| Level | Description |
| 0: Incomplete | No structured process. |
| 1: Performed | Processes exist but are not well managed. |
| 2: Managed | Defined processes with stakeholder involvement. |
| 3: Defined | Standardized across the organization. |
| 4: Quantitatively Managed | Measured and controlled using metrics. |
| 5: Optimized | Continuous process improvement. |
6. Verification vs. Validation
| Aspect | Verification | Validation |
| Definition | Checking documents, designs, and code without execution. | Running the software to check if it meets requirements. |
| Method | Reviews, inspections, walkthroughs. | Black-box, white-box, and integration testing. |
| Goal | Ensures software follows specifications. | Ensures software meets user expectations. |
| Performed by | QA team. | Testing team. |
| Timing | Before validation. | After verification. |
7. Conclusion
A well-defined software process ensures efficiency, quality, and predictability.
The CMMI model helps organizations assess and improve process maturity.
Verification ensures correctness, while validation ensures usability.
The process framework provides structure, while umbrella activities support continuous improvement.
CH3
1. Build and Fix Model
Summary
Developers build software without specifications or a clear design.
The product is modified repeatedly until the client is satisfied.
Works for small projects but is unmanageable for large-scale software.
Pros
✔ Quick for very small projects.
Cons
✖ High maintenance costs.
✖ Poor predictability and control.
✖ No systematic approach, making future modifications difficult.
2. Waterfall Model (Classic Life Cycle)
Summary
Linear and sequential model with distinct phases:
- Requirement Analysis → System Design → Implementation → Testing → Deployment → Maintenance
Each phase must be completed before moving to the next.
Pros
✔ Well-structured and easy to understand.
✔ Suitable for projects with well-defined and stable requirements.
✔ Facilitates scheduling and tracking progress.
Cons
✖ Rigid – Changes in later phases are costly.
✖ No working software available until the end.
✖ Assumes customers know all requirements upfront.
✖ Poor for evolving projects where requirements change.
Best For: Large-scale projects with well-defined and stable requirements.
3. Incremental Model
Summary
Develops software in small, incremental iterations, where each increment adds functionality.
Core product is developed first, and new features are added progressively.
Pros
✔ Faster delivery – Customers get a functional product early.
✔ Each increment is tested, reducing risks.
✔ Flexible – Can accommodate changes in later stages.
Cons
✖ Requires careful planning and design.
✖ May require more resources.
Best For: Projects where quick initial release is needed, and requirements are expected to evolve.
4. Rapid Application Development (RAD) Model
Summary
Emphasizes speed, using reusable components and parallel development teams.
Involves business modeling, data modeling, process modeling, construction, and deployment.
Pros
✔ Rapid development with short cycles (3 months per function).
✔ Encourages reuse of software components.
✔ Customer feedback is incorporated quickly.
Cons
✖ Requires skilled developers and designers.
✖ Not suitable for projects with high technical risks.
✖ Works best with modular systems.
Best For: Projects needing fast delivery with well-understood requirements.
5. Prototyping Model (Evolutionary Model)
Summary
A working prototype is built first, and refined based on user feedback.
Ideal when requirements are unclear or evolving.
Pros
✔ Helps define unclear requirements.
✔ User involvement ensures a better final product.
✔ Reduces risk by clarifying uncertainties.
Cons
✖ Users may mistake the prototype for the final product.
✖ Rapid changes may lead to poor system structure.
✖ Developers might ignore performance or security during prototyping.
Best For: Projects with unclear requirements or experimental technologies.
6. Spiral Model
Summary
Combines prototyping with a structured approach and focuses on risk management.
Development is done in iterative loops (spirals), with risk analysis at each stage.
Pros
✔ Well-suited for large, complex, and high-risk projects.
✔ Risk is addressed early to prevent major failures.
✔ Flexible – Changes can be incorporated in each iteration.
Cons
✖ Expensive and requires experienced risk analysts.
✖ Hard to convince customers that it’s controllable.
✖ Not suitable for small projects due to high costs.
Best For: Large, complex, and high-risk projects (e.g., defense or banking software).
7. Concurrent Development Model
Summary
Different tasks run simultaneously instead of following a strict sequence.
Helps manage multiple teams working on different components at the same time.
Pros
✔ Efficient for complex projects with multiple development teams.
✔ Changes can be managed in real time.
✔ Reduces idle time for developers.
Cons
✖ Difficult to manage and coordinate different teams.
✖ Requires strong project management and tracking.
Best For: Large projects with multiple independent modules (e.g., system engineering projects).
Comparison Table
| Model | Speed | Flexibility | Risk Management | Best For |
| Build and Fix | Fast | No | None | Tiny, personal projects |
| Waterfall | Slow | No | Low | Stable, well-defined projects |
| Incremental | Medium | Yes | Moderate | Gradual software releases |
| RAD | Very Fast | Yes | Low | Time-sensitive projects with reusable components |
| Prototyping | Fast | Yes | Moderate | Unclear requirements |
| Spiral | Medium | Yes | High | Large, high-risk projects |
| Concurrent | Fast | Yes | High | Large projects with parallel teams |
Final Thoughts
For well-defined projects with no expected changes → Waterfall
For quick releases with evolving requirements → Incremental or RAD
For exploring new ideas before final development → Prototyping
For complex, high-risk projects → Spiral
For large, multi-team projects → Concurrent Model
CH4 Agile Model - Detailed Notes
1. Introduction to Agile
What is Agile?
Agile is a project management and software development approach that emphasizes flexibility, collaboration, and frequent delivery of functional software.
It focuses on iterative and incremental development, ensuring that software evolves based on customer feedback and changing requirements.
Agile is more than a methodology; it is a mindset that promotes continuous improvement and responsiveness.
Major companies like Facebook, Google, and Amazon use Agile due to its adaptability and customer-focused approach.
2. Agile Lifecycle
Agile follows an iterative and incremental development cycle with six key phases:
1. Requirement Gathering
Identifies and documents stakeholder needs (clients, users, and experts).
Defines project scope, objectives, and requirements.
Establishes budget and schedule.
Creates a project plan and allocates resources.
2. Design
Develops a high-level system architecture.
Creates detailed specifications (data structures, algorithms, and interfaces).
Plans the user interface of the software.
3. Development (Coding)
Writes actual code for the software.
Conducts unit testing to verify individual components.
4. Testing
This phase includes multiple levels of testing:
Integration Testing – Ensures different components work together.
System Testing – Evaluates the entire system as a whole.
User Acceptance Testing – Confirms software meets user requirements.
Performance Testing – Assesses speed, scalability, and stability.
5. Deployment
Deploys software to a production environment for real-world use.
Ensures smooth operation in the real-world setting.
Provides training and support for end-users.
6. Review (Maintenance)
Fixes issues that arise after deployment.
Releases updates and patches for software improvements.
3. The 12 Agile Principles
Agile is guided by 12 principles from the Agile Manifesto:
Customer Satisfaction through Early and Continuous Delivery
- Deliver functional software frequently to maximize customer satisfaction.
Welcome Changing Requirements, Even Late in Development
- Agile embraces change for the customer’s competitive advantage.
Deliver Working Software Frequently
- Software should be released in short iterations for quick feedback and adaptation.
Collaboration between Business Stakeholders and Developers
- Daily communication and collaboration improve requirement understanding.
Build Projects around Motivated Individuals
- Provide a supportive environment and trust teams to perform effectively.
Face-to-Face Communication is Most Effective
- Direct interaction minimizes misunderstandings and ensures clear communication.
Working Software is the Primary Measure of Progress
- Functional software is the key indicator of development progress.
Maintain a Sustainable Pace of Work
- Teams should work at a consistent pace to avoid burnout and maintain productivity.
Continuous Attention to Technical Excellence and Good Design
- Ensures long-term software adaptability and ease of maintenance.
Simplicity – The Art of Maximizing the Amount of Work Not Done
- Focus on essential features and avoid unnecessary complexity.
Self-Organizing Teams
- Encourages autonomy in decision-making to optimize efficiency and creativity.
Regular Reflection on Team Effectiveness
- Teams should frequently assess and improve their workflow.
4. When to Use the Agile Model?
Agile is best suited for:
✅ Projects with frequent requirement changes.
✅ Teams with highly skilled and experienced developers.
✅ Projects where continuous client involvement is possible.
✅ Small to medium-sized projects that require fast development.
5. Advantages (Pros) of Agile
✅ Frequent Delivery – Working software is delivered regularly.
✅ Face-to-Face Communication – Ensures better understanding between teams and clients.
✅ Efficient Design – Agile adapts quickly to business requirements.
✅ Flexible to Changes – Requirement modifications are always welcome.
✅ Reduces Total Development Time – Faster iteration cycles lead to quicker project completion.
6. Disadvantages (Cons) of Agile
❌ Lack of Formal Documentation – Can lead to misunderstandings among team members.
❌ Difficult Maintenance – Without proper documentation, future updates and bug fixes can be challenging.
Conclusion
Agile is a highly flexible and customer-focused development approach that allows for quick iterations and continuous improvements. It is ideal for projects that require fast adaptability and frequent collaboration, making it a preferred choice in modern software development.
CH5
Extreme Programming (XP)
XP is an agile software development methodology designed to improve software quality and responsiveness to changing customer requirements. It emphasizes frequent releases, continuous feedback, and teamwork.
XP Core Values
Communication – Encourages verbal and informal collaboration between developers and customers.
Simplicity – Focuses on designing only for immediate needs, avoiding unnecessary complexity.
Feedback – Comes from three sources:
The implemented software (through unit tests).
The customer (by evaluating the software).
The development team (peer reviews and collaboration).
Courage – Developers need discipline to avoid over-engineering and only design for current requirements.
Respect – Team members must respect each other’s contributions.
XP Features
Lightweight, efficient, low-risk, and fun to develop software.
Follows an object-oriented approach.
Suitable for small to medium-sized teams with changing requirements.
XP Assumptions for Success
Developers work as a team with clear goals.
Changes should be cheap and easy to implement.
Developers should have a growth mindset (improving skills and relationships).
The team must be willing to adapt to achieve project success.
Four Key Variables in XP
Cost – The budget for development.
Time – The deadline or schedule.
Quality – The standard of the final product.
Scope – The range of features and functionality.
The XP Process
XP follows a four-phase development process:
Planning
Uses User Stories: Customers define requirements in short descriptions.
Customers assign priority; developers estimate effort (cost).
Project Velocity: Tracks the number of completed stories in the first release to estimate future progress.
Design
Keep-it-Simple: Avoid unnecessary features.
CRC Cards (Class-Responsibility-Collaborator): Helps in object-oriented design.
Spike Solutions: Quick prototypes to solve complex problems.
Refactoring: Improves code quality without changing functionality.
Coding
Unit Testing: Developers write tests before coding.
Pair Programming: Two developers work together at one workstation.
Continuous Integration: Code is frequently merged to avoid conflicts.
Smoke Testing: Quick testing to catch errors early.
Testing
Unit Testing (by developers) – Fixes small bugs immediately.
Acceptance Testing (by customers) – Ensures software meets business needs.
Encourages Regression Testing when modifying code.
Scrum
Scrum is an agile framework that helps teams develop complex software efficiently. It focuses on iterations (Sprints) and team collaboration.
Scrum Key Features
Lightweight: Minimal overhead, maximizing productivity.
Used for complex software development.
Encourages self-organizing teams.
Scrum Framework Overview
Product Backlog: A list of tasks/features prioritized for development.
Sprint: A time-boxed iteration (usually 2–4 weeks) where a portion of the backlog is completed.
Sprint Backlog: A set of selected tasks to be completed within a sprint.
Daily Scrum: A 15-minute stand-up meeting for progress updates.
Sprint Review: A demonstration of completed features.
Sprint Retrospective: A team discussion on what went well and areas for improvement.
Scrum Components in Detail
1. Product Backlog
Maintained by the Product Owner.
Contains all features, enhancements, and bug fixes.
Prioritized based on business value.
2. Sprint Backlog
A subset of the Product Backlog for a specific Sprint.
Created only by the development team.
Should not have more than 300 tasks.
Tasks requiring more than 16 hours should be broken down.
3. Sprint Burn Down Chart
Tracks the total hours of work remaining per day.
Helps visualize progress and estimate completion time.
Should ideally reach zero by the end of the Sprint.
4. Daily Scrum
A short 15-minute meeting where team members answer:
What did I do yesterday?
What will I do today?
Are there any blockers?
Not a problem-solving session or a way to track individual performance.
5. Sprint Review Meeting
The team demonstrates completed features to stakeholders.
Usually takes the form of a live demo.
Attended by customers, management, product owners, and engineers.
6. Sprint Retrospective
A reflection session after every sprint.
Helps the team discuss what went well and what needs improvement.
Typically 15–30 minutes long.
XP vs. Scrum: Key Differences
| Feature | XP | Scrum |
| Iteration Length | 1–2 weeks | 2–4 weeks |
| Planning Approach | User Stories | Product Backlog |
| Engineering Practices | Pair Programming, Test-Driven Development (TDD) | No specific engineering rules |
| Customer Involvement | Highly involved | Involved through Product Owner |
| Testing Approach | Continuous unit tests | Focuses on acceptance testing |
Advantages & Disadvantages
XP Advantages
✅ Continuous customer feedback → Faster changes.
✅ High code quality due to pair programming and unit testing.
✅ Encourages frequent releases → Faster delivery.
XP Disadvantages
❌ May not work well for large teams.
❌ Heavy emphasis on collaboration may slow down progress.
❌ Requires experienced developers.
Scrum Advantages
✅ Adaptability to changing requirements.
✅ Encourages teamwork and transparency.
✅ Reduces risks by working in short sprints.
Scrum Disadvantages
❌ Requires high discipline.
❌ Works best for small, cross-functional teams.
❌ Difficult for inexperienced teams to implement correctly.
Conclusion
Both XP and Scrum are agile methodologies that improve software development by focusing on incremental delivery, collaboration, and flexibility.
Use XP if you need high-quality code, frequent feedback, and strong engineering practices.
Use Scrum if you prefer structured planning, clear roles, and sprint-based development.
Summary of Requirement Engineering (Chapter 6)
1. What is Requirement Engineering (RE)?
Requirement: A function, constraint, or property that a system must provide.
Engineering: Systematic and repeatable techniques for defining, managing, and testing requirements.
Purpose: Ensures software meets customer needs through structured processes.
2. Characteristics of a Good Requirement
Clear & Unambiguous – Only one interpretation.
Correct – Must contribute to a real need.
Understandable – Easily comprehensible.
Verifiable – Must be testable.
Complete & Consistent – No missing details or contradictions.
Traceable – Can be linked back to its origin.
3. Why is Getting Good Requirements Hard?
Stakeholders may not know what they want.
Conflicts between stakeholders.
Business environment changes over time.
Organizational and political factors influence requirements.
4. Requirement Engineering Tasks
Inception – Understanding the problem and stakeholders.
Elicitation – Gathering requirements from users.
Elaboration – Creating models for system behavior.
Negotiation – Prioritizing and resolving conflicts.
Specification – Documenting requirements.
Validation – Checking for errors, ambiguities, and inconsistencies.
Requirement Management – Tracking changes systematically.
5. Functional vs. Non-Functional Requirements
| Functional Requirements | Non-Functional Requirements |
| What the system should do. | How the system should perform. |
| Defines features and functionality. | Defines performance and quality. |
| Mandatory. | Desirable but not always mandatory. |
| Specified by users. | Specified by developers. |
| Example: "Send an email on signup." | Example: "System must handle 1000 users at once." |
6. Requirements Specification & SRS
Specification Principles:
Separate functionality from implementation.
Define system behavior and environment.
Allow for incomplete but extendable requirements.
Software Requirements Specification (SRS) includes:
Functional & non-functional requirements.
System constraints & environment details.
Validation criteria & user scenarios.
7. Prototyping Approaches
Evolutionary Prototyping:
- Faster delivery, continuous updates, but harder maintenance.
Throw-away Prototyping:
- Used for early risk reduction but discarded later.
8. Requirement Management & Traceability
Traceability Tables: Track dependencies among requirements.
Managing Changes: Changes in one requirement should not break the system.
Project Management Concepts (Chapter 7)
1. Management Spectrum (4 P’s of Project Management)
People: The key to success (recruitment, training, organization, and teamwork).
Product: Defines objectives, scope, constraints, and alternative solutions.
Process: Framework activities, tasks, milestones, and quality assurance.
Project: Planning, monitoring, and controlling all activities to achieve goals.
2. People in Project Management
Stakeholders
Senior Managers – Define business needs and influence the project.
Project Managers – Plan, organize, and control the project.
Practitioners – Developers and technical experts.
Customers – Specify software requirements.
End-Users – Use the final product.
Team Leaders (MOI Model)
Motivation – Encouraging the team to perform at their best.
Organization – Structuring processes for project success.
Innovation – Promoting creativity while following project constraints.
Software Teams
Factors affecting team structure:
Problem complexity and modularity.
Project size and lifetime.
Delivery deadlines and quality requirements.
Communication needs within the team.
Team Organization Models:
Closed Paradigm – Hierarchical structure, works best for repetitive projects.
Random Paradigm – Flexible but lacks structure, best for innovation.
Open Paradigm – Balances structure and innovation, suitable for complex problems.
Synchronous Paradigm – Divides tasks among specialized members with minimal communication.
Team Coordination & Communication
Software projects involve large-scale development, uncertainty, and integration challenges.
Formal communication: Documentation, structured meetings.
Informal communication: Ad-hoc discussions, daily interactions.
3. The Product
Software Scope
Context – How the software fits into a larger system.
Information objectives – Inputs and outputs of the system.
Functions & performance – Functional goals and performance constraints.
Problem Decomposition (Partitioning)
Breaking down project scope into functional components or problem classes.
Makes planning and estimation easier.
4. The Process
Choosing the right process model based on customer needs, product characteristics, and the development environment.
Defining a task set for each software activity (tasks, work products, QA points, milestones).
Process Decomposition
Identifying and breaking down major tasks.
Example: Customer communication tasks:
- Review requirements → Plan meeting → Conduct research → Develop specifications → Validate specifications.
5. The Project
Challenges that put projects at risk
Poor understanding of customer needs.
Unclear product scope.
Poor change management.
Technology shifts or business requirement changes.
Unrealistic deadlines and skill gaps.
Common-Sense Approach to Project Management
Start on the right foot – Clearly define the problem and set realistic goals.
Maintain momentum – Encourage quality work with proper motivation.
Track progress – Use work products (code, models, test cases) for evaluation.
Make smart decisions – Keep things simple and efficient.
Conduct postmortem analysis – Learn from past projects for continuous improvement.
W5HH Approach (Project Planning Framework)
Why is the system being developed?
What tasks need to be done?
When will they be completed?
Who is responsible for each task?
Where are team members located?
How will the work be managed and executed?
How much of each resource is required?