Skip to content

Instantly share code, notes, and snippets.

@tqt97
Last active February 11, 2026 00:17
Show Gist options
  • Select an option

  • Save tqt97/59acb1697b8cd859d614ab441617c466 to your computer and use it in GitHub Desktop.

Select an option

Save tqt97/59acb1697b8cd859d614ab441617c466 to your computer and use it in GitHub Desktop.

📌 Estimation

Internal Engineering Rulebook (Man-Day Estimation Standard)

Mục tiêu: Giúp estimate trở nên có cơ sở, minh bạch, dễ review, và đủ tin cậy để planning.


1. 🎯 Estimation là gì?

Estimation không phải là “đoán thời gian”.

Estimate chuẩn là:

A forecast of engineering effort based on scope, capacity, and risk.
Dự báo effort dựa trên scope, năng lực team, và rủi ro.


2. 🧱 Key Concepts (Thuật ngữ chuẩn)

Term (EN) Vietnamese Meaning Explanation
Estimate Ước lượng Dự báo effort/time để hoàn thành work
Effort Công sức kỹ thuật Tổng lượng work cần bỏ ra
Man-day (MD) Ngày công 1 người làm việc 1 ngày
Base Effort Effort thuần Nếu dev chỉ tập trung code 100%
Focus Factor Hệ số năng suất thực tế Vì dev không có 100% thời gian cho feature
Risk Multiplier Hệ số rủi ro Cộng thêm do uncertainty
Contingency Buffer Buffer dự phòng Dự phòng scope creep, QA delay, deploy risk
Confidence Level Độ tự tin estimate % certainty của forecast
Scope Creep Scope phình ra Requirement tăng dần sau khi bắt đầu

3. ✅ Estimation Standard Formula (Công thức chuẩn)

Final Estimate (Man-days)

Final Estimate (MD) =( Base Effort ÷ Focus Factor ) × Risk Multiplier + Contingency Buffer

4. Step-by-Step Breakdown


4.1 Base Effort (Raw Engineering Effort)

Definition

Base Effort = effort kỹ thuật thuần nếu dev chỉ làm task này 100%.

Bao gồm:

  • Backend implementation
  • Frontend implementation
  • Database changes
  • Unit/feature tests (basic)

Example

Base Effort = 10 MD

4.2 Focus Factor (Availability / Productivity Factor)

Definition

Dev không bao giờ có 100% capacity cho feature work vì còn:

  • Meetings
  • Code review
  • Production support
  • Context switching
  • Mentoring

Standard Focus Factor Table

Team Context Focus Factor
Startup / High speed 0.6
Normal product team 0.7
Enterprise / Heavy meetings 0.5

Formula

Adjusted Effort = Base Effort ÷ Focus Factor

Example

Adjusted Effort = 10 ÷ 0.7 = 14.3 MD

Meaning:
10 MD raw effort sẽ thành ~14 MD khi tính đúng capacity thực tế.


4.3 Risk Multiplier (Risk Adjustment)

Definition

Risk = phần uncertainty trong technical hoặc product.

Examples:

  • New technology
  • Performance unknown
  • Integration dependency
  • Unclear requirement

Standard Risk Multiplier Table

Risk Level Multiplier
Low risk × 1.1
Medium risk × 1.25
High risk × 1.5

Formula

Risk Adjusted Effort = Adjusted Effort × Risk Multiplier

Example (Medium risk)

14.3 × 1.25 = 17.9 MD

4.4 Contingency Buffer (Delivery Safety Margin)

Definition

Buffer dành cho delivery uncertainties:

  • Scope creep
  • Late bug discovery
  • QA delays
  • Deployment surprises

Standard Buffer Table

Project Type Buffer
Internal tools +10%
Customer-facing feature +20%
Critical / Payment system +30%

Formula

Final Estimate = Risk Adjusted Effort × (1 + Buffer%)

Example (+20%)

