Skip to main content

Command Palette

Search for a command to run...

Software engineering

Published
20 min readView as Markdown

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:

  1. Generic Software – Sold to multiple customers (e.g., MS Word, Excel).

  2. 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:

  1. System Software – Manages hardware (e.g., OS, compilers, device drivers).

  2. Application Software – Solves business needs (e.g., banking software).

  3. Engineering/Scientific Software – Used in research and simulations (e.g., CAD, weather forecasting).

  4. Embedded Software – Controls devices, often in ROM (e.g., Microwave, Car ABS).

  5. Product Line Software – Generic products for various customers (e.g., Word processors, multimedia apps).

  6. Web Applications – Websites, online platforms, and cloud-based applications.

  7. Artificial Intelligence Software – Uses non-numeric algorithms for complex decision-making (e.g., Robotics, Expert systems).


6. Software Myths

Management Myths

  1. "We have a book full of standards; that’s enough."

    • Reality: Standards must evolve and align with modern practices.
  2. "Adding more programmers can speed up a delayed project."

    • Reality: Adding people late can slow down progress (Brooks’ Law).
  3. "Outsourcing means we don’t need to manage the project."

    • Reality: Poor management internally leads to outsourcing failures.

Customer Myths

  1. "A general requirement statement is enough; details can be added later."

    • Reality: Vague requirements cause project failures; detailed specifications are needed.
  2. "Software is flexible, so changes can be accommodated anytime."

    • Reality: Late-stage changes are expensive and risky.

Practitioner Myths

  1. "Once the software works, our job is done."

    • Reality: 60-80% of effort is spent on maintenance.
  2. "Quality can only be assessed when the program runs."

    • Reality: Reviews and testing should start early.
  3. "The only deliverable is a working program."

    • Reality: Documentation, design, and maintenance guides are also crucial.
  4. "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)

  1. Quality Focus – Continuous improvement using methodologies like Six Sigma, TQM.

  2. Process Model – Defines how tasks are structured and executed.

  3. Methods – Techniques for analysis, design, coding, testing, and support.

  4. ToolsCASE (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)

ActivityDescription
CommunicationGathering requirements from customers/stakeholders.
PlanningDefining tasks, risks, resources, and schedules.
ModelingUnderstanding requirements and designing software architecture.
ConstructionCoding (manual or automated) and testing.
DeploymentDelivering 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

LevelDescription
0: IncompleteNo structured process.
1: PerformedProcesses exist but are not well managed.
2: ManagedDefined processes with stakeholder involvement.
3: DefinedStandardized across the organization.
4: Quantitatively ManagedMeasured and controlled using metrics.
5: OptimizedContinuous process improvement.

6. Verification vs. Validation

AspectVerificationValidation
DefinitionChecking documents, designs, and code without execution.Running the software to check if it meets requirements.
MethodReviews, inspections, walkthroughs.Black-box, white-box, and integration testing.
GoalEnsures software follows specifications.Ensures software meets user expectations.
Performed byQA team.Testing team.
TimingBefore 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 AnalysisSystem DesignImplementationTestingDeploymentMaintenance
  • 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

ModelSpeedFlexibilityRisk ManagementBest For
Build and FixFastNoNoneTiny, personal projects
WaterfallSlowNoLowStable, well-defined projects
IncrementalMediumYesModerateGradual software releases
RADVery FastYesLowTime-sensitive projects with reusable components
PrototypingFastYesModerateUnclear requirements
SpiralMediumYesHighLarge, high-risk projects
ConcurrentFastYesHighLarge projects with parallel teams

Final Thoughts

  • For well-defined projects with no expected changesWaterfall

  • For quick releases with evolving requirementsIncremental or RAD

  • For exploring new ideas before final developmentPrototyping

  • For complex, high-risk projectsSpiral

  • For large, multi-team projectsConcurrent 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:

  1. Customer Satisfaction through Early and Continuous Delivery

    • Deliver functional software frequently to maximize customer satisfaction.
  2. Welcome Changing Requirements, Even Late in Development

    • Agile embraces change for the customer’s competitive advantage.
  3. Deliver Working Software Frequently

    • Software should be released in short iterations for quick feedback and adaptation.
  4. Collaboration between Business Stakeholders and Developers

    • Daily communication and collaboration improve requirement understanding.
  5. Build Projects around Motivated Individuals

    • Provide a supportive environment and trust teams to perform effectively.
  6. Face-to-Face Communication is Most Effective

    • Direct interaction minimizes misunderstandings and ensures clear communication.
  7. Working Software is the Primary Measure of Progress

    • Functional software is the key indicator of development progress.
  8. Maintain a Sustainable Pace of Work

    • Teams should work at a consistent pace to avoid burnout and maintain productivity.
  9. Continuous Attention to Technical Excellence and Good Design

    • Ensures long-term software adaptability and ease of maintenance.
  10. Simplicity – The Art of Maximizing the Amount of Work Not Done

    • Focus on essential features and avoid unnecessary complexity.
  11. Self-Organizing Teams

    • Encourages autonomy in decision-making to optimize efficiency and creativity.
  12. 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

  1. Communication – Encourages verbal and informal collaboration between developers and customers.

  2. Simplicity – Focuses on designing only for immediate needs, avoiding unnecessary complexity.

  3. Feedback – Comes from three sources:

    • The implemented software (through unit tests).

    • The customer (by evaluating the software).

    • The development team (peer reviews and collaboration).

  4. Courage – Developers need discipline to avoid over-engineering and only design for current requirements.

  5. 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

  1. Cost – The budget for development.

  2. Time – The deadline or schedule.

  3. Quality – The standard of the final product.

  4. Scope – The range of features and functionality.


The XP Process

XP follows a four-phase development process:

  1. 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.

  2. 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.

  3. 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.

  4. 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:

    1. What did I do yesterday?

    2. What will I do today?

    3. 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

FeatureXPScrum
Iteration Length1–2 weeks2–4 weeks
Planning ApproachUser StoriesProduct Backlog
Engineering PracticesPair Programming, Test-Driven Development (TDD)No specific engineering rules
Customer InvolvementHighly involvedInvolved through Product Owner
Testing ApproachContinuous unit testsFocuses 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

  1. Inception – Understanding the problem and stakeholders.

  2. Elicitation – Gathering requirements from users.

  3. Elaboration – Creating models for system behavior.

  4. Negotiation – Prioritizing and resolving conflicts.

  5. Specification – Documenting requirements.

  6. Validation – Checking for errors, ambiguities, and inconsistencies.

  7. Requirement Management – Tracking changes systematically.

5. Functional vs. Non-Functional Requirements

Functional RequirementsNon-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:

  1. Closed Paradigm – Hierarchical structure, works best for repetitive projects.

  2. Random Paradigm – Flexible but lacks structure, best for innovation.

  3. Open Paradigm – Balances structure and innovation, suitable for complex problems.

  4. 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

  1. Start on the right foot – Clearly define the problem and set realistic goals.

  2. Maintain momentum – Encourage quality work with proper motivation.

  3. Track progress – Use work products (code, models, test cases) for evaluation.

  4. Make smart decisions – Keep things simple and efficient.

  5. 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?