# 軟體工程CH3
###### tags: `軟體工程`
## Agile Manifesto
- definition : manifesto for Agile Software Development
1. **individuals** and **interactions** over **processes** and **tools**
2. **working software** over **comprehensive documentation**
3. **customer collaboration** over **contract negotiation**
4. **responding to change** over **following a plan**
## What is Agility?
customer and developers need to work together on the team
## Agile process
- 定義 : is driven by customer descriptions of what is required
- characteristics :
- adaptable : manage unpredictable changes
- responsive : rely on customer feedback
- incremental : on the delivery of software increments in short timeframes
## Traditional team v.s. Agile team

## Agile process model
##### Extreme Programming
- 核心: 降低因需求變更所帶來的成本
- planning : customers and developers work together to decide how to group stories.
- design :
- **follow KIS**
- 鼓勵使用 CRC card
- 對於比較困難的問題建議使用 spike solution(一種雛形)
- 鼓勵 **refactoring**,不會更動到程式的模組,只會更動到內部邏輯設計
- coding :
- 建立 unit test
- **Pair Programming** : two people work together at one computer workstation to create code for a story. This provides time problem solving and time quality assurance.
- driver : coding
- observer : 檢查code , 提出問題,分享經驗
- testing :
- regression test : 每天做測試並把其他人的城市整合後測試
- acceptance test : 測試是否符合客戶需求
- Test Driven Design : 「先寫測試再開發」。先寫測試除了能確保測試程式的撰寫,和助於在開發初期釐清程式介面如何設計。
- 過程 :
- 選定一個功能,新增測試案例
- 執行測試,得到 Failed
- 實作「夠用」的產品程式
- 再次執行測試,得到 Passed
- 重構程式
- CRC card :
是一個標準索引卡集合,包括三個部分: 類名、類的職責、類的協作關係,每一張卡片表示一個類。
- 類(Class): 代表一系列對象的集合,這些對象是對系統設計的抽象建模,可以是一個人、一件物品等等。類名寫在整個CRC card的最上方。
- 職責(Responsibility): 可以從此類別之屬性(attributes)與操作、功能(operations),獲取其職責。這個部分在CRC card的左邊。
- 協作(Collaborator): 通過另一類別獲取我們想要的資訊或者相關操作,該類別即為協作者。這個部分在CRC card的右邊。
## Scrum開發流程的核心概念以及相關名詞
- 核心 : 團隊主要分成三個角色
- **Product Owner:** 關注產品目標和客戶需求,並驗收開發的功能
- **Scrum Master:** 管理團隊流程
- **Development Team:** 實現並測試產品功能
- Scrum meeting : short(typically 15 minutes) meeting held daily by the Scrum team. In the meeting , there are three key questions are asked and answered by all team members :
1. 自從上一次開會以來你做了什麼事情?
2. 遇到了什麼困難?
3. 你打算在在下次開會前完成什麼?
- Sprint : consist of work units that are required to achieve a requirement defined in the backlog that must be fit into a predefined time-box(typically 30 days).