Final Estimate = 17.9 × 1.20 ≈ 21.5 MD


4.5 Quality Overhead (Testing + Review + Rework)

Definition

Một estimate chuẩn bắt buộc phải tính cả phần quality overhead, vì coding chỉ là ~60–70% effort thực tế.

Quality overhead bao gồm:

  • Testing Effort (Unit test, Feature test, Regression test)
  • Code Review Time (Peer review, TL review)
  • Rework / Fix After Review (Refactor, bug fixes sau review)
  • QA Validation (Manual QA, UAT)

Standard Quality Allocation

Rule of thumb trong engineering:

Activity Typical % of Base Effort
Implementation (coding) 60–70%
Testing 15–25%
Review + Fix after review 10–20%
Release validation 5–10%

=> Vì vậy Base Effort không chỉ là “code time”.


Practical Formula

Nếu team muốn explicit breakdown:

Base Effort
= Coding
+ Testing
+ Review & Rework

Ví dụ:

  • Coding: 6 MD
  • Testing: 2 MD
  • Review + Fix: 2 MD
Base Effort = 6 + 2 + 2 = 10 MD

TL Mandatory Rule

Không bao giờ estimate feature mà bỏ qua testing/review.
Review fix là effort thật, không phải “free”.


Extended Full Formula (Most Accurate)

Final Estimate (MD)
=
( (Coding + Testing + ReviewFix) ÷ Focus Factor )
× Risk Multiplier
× (1 + Buffer%)

Example With Quality Included

Assume:

  • Coding = 6 MD
  • Testing = 2 MD
  • ReviewFix = 2 MD

Step 1:

Base Effort = 10 MD

Step 2 (capacity adjustment):

10 ÷ 0.7 = 14.3 MD

Step 3 (risk medium):

14.3 × 1.25 = 17.9 MD

Step 4 (buffer +20%):

17.9 × 1.20 ≈ 21.5 MD

=> Estimate này đã bao gồm full cycle delivery.

5. ✅ Full Worked Example

Assumptions:

  • Base Effort = 10 MD
  • Focus Factor = 0.7
  • Medium Risk = ×1.25
  • Buffer = +20%

Step 1: Adjust for team capacity

10 ÷ 0.7 = 14.3 MD

Step 2: Add technical/product risk

14.3 × 1.25 = 17.9 MD

Step 3: Add delivery buffer

17.9 × 1.20 ≈ 21.5 MD

Final Estimate Output

Final Estimate: ~22 MD (~4 weeks)
Confidence Level: ~75%


6. Estimation Reporting Template

Khi báo estimate trong planning, luôn dùng format:

Base Effort: X MD
Focus Factor: 0.X
Risk Level: Low/Medium/High (+%)
Buffer: +%
Final Estimate: Y MD
Confidence: ~Z%
Assumptions: ...

7. Golden Rules (Mandatory Team Rules)

Rule #1 — Always Break Down Work

Task > 2 days phải breakdown thành subtasks.

Rule #2 — Estimate is Not a Promise

Estimate là forecast, không phải commitment tuyệt đối.

Rule #3 — Always Include Testing + Review

Không estimate chỉ riêng coding.

Rule #4 — Always State Assumptions

Estimate chỉ valid khi assumptions giữ nguyên.


8. Confidence Level Guideline

Stage Confidence
Early discovery 50–60%
After design 70–80%
Ready to implement 85–90%

✅ Final Summary Cheat Sheet

Final MD
= (Raw MD ÷ 0.7)
  × (1.1–1.5)
  × (1.10–1.30)

Where:

  • ÷0.7 = reality capacity adjustment
  • ×(1.1–1.5) = risk multiplier
  • ×(1.10–1.30) = contingency buffer

⭐ Closing Statement

Estimation chuẩn giúp team:

  • Predictable delivery
  • Better sprint planning
  • Transparent communication
  • Controlled risk

This document is the single source of truth for man-day estimation across the team.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment