2015年4月28日 星期二
[Scrum] Observation & Suggestion (導入之觀察與建議)
團隊從二月初導入 Scrum 專案管理方式,到現在將近三個月,
Run 了 6 個 Sprint 共 10 個 Story,
Success 了 9 個 Story,
Fail 了 1 個 Story,
現在正在 Run 第 7 個 Sprint 兩個 Story。
什麼是 Scrum?Scrum 的本質、精神是什麼?
可以參考以下兩篇:The Scrum Guide、Scrum是甚麼?
2015年1月15日 星期四
[Testing] Black Box Theory (測試黑盒子理論)
最近工作中使用到的後端架構分成了三個部分:Controller、Service、ThirdPartyService。
像是把車送修,
我 / Controller Testing:
壞的車 ➔ 判斷、選擇給哪一廠修 ➔ 黑盒子 ➔ 好的車
Controller Input ➔ Controller (Basic Conditions) ➔ Service Black Box ➔ Controller Output
跟我接洽的人 / Service Testing:
壞的法拉利 ➔ 怎麼修、修哪些零件 ➔ 黑盒子 ➔ 好的法拉利
Service Input ➔ Service (Logic, Processes) ➔ Third Party Service Black Box ➔ Service Output
掌管整個修車流程的人 / Third Party Service Testing:
壞的零件 ➔ 請外面的修理師傅修 ➔ 黑盒子 ➔ 好的零件
Third Party Service Input ➔ Third Party Service (Third Party Library / API)
➔ Third Party Black Box ➔ Third Party Service Output
之前寫測試要用黑盒子理論發現 SinonJS 這樣的東西,
覺得挺好用的,就來分享一下~
這篇只是簡單提到其中的 stub,有興趣的人再自行深入囉!
2015年1月6日 星期二
[Hook] Trigger Jenkins build/polling from Web hooks of old version GitLab (設定 GitLab Web hooks 觸發 Jenkins 事件)
前情提要
1. 在 GitLab 的 Web Hooks 中,有四種 event 可以選擇。2. 在 Jenkins 中,build event trigger 和 polling event trigger 的差異在於,polling 會在檢查到有更新才 build。
GitLab
2014年11月24日 星期一
[AngularJS] Directive Matching (屬性名稱辨識)
正規化處理程序
1. 把 element 或者 attribute 開頭的 x- 和 data- 都去掉。2. 把用「:」、「-」、「_」隔開的名稱合在一起變成 camelCase 的形式。
範例
<div ng-controller="Controller"> Hello <input ng-model='name'> <hr/> <span ng-bind="name"></span> <br/> <span ng:bind="name"></span> <br/> <span ng_bind="name"></span> <br/> <span data-ng-bind="name"></span> <br/> <span x-ng-bind="name"></span> <br/> </div>上面的每一行同樣都是使用 ngBind 的意思。
2014年10月27日 星期一
[Coffeescript] Difference between with and without question mark in condition statements (判斷式中變數加不加問號的差別)
一般問號使用的時機為,如果有某物件則判斷某物件屬性 ... 等,像是
if obj?.value console.log "obj exists, obj.value exists, obj.value isn't 0 and obj.value isn't ''"
這邊則討論較為特別的使用情況:
console.log "obj.value? is true" if obj.value? console.log "obj.value is true" if obj.value
以上兩行敘述,主要的差別在 obj.value 為 0 或者 "" 時會表現不一樣,
也就是情況一和二:
### Condition 1 obj = name: "aaa" value: 0 # obj.value? is true
### Condition 2 obj = name: "aaa" value: "" # obj.value? is true
以下是兩者表現相同的情況:
### Condition 3 obj = name: "aaa" # NO OUTPUT.
### Condition 4 obj = name: "aaa" value: null # NO OUTPUT.
### Condition 5
obj =
name: "aaa"
value: {}
## obj.value? is true
## obj.value is true
### Condition 6 obj = name: "aaa" value: [] ## obj.value? is true ## obj.value is true
轉成 Javascript 後比較清楚,分別為:
// if obj.value?
if(typeof value !== "undefined" && obj.value !== null) {
console.log("obj.value? is true");
}
// if obj.value
if(obj.value) {
console.log("obj.value is true");
}
2014年10月21日 星期二
[宏觀] 談產品發展
2014年10月17日 星期五
[Javascript] Best way to store key-value array (存 key-value 陣列的最佳方法) / Object v.s. Array tips (物件 v.s. 陣列 小撇步)
資料型態簡單釋義
物件 (Object)
可以存放屬性和函式的容器。陣列 (Array)
可以存放多個不一定要相同資料型態變數的容器。當兩種型態皆可使用時,如何選擇?
訂閱:
意見 (Atom)
