agile tour dojo c++

22
贊 贊 贊 贊 AgileCommunity.tw Coding Dojo with C++ Aska Lee & Shawn Liang

Upload: agilecommunity

Post on 22-Jun-2015

185 views

Category:

Education


0 download

DESCRIPTION

coding dojo with c++

TRANSCRIPT

Page 1: Agile tour dojo c++

贊 助 廠 商AgileCommunity.tw

Coding Dojo with C++

Aska Lee & Shawn Liang

Page 2: Agile tour dojo c++

AgileCommunity.tw

關於 Aska Lee & Shawn Liang• 同為 AgileCommunity.tw 發起人• 其餘背景資料不明

Page 3: Agile tour dojo c++

AgileCommunity.tw

• 透過 Coding Dojo 活動讓大家體驗用測試來輔助設計開發的過程 (Test-Driven Development)

• 讓大家了解一下舉辦 Coding Dojo 的感覺

• 可以用在教育訓練• 日常娛樂活動 ???!!

今天的活動…

Page 4: Agile tour dojo c++

AgileCommunity.tw

TDD (Test-Driven Development)測試驅動開發

開始

撰寫會失敗的測試

實作讓測試通過

結束

重構

沒有其他測試可以寫了

Page 5: Agile tour dojo c++

AgileCommunity.tw

• 所謂 dojo( 道場 ) 就是練習功夫的地方 , 所以 coding dojo 就是讓一群人 ( 通常不會太多人 ), 在一個安全的環境中 , 大家一起來練功 , 只是這裡的功夫可能是 TDD, pair programming, design pattern, refactoring 或是其他與軟體設計開發有關的技巧。

什麼是 Coding Dojo ( 編程道場 )

Page 6: Agile tour dojo c++

AgileCommunity.tw

選定一 Kata 題目後,根據某種『輪替』的規則,觀眾輪流上台解題。

今日 Dojo 形式 : Randori

Page 7: Agile tour dojo c++

AgileCommunity.tw

正駕駛 副駕駛

每 10 分鐘輪替一次

觀眾綠燈時給建議或發問

Page 8: Agile tour dojo c++

AgileCommunity.tw

<< 台上規則 >>•由副駕駛主導方向,與正駕駛討論後決定編程的下一步

今日 Dojo 規則

Page 9: Agile tour dojo c++

AgileCommunity.tw

<< 台上規則 >>•TDD, Baby Step ( 最少的測試 + 最少的實作 )•討論時請大聲,讓觀眾能夠充分瞭解方向與現況•十分鐘換手一次:副駕駛下台,正駕駛轉任副駕駛,一位新的觀眾上台擔任正駕駛•必要時可以使用求救牌或安靜牌來求救或避免干擾。

今日 Dojo 規則

Page 10: Agile tour dojo c++

AgileCommunity.tw

今日 Dojo 規則

<< 台下規則 >>

• 尚未綠燈前,禁止對正副駕駛提問或給建議

• 綠燈時,歡迎給建議

Page 11: Agile tour dojo c++

AgileCommunity.tw

KATA (套路 )

Page 12: Agile tour dojo c++

AgileCommunity.tw

Page 13: Agile tour dojo c++

AgileCommunity.tw

• 寫一支程式,能根據以下規則輸出 1~100 的數字• 三的倍數輸出” Fizz”, 五的倍數輸出” Buzz”,

如果同時是三跟五的倍數,則輸出” FizzBuzz” ,其他的則輸出原數字的字串。如 : 12Fizz4BuzzFizz7

本日練習 Kata: FizzBuzz

Page 14: Agile tour dojo c++

AgileCommunity.tw

CODING DOJO開始…

Page 15: Agile tour dojo c++

AgileCommunity.tw

數十分鐘後…

Page 16: Agile tour dojo c++

AgileCommunity.tw

• 數字的字串中有出現” 3” 的 ( 如 13) ,也需要輸出” Fizz” 。數字的字串中有出現” 5” 的 ( 如 51) ,也需要輸出” Buzz”

• 13 “Fizz”

• 51 “Buzz”

FizzBuzz Kata 第一次需求變動

Page 17: Agile tour dojo c++

AgileCommunity.tw

又過了數十分鐘…

Page 18: Agile tour dojo c++

AgileCommunity.tw

• 仿照先前的做法,七的倍數,以及字串包含” 7” 的,都要輸出” Whizz”

• 7 “Whizz”

• 17 “Whizz”

FizzBuzz Kata 第二次需求變動

Page 19: Agile tour dojo c++

AgileCommunity.tw

還有時間,再追加條件…

Page 20: Agile tour dojo c++

AgileCommunity.tw

1. 妥善處理錯誤輸入值2. 請試著用利用多型的技巧,消除掉某些

重複的邏輯判斷結構

FizzBuzz Kata 其他條件需求

Page 21: Agile tour dojo c++

AgileCommunity.tw

CODING DOJO 結束

Page 22: Agile tour dojo c++

AgileCommunity.tw

1. 今天學到了什麼 ? ( 語言 , 工具 , 技巧 , 想法 , 流程…… )

2. 今天的 Dojo 有沒有什麼地方不理想的 ?

3. 如果下次還有機會辦 Coding Dojo ,有沒有什麼建議?

Retrospective