Skip to content

Instantly share code, notes, and snippets.

@MilesChou
Last active July 16, 2016 06:53
Show Gist options
  • Save MilesChou/bda48c6ad61c96778e2e2597b4f1c53d to your computer and use it in GitHub Desktop.
Save MilesChou/bda48c6ad61c96778e2e2597b4f1c53d to your computer and use it in GitHub Desktop.

Code review

程式碼審查

類型

  • Pair Programming (直接的做法 - 時間短 - feedback 慢 - 高密度)
    • 可使用在新人加入時
  • 直接 review
  • 使用工具 (Github, Gerrit ) (間接的做法 - 時間久 - feedback 快 - 低密度)
    • Gerrit ( Review 單位 commit, 權限設定詳細, 整合難
    • Github ( Review 單位 Branch, 權限設定簡單, 整合工具多樣化)

Example

GitFlow + GitHub + Jenkins + Slack

當 feature merge 回 develop 時,進行 review

Lab

Jenkins: github pull request builder

Pros

老鳥菜鳥同等權力責任、規範

  • 改善團隊氣氛
  • 強化團隊學習能力
  • 程式碼品質提升

Context2

正式發表會出現 Bug -> 不犯錯最重要

code review -> Reviewer 和 Author 分擔責任 -> 增加信任感 -> 和諧工作氣氛

指責轉化成解決問題

學習

年紀大學習慢 x
被自身經驗觀念束縛

最好的學習方法:看別人寫的 code

  • 寫新功能剛好要用
  • demo 出包找 bug 時

code review 會強迫看 code -> 學習 > 指導 -> 交流學習其他人的想法

Quality

浪費時間?

code review -> 改善品質 = 節省時間

conclusion

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