Process deep dive

Software Development Life Cycle và delivery models

Process tốt làm feedback nhanh hơn và risk hiển thị sớm hơn. Không có mô hình đúng cho mọi dự án; chọn theo uncertainty, compliance, coupling và khả năng release.

SDLC là lifecycle, không phải riêng Scrum

Giai đoạnOutput cần cóFailure hay gặp
Discovery/PlanningProblem, user outcome, scope/non-goals, constraints, risks, success metricNhận feature request như requirement hoàn chỉnh.
Requirements/AnalysisFunctional/non-functional requirements, acceptance criteria, domain rulesMơ hồ về failure, security, migration và operations.
DesignArchitecture/data/API, ADR, threat model, rollout/rollbackBig design upfront hoặc code trước khi làm rõ irreversible decisions.
ImplementationCode, review, automated checks, feature flag, docsBranch sống lâu, integration muộn, review chỉ soi style.
VerificationUnit/integration/contract/E2E/performance/security evidenceQA là phase cuối; chỉ test happy path.
Release/DeploymentImmutable artifact, migration sequence, canary, observability, rollbackDeploy đồng nghĩa release; DB change phá old version.
Operate/LearnSLO, telemetry, incident/reconciliation, feedback và improvementTeam “done” khi merge; không ownership production outcome.
RetireDeprecation, data retention/migration, dependency removalEndpoint/flag/service cũ tồn tại vô hạn.

So sánh các delivery model

Mô hìnhCơ chếPhù hợpRủi ro
WaterfallCác phase tuần tự, baseline/sign-off mạnhScope ổn định, dependency vật lý/pháp lý, change cost caoFeedback và integration quá muộn nếu uncertainty cao.
V-ModelMỗi design level ánh xạ một verification levelSafety/regulatory cần traceability và verification planningNặng tài liệu nếu biến thành handoff cứng.
IterativeLặp để cải thiện solution qua feedbackProblem đã rõ nhưng solution còn uncertaintyLặp mà không có measurable learning.
IncrementalGiao từng vertical slice có giá trịCó thể chia outcome và release độc lậpChia theo layer khiến mỗi increment chưa usable.
SpiralMỗi vòng ưu tiên identify/mitigate riskDự án lớn, novel technology, risk caoChi phí quản trị lớn; cần năng lực risk analysis.
AgileShort feedback, inspect/adapt, collaborationRequirement biến động và có user feedback thường xuyên“Agile” bị dùng để bỏ planning, architecture hoặc documentation.
Lean/KanbanVisual flow, limit WIP, giảm queue/batch/wasteContinuous flow, ops/platform/support, priority thay đổiThiếu product goal nếu chỉ tối ưu ticket flow.

Scrum, Kanban, XP và DevOps khác nhau

Sprint không phải mini-waterfall: không nên tuần 1 analysis, tuần 2 coding, tuần 3 QA cho toàn bộ batch. Mỗi item nên đi qua design–build–verify thành vertical slice nhỏ trong Sprint.

Một path từ ý tưởng tới production

  1. Product/engineering làm rõ problem, baseline, metric, compliance và non-goals.
  2. Chia thin vertical slice; spike unknown rủi ro cao nhưng time-box và có decision output.
  3. Viết acceptance criteria, API/schema compatibility, test strategy, telemetry và rollout plan.
  4. Code trên short-lived branch hoặc trunk; review nhỏ, CI chạy unit/static/security/contract checks.
  5. Deploy cùng immutable artifact qua environments; migration expand-first, feature flag và canary.
  6. Release theo metric/error budget; quan sát, rollback/roll-forward khi gate fail.
  7. Đo outcome, cycle time, escaped defects và incident/toil; đưa learning về backlog/process.

Definition of Ready và Definition of Done

Ready không nên là approval gate nặng. Nó là working agreement tối thiểu: outcome/acceptance hiểu được, dependency/risk lộ rõ và item đủ nhỏ để bắt đầu.

Done là quality transparency: code review, tests, security/observability, documentation, migration/rollback và deployable increment theo tiêu chuẩn team. “Code complete” hoặc “đã đưa QA” chưa phải Done.

Metrics không được dùng sai

Câu hỏi phỏng vấn tình huống

1. Chọn Waterfall hay Agile?
Không chọn theo nhãn. Tôi hỏi mức ổn định requirement, feedback latency, regulatory traceability, dependency và cost of change. Có thể dùng governance milestones kiểu Waterfall nhưng delivery iterative/incremental bên trong.
2. Scrum và Kanban khác gì?
Scrum tạo timeboxed cadence, goal và accountabilities; Kanban tối ưu continuous flow bằng WIP/policies/flow metrics. Team product có roadmap thường dùng Scrum hoặc hybrid; ops nhiều interruption thường hợp Kanban.
3. Requirement thay đổi giữa Sprint xử lý sao?
Đánh giá ảnh hưởng Sprint Goal, urgency và opportunity cost với Product Owner. Nếu Sprint Goal còn hợp lệ, đưa change vào backlog; nếu goal obsolete có thể renegotiate scope hoặc cancel Sprint, không âm thầm nhét thêm việc.
4. Team luôn trễ vì QA ở cuối Sprint?
Đó là queue/handoff problem. Giảm batch, đưa tester vào refinement/design, automation sớm, vertical slice, WIP limit và swarm vào aging item thay vì mở thêm ticket.
5. Dự án ngân hàng cần compliance có Agile được không?
Có. Compliance là constraint/evidence requirement, không bắt buộc big-bang delivery. Trace controls tới stories/tests/artifacts, automate evidence, dùng approval ở irreversible/risk gates và vẫn giao increment nhỏ tương thích.
6. DevOps có nghĩa developer tự làm tất cả operations?
Không. Mục tiêu là shared outcome và giảm handoff; platform/SRE vẫn có specialization. Ownership, interface, on-call, SLO và paved road phải rõ để không biến “you build it, you run it” thành overload.

Practice: thiết kế process cho banking feature

Scenario: thêm scheduled bank transfer, liên quan Mobile, Order/Transfer Service, Ledger, Notification, fraud rule và schema migration.

  1. Viết one-page discovery: outcome, non-goals, compliance, SLO và unknowns.
  2. So sánh Waterfall, Scrum và Kanban/hybrid bằng decision matrix có weight.
  3. Chia 4–6 vertical increments; mỗi increment deployable và backward-compatible.
  4. Vẽ flow từ Ready tới production, đặt WIP limits và owner cho blocked work.
  5. Định nghĩa CI gates, test pyramid/contract tests, database migration và canary gates.
  6. Inject change: regulator đổi retention rule giữa Sprint; mô tả re-plan và communication.
  7. Chọn flow/stability/outcome metrics; giải thích hành vi xấu metric có thể tạo ra.

Gate: process phải tạo feedback/evidence sớm, support rollback và compliance; không chỉ liệt kê ceremony.

Nguồn: Agile Principles · Scrum Guide · Kanban Guide · DORA metrics.
← Flow & estimationDecision & ADR →