Software EngineeringUnit 98 min read
Software Estimation & Project Mgmt: Cost, Risk, Scheduling
Unit 9 of Software Engineering: Covers estimation techniques (COCOMO, function points), project management frameworks (Agile, Waterfall), risk analysis, scheduling tools, and real-world cost drivers in apps like eSewa and Daraz.
TAKEAWAYS:
- Learn COCOMO and function-point analysis to estimate effort and cost for projects.
- Understand critical path method (CPM) and Gantt charts for scheduling dependencies.
- Identify risks (technical, organizational) and apply mitigation strategies.
- Compare Agile vs. Waterfall for project flexibility and control.
- Apply Earned Value Management (EVM) to track project performance.
- Use Pareto principle to prioritize high-impact risks in Daraz-like e-commerce.
1. Software Estimation Techniques
Estimating software effort, cost, and schedule is critical for feasibility and budgeting. Two dominant methods are algorithmic cost models (COCOMO) and function-point analysis.
1.1 Algorithmic Cost Modeling (COCOMO)
COCOMO (Constructive Cost Model) by Boehm divides projects into three modes:
COCOMO Formula:
Effort (person-months) = a × (KLOC)^b × EF
- KLOC: Thousands of lines of code
- EF: Effort multipliers (e.g.,
RELY,DATA,CPLX) - a, b: Constants (e.g., for Organic: a=2.4, b=1.05)
Worked Example: eSewa Payment Gateway Assume eSewa’s backend team estimates 15,000 lines of code for a new feature.
- Organic mode:
E = 2.4 × (15)^1.05 × EF - If
EF = 1.2(moderate risk), thenE ≈ 45 person-months. - Cost: ₹45,000 × ₹100,000 (avg. dev salary) = ₹45M.
Advantages:
- Quantifies effort mathematically.
- Adjusts for project size and complexity.
Disadvantages:
- Requires accurate KLOC estimates.
- Ignores non-technical factors (e.g., team morale).
1.2 Function-Point Analysis (FPA)
FPA measures software size by user functionality (inputs, outputs, queries, files, interfaces). Steps:
- Count unadjusted function points (UFP).
- Apply complexity weights (simple=3, average=4, complex=6).
- Adjust for 14 environmental factors (e.g.,
TECNfor tech experience). - Calculate adjusted function points (AFP):
AFP = UFP × (0.65 + Σ weights)
Example: Pathao Driver App
| Function Type | Count | Weight | Score (Count × Weight) |
|---|---|---|---|
| External Inputs | 5 | 3 | 15 |
| External Outputs | 8 | 4 | 32 |
| Total UFP | 13 | 47 |
- If
TECN = 1.3(moderate tech experience), then:AFP = 13 × (0.65 + 0.95) ≈ 22.5 - Cost: ₹22.5 × ₹50,000 (per AFP) = ₹1.125M.
Advantages:
- Focuses on user value, not code lines.
- Works for legacy systems (no source code).
Disadvantages:
- Subjective weighting.
- Requires domain expertise.
2. Project Management Frameworks
Project management structures define how work is organized, scheduled, and monitored.
2.1 Waterfall Model
Sequential phases: requirements → design → implementation → testing → deployment → maintenance.
Use Case: NTC’s fiber-optic network rollout (phased deployment in rural areas).
- Advantages: Clear milestones, easy documentation.
- Disadvantages: Inflexible; late changes costly.
2.2 Agile Model
Iterative cycles (sprints) of 2–4 weeks, with continuous feedback.
flowchart TD A["Sprint 1"] --> B["Backlog Refinement"] B --> C["Sprint Planning"] C --> D["Development"] D --> E["Daily Standups"] E --> F["Sprint Review"] F --> G["Retrospective"] G --> H["Adapt Backlog"] H --> AAgile sprint cycle with key activities (development and standups highlighted)
Use Case: Daraz’s inventory management system.
- Advantages: Adaptive to changing demands (e.g., festival sales).
- Disadvantages: Requires active stakeholder involvement.
Comparison Table:
| Aspect | Waterfall | Agile |
|---|---|---|
| Flexibility | Low | High |
| Documentation | Heavy | Light |
| Risk Handling | Late | Early |
| Best For | Predictable projects | Dynamic environments |
3. Risk Management
Risks can derail projects. Steps:
- Identify: Brainstorm potential risks (technical, organizational, external).
- Analyze: Assess likelihood and impact (use risk matrix).
- Mitigate: Plan responses (avoid, transfer, accept, reduce).
- Monitor: Track risks via risk registers.
Risk Matrix Example:
| Likelihood | Low Impact | High Impact |
|---|---|---|
| High | Accept | Mitigate |
| Low | Monitor | Avoid |
Worked Example: Ncell 5G Rollout
- Risk: Delayed spectrum approval (external).
- Mitigation: Partner with NTC for spectrum sharing.
- Backup Plan: Use 4G as fallback during transition.
Common Risks in Software:
- Technical: Overestimated KLOC, poor architecture.
- Organizational: Unclear requirements, team turnover.
- External: Regulatory changes (e.g., GDPR for eSewa).
4. Scheduling Techniques
4.1 Critical Path Method (CPM)
Identifies the longest path of tasks (critical path) that determines project duration.
Example: NEPSE Stock Market System Upgrade
- Critical Path:
Design → Development → Testing(12 weeks). - Non-critical:
Documentation(can slip without delaying project).
4.2 Gantt Charts
Visual timeline of tasks with dependencies.
gantt
title NEPSE Upgrade Timeline
dateFormat YYYY-MM
section Development
Backend:2024-01-01,12
Frontend:2024-01-15,10
Testing:2024-03-01,8Advantages:
- Shows parallel tasks.
- Helps resource allocation.
Disadvantages:
- Static; doesn’t account for dynamic changes.
5. Earned Value Management (EVM)
Tracks cost vs. schedule performance using:
- Planned Value (PV): Budgeted cost for work scheduled.
- Earned Value (EV): Budgeted cost for work completed.
- Actual Cost (AC): Real cost incurred.
Formulas:
Schedule Variance (SV) = EV − PV
Cost Variance (CV) = EV − AC
CPI = EV / AC
SPI = EV / PV
Example: Khalti Wallet Scaling
| Metric | Planned (PV) | Earned (EV) | Actual (AC) |
|---|---|---|---|
| Month 1 | ₹500,000 | ₹450,000 | ₹600,000 |
- SV = ₹450K − ₹500K = −₹50K (behind schedule).
- CPI = ₹450K / ₹600K = 0.75 (over budget).
Actions:
- Reallocate resources to critical tasks.
- Negotiate with vendors for cost savings.
In the Real World
eSewa’s Cost Estimation:
- Uses COCOMO to estimate backend costs for new payment gateways.
- Function-point analysis for mobile app updates (e.g., UPI integration).
Daraz’s Agile Scheduling:
- Sprints align with festival sales (e.g., Dashain, Tihar).
- Gantt charts track inventory replenishment vs. demand spikes.
Ncell’s Risk Mitigation:
- Critical path analysis for 5G tower deployment.
- Risk registers track delays from land acquisition or regulatory approvals.
Exam Tip
- Prioritize COCOMO and FPA (high weight in exams).
- Draw diagrams: CPM, Gantt charts, risk matrices.
- Compare Waterfall vs. Agile with real examples (e.g., NTC vs. Daraz).
- Memorize EVM formulas (SV, CV, CPI, SPI).
- Link risks to Nepalese context (e.g., NEPSE, Ncell).
- For worked examples, assume:
- COCOMO: Use Organic mode for small apps (e.g., Pathao driver app).
- FPA: Count functions for a banking portal (loans, transfers).
- CPM: Schedule a government e-governance project (e.g., online land records).
Based on the TU BIT syllabus for Software Engineering (BIT302), unit 9.
Discussion
Loading…