CSC364 Software Engineering

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)

waterfall model diagram**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:

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

  1. Requirements: "ATM must support cash withdrawal, balance check, and mini-statement."
  2. Design: UI/DB design (e.g., SQL tables for transactions).
  3. Implementation: Code in Java/C++.
  4. Testing: QA tests for crashes, security.
  5. Deployment: Roll out to all ATMs.
  6. 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.

21Product OwnerScrum MasterDev TeamSprint BacklogProduct Backlog
Agile Scrum Team Roles and Artifacts

Key Principles (Agile Manifesto)

  1. Individuals and interactions over processes/tools.
  2. Working software over comprehensive documentation.
  3. Customer collaboration over contract negotiation.
  4. Responding to change over following a plan.
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:

  1. Sprint 1 (2 weeks): Build user login + restaurant listing.
  2. Review: Get feedback from test users (e.g., "Add a filter for vegetarian food").
  3. Sprint 2: Implement filter + order placement.
  4. 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:

  1. Planning (objectives, constraints)
  2. Risk analysis (identify risks, mitigation)
  3. Engineering (prototyping, development)
  4. Evaluation (customer feedback)

Visual:

flowchart LR
    A["Plan"] --> B["Risk Analysis"]
    B --> C["Engineering & Prototyping"]
    C --> D["Evaluate"]
    D -->|"Feedback"| A

Best 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:

  1. Cycle 1: Identify risks (e.g., "HIPAA compliance," "Doctor resistance to change").
  2. Prototype: Build a basic UI for entering patient data.
  3. Feedback: Doctors say, "We need voice recognition."
  4. 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:

RequirementsSystem DesignArchitecture DesignModule DesignCodingUnit TestingIntegration TestingSystem TestingAcceptance TestingTesting phases mirror development phases
V-Model: Parallel testing and development phases

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:

  1. Build a mockup: Show login, course enrollment, and grade pages.
  2. Show to students: "Is this easy to use?"
  3. Feedback: "We need a mobile app too."
  4. 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:

Phase 1Core Features(MVP)Phase 2AdditionalFeatures (UI/UX)Phase 3Polish & Bug FixesFinalDelivered Product
Incremental Model: Phased delivery timeline

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.

PlagiarismOpen-source licensingIntellectual PropertyData collectionUser consentPrivacyConflict of interestWhistleblowingProfessional ConductEthical Dilemmas
Key ethical categories in software engineering (Nepal context)

Key Ethical Issues

  1. Intellectual Property: Plagiarism, piracy (e.g., copying Daraz’s code).
  2. Privacy: Handling user data (e.g., Khalti must protect transaction details).
  3. Public Welfare: Safe software (e.g., NTC’s network must not crash).
  4. Professional Competence: Only take projects you can deliver.
  5. 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

  1. Risk Identification: List potential risks (e.g., "Team members quit").
  2. Risk Analysis: Assess probability and impact (use a risk matrix).
  3. Risk Planning: Define mitigation strategies.
  4. 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:

  1. Risk: "Fraudulent loan applications."
    • Mitigation: Add AI fraud detection (like Khalti’s verification).
  2. 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

  1. Version Control: Track changes (e.g., Git for code, SVN for docs).
  2. Change Control: Approve/reject changes (e.g., Jira for workflows).
  3. Build Management: Compile and package software (e.g., Maven, Docker).
  4. 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:

  1. Version Control: Use GitHub to track code changes.
  2. Change Request: "Add UPI support."
    • Review: Security team approves.
    • Merge: Code is integrated.
  3. Build: Compile into a new version (v2.1).
  4. 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:

  1. Organic Mode:
  2. Embedded Mode:

Real-World Tie:

  • NTC’s fiber-optic network software: Likely embedded mode due to real-time requirements.

In the Real World

  1. eSewa/Khalti (Nepal):

    • Use Case: Agile (Scrum) for rapid updates (e.g., adding NRI remittance).
    • Risk Management: Mitigates fraud risks via two-factor authentication.
  2. Pathao (Nepal/Global):

    • Use Case: Incremental model (first ride-hailing, then Pathao Bike, then food delivery).
    • Ethics: Faces driver privacy concerns (tracking locations).
  3. 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.
  4. Nepal Stock Exchange (NEPSE):

    • Use Case: V-model for trading software (strict testing for market stability).
    • Risk: Cyberattacks → Mitigated by encryption and audits.
  5. 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

  1. Definitions: Know the key terms (e.g., "Agile vs. Waterfall").
  2. Comparisons: Be ready to contrast methodologies (e.g., "Why use Spiral over Waterfall?").
  3. Worked Examples: COCOMO calculations, use case diagrams, and risk matrices are common.
  4. Real-World Links: Connect theories to Nepalese apps (eSewa, Pathao) or global tech (Google, WhatsApp).
  5. 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…