Software EngineeringUnit 218 min read
Software Development Methodologies: Models, Ethics & Risk
Unit 2 of Software Engineering explores 12 core methodologies (waterfall, agile, spiral, V-model, RAD, prototyping, incremental, transformational, component-based, cleanroom, and formal methods), their process models, ethical considerations, and risk management—with real-world ties to Nepalese apps like eSewa and globa
Core Concepts: What is a Software Development Methodology?
A software development methodology is a structured framework that guides how software is planned, designed, built, tested, and maintained. It defines:
- Process models (sequential vs. iterative)
- Roles & responsibilities (who does what)
- Deliverables (documents, code, tests)
- Tools & techniques (UML, Agile boards, version control)
Why Do We Need Methodologies?
Without a methodology, projects suffer from:
- Scope creep (uncontrolled changes)
- Poor quality (bugs, crashes)
- Missed deadlines (no planning)
- High costs (rewriting, fixes)
The classic sequential development lifecycle (Image: Beao First version: Paul Smith, CC BY 3.0, via Wikimedia Commons)
1. Process Models: How Work Flows
Methodologies are built on process models, which define the order of activities. The two main categories:
| Model Type | Description | Example Methodologies | Best For |
|---|---|---|---|
| Plan-Driven (Sequential) | Rigid, document-heavy, linear phases. Changes are difficult after a phase ends. | Waterfall, V-model, Spiral (partially) | Large, regulated projects (banks, NTC) |
| Agile (Iterative/Incremental) | Flexible, customer feedback early, frequent releases. | Scrum, Kanban, Extreme Programming (XP), RAD | Startups, apps (Pathao, eSewa) |
| Hybrid | Combines plan-driven and agile (e.g., Spiral + Agile). | Spiral, MSF (Microsoft Solutions Framework) | Medium-sized projects with risks |
1.1 Waterfall Model: The Classic Approach
Definition: A linear, sequential model where each phase must complete before the next begins. Phases:
- Requirements → 2. Design → 3. Implementation → 4. Testing → 5. Deployment → 6. Maintenance
How It Works (Visual)
Advantages:
- Simple, easy to manage.
- Works well for small, well-understood projects (e.g., a static website).
Disadvantages:
- No going back: If requirements are wrong, the whole project may fail.
- Late testing: Bugs found only at the end → costly fixes.
- Not flexible: Changes are expensive.
Real-World Example:
- Nepal Electricity Authority (NEA) billing system: Uses waterfall because regulations require strict documentation and changes are rare.
Worked Example: A bank wants a new ATM system. Using waterfall:
- Requirements: "ATM must support cash withdrawal, balance check, and mini-statement."
- Design: UI/DB design (e.g., SQL tables for transactions).
- Implementation: Code in Java/C++.
- Testing: QA tests for crashes, security.
- Deployment: Roll out to all ATMs.
- Maintenance: Fix bugs reported by users.
1.2 Agile Model: Flexibility and Speed
Definition: Iterative and incremental, with short cycles (sprints) of 2–4 weeks. Focuses on customer collaboration and working software.
Key Principles (Agile Manifesto)
- Individuals and interactions over processes/tools.
- Working software over comprehensive documentation.
- Customer collaboration over contract negotiation.
- Responding to change over following a plan.
Popular Agile Frameworks
| Framework | Description | Example Use Case |
|---|---|---|
| Scrum | 30-day sprints, daily stand-ups, sprint reviews. | eSewa app development (Nepal) |
| Kanban | Visual workflow (to-do, in-progress, done), limits work-in-progress (WIP). | Daraz customer support ticketing |
| XP (Extreme Programming) | Pair programming, test-driven development (TDD), continuous integration. | Google’s rapid feature updates |
| RAD (Rapid Application Development) | Prototyping + iterative refinement. | Pathao’s ride-hailing app |
Advantages:
- Early feedback: Customers see progress often.
- Adaptability: Changes are welcome, even late.
- Higher quality: Frequent testing reduces bugs.
Disadvantages:
- Lack of documentation: Hard for new team members.
- Requires discipline: Daily stand-ups, retrospectives.
- Not suitable for all projects: E.g., regulated systems (banks, NTC).
Real-World Example:
- WhatsApp: Uses Kanban for bug tracking and feature prioritization. Developers pull tasks from a backlog and move them through stages (coding → testing → release).
Worked Example: *A startup wants to build a food delivery app (like Pathao). Using Scrum:
- Sprint 1 (2 weeks): Build user login + restaurant listing.
- Review: Get feedback from test users (e.g., "Add a filter for vegetarian food").
- Sprint 2: Implement filter + order placement.
- Repeat until MVP (Minimum Viable Product) is ready.
1.3 Spiral Model: Risk-First Approach
Definition: Combines iterative development with risk analysis. Each cycle has:
- Planning (objectives, constraints)
- Risk analysis (identify risks, mitigation)
- Engineering (prototyping, development)
- Evaluation (customer feedback)
Visual:
flowchart LR
A["Plan"] --> B["Risk Analysis"]
B --> C["Engineering & Prototyping"]
C --> D["Evaluate"]
D -->|"Feedback"| ABest for: High-risk projects (e.g., medical software, space systems).
Real-World Example:
- Nepal Stock Exchange (NEPSE) trading platform: Uses spiral to handle risks like market volatility and security breaches.
Worked Example: A hospital wants a patient record system. Using spiral:
- Cycle 1: Identify risks (e.g., "HIPAA compliance," "Doctor resistance to change").
- Prototype: Build a basic UI for entering patient data.
- Feedback: Doctors say, "We need voice recognition."
- Cycle 2: Add voice input, test security.
1.4 V-Model: Testing Early and Often
Definition: An extension of waterfall where testing phases align with development phases. Left side = development, right side = testing.
Visual:
Key Idea: Test at every level (unit → integration → system).
Advantages:
- Early defect detection: Bugs found in design phase are cheaper to fix.
- Clear documentation: Good for regulated industries.
Disadvantages:
- Rigid: Hard to accommodate late changes.
- Not agile: Slow for fast-moving projects.
Real-World Example:
- NTC’s network management system: Uses V-model because telecom regulations require rigorous testing.
1.5 Prototyping Model: Build a Mockup First
Definition: Build a working model (prototype) to clarify requirements before full development.
Types of Prototypes:
| Type | Description | Example |
|---|---|---|
| Throwaway (Horizontal) | Quick mockup to gather feedback, then discarded. | Wireframe of a Daraz mobile app |
| Evolutionary | Prototype evolves into the final product. | Google Maps (started as a prototype) |
Advantages:
- Reduces ambiguity: Users see what they get early.
- Saves time/money: Fixes requirements before coding.
Disadvantages:
- Can mislead: Users may think the prototype is the final product.
- Extra work: Building a prototype takes time.
Real-World Example:
- eSewa: Started with a throwaway prototype to test if users would trust online payments. Feedback led to adding Khalti integration.
Worked Example: A university wants a student portal. Using prototyping:
- Build a mockup: Show login, course enrollment, and grade pages.
- Show to students: "Is this easy to use?"
- Feedback: "We need a mobile app too."
- Revise requirements: Add mobile support before full development.
1.6 Incremental Model: Deliver Pieces
Definition: Break the project into small parts (increments), deliver one at a time.
Visual:
Advantages:
- Early delivery: Users get value sooner.
- Lower risk: Each increment is small and manageable.
Disadvantages:
- Requires planning: Must define increments carefully.
- Integration challenges: New increments must fit with old ones.
Real-World Example:
- WhatsApp: Released incrementally:
- Increment 1: Text messaging.
- Increment 2: Voice calls.
- Increment 3: Status updates, payments.
1.7 Comparison Table: Methodologies at a Glance
| Methodology | Type | Flexibility | Best For | Key Risk |
|---|---|---|---|---|
| Waterfall | Plan-Driven | Low | Small, stable projects (NEA systems) | Late changes → high cost |
| Agile (Scrum/Kanban) | Iterative | High | Apps, startups (Pathao, eSewa) | Lack of documentation |
| Spiral | Hybrid | Medium | High-risk projects (NEPSE) | Complex risk analysis |
| V-Model | Plan-Driven | Low | Regulated industries (NTC, banks) | Inflexible |
| Prototyping | Iterative | High | UI/UX-heavy projects (Daraz) | Prototype misuse |
| Incremental | Iterative | Medium | Large systems (Google, WhatsApp) | Integration issues |
2. Software Engineering Ethics
Definition: Guidelines for moral and professional behavior in software development.
Key Ethical Issues
- Intellectual Property: Plagiarism, piracy (e.g., copying Daraz’s code).
- Privacy: Handling user data (e.g., Khalti must protect transaction details).
- Public Welfare: Safe software (e.g., NTC’s network must not crash).
- Professional Competence: Only take projects you can deliver.
- Conflict of Interest: Avoid bias (e.g., favoring one bank over another in a loan system).
Real-World Example:
- Facebook-Cambridge Analytica Scandal: Violated user privacy ethics by leaking data.
- Nepal’s e-Governance: Ethical concerns over data security in eSewa/Khalti.
Worked Example: A software engineer at Ncell is asked to build a spyware app to track customers. What should they do?
- Ethical Choice: Refuse, as it violates privacy rights.
- Legal Choice: Report to compliance team (Ncell’s ethics policy).
3. Risk Management in Software Projects
Definition: Identifying, analyzing, and mitigating risks that could harm a project.
Risk Management Process
- Risk Identification: List potential risks (e.g., "Team members quit").
- Risk Analysis: Assess probability and impact (use a risk matrix).
- Risk Planning: Define mitigation strategies.
- Risk Monitoring: Track risks throughout the project.
Risk Matrix Example:
| Probability | Impact | Risk Level | Action |
|---|---|---|---|
| High | High | Critical | Immediate plan (e.g., hire backup) |
| Medium | Medium | Major | Monitor closely |
| Low | Low | Minor | Document, no action needed |
Real-World Example:
- Pathao’s Risk: "Driver shortages → poor service."
- Mitigation: Partner with bike taxis (like Pathao Bike).
Worked Example: A bank is developing a new loan approval system. Risks:
- Risk: "Fraudulent loan applications."
- Mitigation: Add AI fraud detection (like Khalti’s verification).
- Risk: "System crashes during peak hours."
- Mitigation: Load testing before launch.
4. Software Configuration Management (SCM)
Definition: Managing changes to software (code, docs, configurations) to ensure consistency, traceability, and control.
Key Activities
- Version Control: Track changes (e.g., Git for code, SVN for docs).
- Change Control: Approve/reject changes (e.g., Jira for workflows).
- Build Management: Compile and package software (e.g., Maven, Docker).
- Release Management: Deploy versions to users.
Real-World Example:
- Google Chrome: Uses SCM to roll out updates safely (e.g., Canary releases for testing).
Worked Example: A team is developing eSewa’s payment gateway. SCM steps:
- Version Control: Use GitHub to track code changes.
- Change Request: "Add UPI support."
- Review: Security team approves.
- Merge: Code is integrated.
- Build: Compile into a new version (v2.1).
- Release: Deploy to 10% of users first (canary testing).
5. COCOMO Model: Estimating Effort
Definition: Constructive Cost Model (COCOMO) estimates effort (person-months) and development time based on lines of code (KLOC).
COCOMO Formula
For Organic Mode (small team, familiar tech): For Embedded Mode (complex, real-time systems):
Worked Example: A project is 320 KLOC. Calculate effort for:
- Organic Mode:
- Embedded Mode:
Real-World Tie:
- NTC’s fiber-optic network software: Likely embedded mode due to real-time requirements.
In the Real World
eSewa/Khalti (Nepal):
- Use Case: Agile (Scrum) for rapid updates (e.g., adding NRI remittance).
- Risk Management: Mitigates fraud risks via two-factor authentication.
Pathao (Nepal/Global):
- Use Case: Incremental model (first ride-hailing, then Pathao Bike, then food delivery).
- Ethics: Faces driver privacy concerns (tracking locations).
Google (Global):
- Use Case: Hybrid (Agile + Spiral) for Google Maps (prototyping new features like AR navigation).
- SCM: Uses Google’s internal tools to manage millions of code changes daily.
Nepal Stock Exchange (NEPSE):
- Use Case: V-model for trading software (strict testing for market stability).
- Risk: Cyberattacks → Mitigated by encryption and audits.
Daraz (Nepal):
- Use Case: Prototyping for new UI/UX (e.g., voice search).
- Ethics: Data privacy for customer orders.
Exam Tip
What Examiners Want to See
- Definitions: Know the key terms (e.g., "Agile vs. Waterfall").
- Comparisons: Be ready to contrast methodologies (e.g., "Why use Spiral over Waterfall?").
- Worked Examples: COCOMO calculations, use case diagrams, and risk matrices are common.
- Real-World Links: Connect theories to Nepalese apps (eSewa, Pathao) or global tech (Google, WhatsApp).
- Ethics & SCM: Expect scenario-based questions (e.g., "How would you handle a data breach in Khalti?").
Common Pitfalls to Avoid
- Vague answers: Always quantify (e.g., "COCOMO effort = X person-months").
- Ignoring risks: Every methodology has trade-offs—explain them.
- Skipping diagrams: Draw use case diagrams, process flows, or risk matrices where asked.
- Overlooking ethics: Always justify your stance (e.g., "This violates user privacy").
High-Score Strategies
✅ Use bullet points for comparisons (e.g., Agile vs. Waterfall table). ✅ Include a real-world example (e.g., "Like Pathao’s incremental releases"). ✅ Show calculations (e.g., COCOMO steps). ✅ Draw diagrams (e.g., Spiral model, use case diagram for a library system). ✅ Link to Nepal: "NTC uses V-model because..." or "eSewa uses Agile for...".
Based on the TU BSc CSIT syllabus for Software Engineering (CSC364), unit 2.
Discussion
Loading…