Enviar pesquisa
Carregar
重構—改善既有程式的設計(chapter 4,5)
•
Transferir como PPTX, PDF
•
3 gostaram
•
930 visualizações
Chris Huang
Seguir
Educação
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 8
Baixar agora
Recomendados
Unit test
Unit test
shan chen
PHPUnit slide formal
PHPUnit slide formal
jameslabs
分布式系统测试实践
分布式系统测试实践
drewz lin
PHPUnit
PHPUnit
jameslabs
重構—改善既有程式的設計(chapter 7)
重構—改善既有程式的設計(chapter 7)
Chris Huang
重構—改善既有程式的設計(chapter 2,3)
重構—改善既有程式的設計(chapter 2,3)
Chris Huang
重構—改善既有程式的設計(chapter 12,13)
重構—改善既有程式的設計(chapter 12,13)
Chris Huang
Approaching real-time-hadoop
Approaching real-time-hadoop
Chris Huang
Recomendados
Unit test
Unit test
shan chen
PHPUnit slide formal
PHPUnit slide formal
jameslabs
分布式系统测试实践
分布式系统测试实践
drewz lin
PHPUnit
PHPUnit
jameslabs
重構—改善既有程式的設計(chapter 7)
重構—改善既有程式的設計(chapter 7)
Chris Huang
重構—改善既有程式的設計(chapter 2,3)
重構—改善既有程式的設計(chapter 2,3)
Chris Huang
重構—改善既有程式的設計(chapter 12,13)
重構—改善既有程式的設計(chapter 12,13)
Chris Huang
Approaching real-time-hadoop
Approaching real-time-hadoop
Chris Huang
重構—改善既有程式的設計(chapter 8)part 1
重構—改善既有程式的設計(chapter 8)part 1
Chris Huang
重構—改善既有程式的設計(chapter 6)
重構—改善既有程式的設計(chapter 6)
Chris Huang
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
Chris Huang
重構—改善既有程式的設計(chapter 8)part 2
重構—改善既有程式的設計(chapter 8)part 2
Chris Huang
Real time big data applications with hadoop ecosystem
Real time big data applications with hadoop ecosystem
Chris Huang
重構—改善既有程式的設計(chapter 1)
重構—改善既有程式的設計(chapter 1)
Chris Huang
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
Chris Huang
Foundation of software development 1
Foundation of software development 1
netdbncku
Foundation of software development 2
Foundation of software development 2
netdbncku
PHP 单元测试
PHP 单元测试
Lan Yanguang
Java与单元测试.ppt
Java与单元测试.ppt
test499702
例外處理與單元測試
例外處理與單元測試
國昭 張
使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
Max Lai
Continuous integration
Continuous integration
netdbncku
軟體系統測試簡介
軟體系統測試簡介
Wei-Tsung Su
豆瓣I os自动化测试实践和经验
豆瓣I os自动化测试实践和经验
drewz lin
Tcon分享 芈峮
Tcon分享 芈峮
mijun_hlp
敏捷测试中的工具实现
敏捷测试中的工具实现
drewz lin
Tip for Editors
Tip for Editors
Chun-Yu Tseng
持续交付最佳实践——百度技术沙龙201110
持续交付最佳实践——百度技术沙龙201110
Qiao Liang
2014/02: 嵌入式測試驅動開發
2014/02: 嵌入式測試驅動開發
AgileCommunity
Testing survey
Testing survey
Tao He
Mais conteúdo relacionado
Destaque
重構—改善既有程式的設計(chapter 8)part 1
重構—改善既有程式的設計(chapter 8)part 1
Chris Huang
重構—改善既有程式的設計(chapter 6)
重構—改善既有程式的設計(chapter 6)
Chris Huang
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
Chris Huang
重構—改善既有程式的設計(chapter 8)part 2
重構—改善既有程式的設計(chapter 8)part 2
Chris Huang
Real time big data applications with hadoop ecosystem
Real time big data applications with hadoop ecosystem
Chris Huang
重構—改善既有程式的設計(chapter 1)
重構—改善既有程式的設計(chapter 1)
Chris Huang
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
Chris Huang
Destaque
(7)
重構—改善既有程式的設計(chapter 8)part 1
重構—改善既有程式的設計(chapter 8)part 1
重構—改善既有程式的設計(chapter 6)
重構—改善既有程式的設計(chapter 6)
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 9)
重構—改善既有程式的設計(chapter 8)part 2
重構—改善既有程式的設計(chapter 8)part 2
Real time big data applications with hadoop ecosystem
Real time big data applications with hadoop ecosystem
重構—改善既有程式的設計(chapter 1)
重構—改善既有程式的設計(chapter 1)
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
A Graph Service for Global Web Entities Traversal and Reputation Evaluation B...
Semelhante a 重構—改善既有程式的設計(chapter 4,5)
Foundation of software development 1
Foundation of software development 1
netdbncku
Foundation of software development 2
Foundation of software development 2
netdbncku
PHP 单元测试
PHP 单元测试
Lan Yanguang
Java与单元测试.ppt
Java与单元测试.ppt
test499702
例外處理與單元測試
例外處理與單元測試
國昭 張
使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
Max Lai
Continuous integration
Continuous integration
netdbncku
軟體系統測試簡介
軟體系統測試簡介
Wei-Tsung Su
豆瓣I os自动化测试实践和经验
豆瓣I os自动化测试实践和经验
drewz lin
Tcon分享 芈峮
Tcon分享 芈峮
mijun_hlp
敏捷测试中的工具实现
敏捷测试中的工具实现
drewz lin
Tip for Editors
Tip for Editors
Chun-Yu Tseng
持续交付最佳实践——百度技术沙龙201110
持续交付最佳实践——百度技术沙龙201110
Qiao Liang
2014/02: 嵌入式測試驅動開發
2014/02: 嵌入式測試驅動開發
AgileCommunity
Testing survey
Testing survey
Tao He
Junit使用指南及作业规范
Junit使用指南及作业规范
dong jiang
常见软件测试术语集锦
常见软件测试术语集锦
ben00570
單元測試
單元測試
國昭 張
UnitTest.pptx
UnitTest.pptx
yuchengLiu36
2017-refactoring-01-簡介
2017-refactoring-01-簡介
Shang-Pin Ma
Semelhante a 重構—改善既有程式的設計(chapter 4,5)
(20)
Foundation of software development 1
Foundation of software development 1
Foundation of software development 2
Foundation of software development 2
PHP 单元测试
PHP 单元测试
Java与单元测试.ppt
Java与单元测试.ppt
例外處理與單元測試
例外處理與單元測試
使用 Pytest 進行單元測試 (PyCon TW 2021)
使用 Pytest 進行單元測試 (PyCon TW 2021)
Continuous integration
Continuous integration
軟體系統測試簡介
軟體系統測試簡介
豆瓣I os自动化测试实践和经验
豆瓣I os自动化测试实践和经验
Tcon分享 芈峮
Tcon分享 芈峮
敏捷测试中的工具实现
敏捷测试中的工具实现
Tip for Editors
Tip for Editors
持续交付最佳实践——百度技术沙龙201110
持续交付最佳实践——百度技术沙龙201110
2014/02: 嵌入式測試驅動開發
2014/02: 嵌入式測試驅動開發
Testing survey
Testing survey
Junit使用指南及作业规范
Junit使用指南及作业规范
常见软件测试术语集锦
常见软件测试术语集锦
單元測試
單元測試
UnitTest.pptx
UnitTest.pptx
2017-refactoring-01-簡介
2017-refactoring-01-簡介
Mais de Chris Huang
Data compression, data security, and machine learning
Data compression, data security, and machine learning
Chris Huang
Kks sre book_ch10
Kks sre book_ch10
Chris Huang
Kks sre book_ch1,2
Kks sre book_ch1,2
Chris Huang
20130310 solr tuorial
20130310 solr tuorial
Chris Huang
Scaling big-data-mining-infra2
Scaling big-data-mining-infra2
Chris Huang
Applying Media Content Analysis to the Production of Musical Videos as Summar...
Applying Media Content Analysis to the Production of Musical Videos as Summar...
Chris Huang
Wissbi osdc pdf
Wissbi osdc pdf
Chris Huang
Hbase status quo apache-con europe - nov 2012
Hbase status quo apache-con europe - nov 2012
Chris Huang
Hbase schema design and sizing apache-con europe - nov 2012
Hbase schema design and sizing apache-con europe - nov 2012
Chris Huang
重構—改善既有程式的設計(chapter 10)
重構—改善既有程式的設計(chapter 10)
Chris Huang
Designs, Lessons and Advice from Building Large Distributed Systems
Designs, Lessons and Advice from Building Large Distributed Systems
Chris Huang
Hw5 my house in yong he
Hw5 my house in yong he
Chris Huang
Social English Class HW4
Social English Class HW4
Chris Huang
Social English Class HW3
Social English Class HW3
Chris Huang
Sm Case1 Ikea
Sm Case1 Ikea
Chris Huang
火柴人的故事
火柴人的故事
Chris Huang
中德文化比較
中德文化比較
Chris Huang
Sm Case4 Fuji Xerox
Sm Case4 Fuji Xerox
Chris Huang
Disney報告 最終版
Disney報告 最終版
Chris Huang
Mais de Chris Huang
(19)
Data compression, data security, and machine learning
Data compression, data security, and machine learning
Kks sre book_ch10
Kks sre book_ch10
Kks sre book_ch1,2
Kks sre book_ch1,2
20130310 solr tuorial
20130310 solr tuorial
Scaling big-data-mining-infra2
Scaling big-data-mining-infra2
Applying Media Content Analysis to the Production of Musical Videos as Summar...
Applying Media Content Analysis to the Production of Musical Videos as Summar...
Wissbi osdc pdf
Wissbi osdc pdf
Hbase status quo apache-con europe - nov 2012
Hbase status quo apache-con europe - nov 2012
Hbase schema design and sizing apache-con europe - nov 2012
Hbase schema design and sizing apache-con europe - nov 2012
重構—改善既有程式的設計(chapter 10)
重構—改善既有程式的設計(chapter 10)
Designs, Lessons and Advice from Building Large Distributed Systems
Designs, Lessons and Advice from Building Large Distributed Systems
Hw5 my house in yong he
Hw5 my house in yong he
Social English Class HW4
Social English Class HW4
Social English Class HW3
Social English Class HW3
Sm Case1 Ikea
Sm Case1 Ikea
火柴人的故事
火柴人的故事
中德文化比較
中德文化比較
Sm Case4 Fuji Xerox
Sm Case4 Fuji Xerox
Disney報告 最終版
Disney報告 最終版
Último
EDUC6506_ClassPresentation_TC330277 (1).pptx
EDUC6506_ClassPresentation_TC330277 (1).pptx
mekosin001123
泽兰应用科学大学毕业证制作/定制国外大学录取通知书/购买一个假的建国科技大学硕士学位证书
泽兰应用科学大学毕业证制作/定制国外大学录取通知书/购买一个假的建国科技大学硕士学位证书
jakepaige317
哪里可以购买日本筑波学院大学学位记/做个假的文凭可认证吗/仿制日本大学毕业证/意大利语CELI证书定制
哪里可以购买日本筑波学院大学学位记/做个假的文凭可认证吗/仿制日本大学毕业证/意大利语CELI证书定制
jakepaige317
1.🎉“入侵大学入学考试中心修改成绩”来袭!ALEVEL替考大揭秘,轻松搞定考试成绩! 💥你还在为无法进入大学招生系统而烦恼吗?想知道如何通过技术手段更改...
1.🎉“入侵大学入学考试中心修改成绩”来袭!ALEVEL替考大揭秘,轻松搞定考试成绩! 💥你还在为无法进入大学招生系统而烦恼吗?想知道如何通过技术手段更改...
黑客 接单【TG/微信qoqoqdqd】
EDUC6506(001)_ClassPresentation_2_TC330277 (1).pptx
EDUC6506(001)_ClassPresentation_2_TC330277 (1).pptx
mekosin001123
educ6506presentationtc3302771-240427173057-06a46de5.pptx
educ6506presentationtc3302771-240427173057-06a46de5.pptx
mekosin001123
Último
(6)
EDUC6506_ClassPresentation_TC330277 (1).pptx
EDUC6506_ClassPresentation_TC330277 (1).pptx
泽兰应用科学大学毕业证制作/定制国外大学录取通知书/购买一个假的建国科技大学硕士学位证书
泽兰应用科学大学毕业证制作/定制国外大学录取通知书/购买一个假的建国科技大学硕士学位证书
哪里可以购买日本筑波学院大学学位记/做个假的文凭可认证吗/仿制日本大学毕业证/意大利语CELI证书定制
哪里可以购买日本筑波学院大学学位记/做个假的文凭可认证吗/仿制日本大学毕业证/意大利语CELI证书定制
1.🎉“入侵大学入学考试中心修改成绩”来袭!ALEVEL替考大揭秘,轻松搞定考试成绩! 💥你还在为无法进入大学招生系统而烦恼吗?想知道如何通过技术手段更改...
1.🎉“入侵大学入学考试中心修改成绩”来袭!ALEVEL替考大揭秘,轻松搞定考试成绩! 💥你还在为无法进入大学招生系统而烦恼吗?想知道如何通过技术手段更改...
EDUC6506(001)_ClassPresentation_2_TC330277 (1).pptx
EDUC6506(001)_ClassPresentation_2_TC330277 (1).pptx
educ6506presentationtc3302771-240427173057-06a46de5.pptx
educ6506presentationtc3302771-240427173057-06a46de5.pptx
重構—改善既有程式的設計(chapter 4,5)
1.
Ch4 – 構築測試體系
(Building Tests)
2.
4.1 – 自我測試碼的價值
重構需要測試,一個可靠的測試環境 花一整天(甚至更多)只找出一隻小小臭蟲 每個class都應該有一個測試函式 確保所有測試都完全自動化 每個測試應該從嘗試讓測試出錯(紅燈)->測試通過(綠燈)->最後才重構(Refactor) 一整組測試能夠大大縮減收尋臭蟲所需時間
3.
4.2 – JUnit測試框架
頻繁地執行測試,每天至少執行每個測試一次 JUnit的圖行使用介面(GUI) 單元測試和功能測試的差別 每當接獲bug report,請先撰寫一個單元測試來揭發這隻臭蟲 重構過程中可只行少數幾個測試,主要檢查當下正在整理的程式碼
4.
4.3 – 添加更多的測試
編寫未盡完善的測試並實際執行,好過對完美測試的無盡等待 考慮可能出錯的邊界條件,集中火力 檢查預期的錯誤是否如期出現 不要因為無法捕捉所有臭蟲就不寫測試碼 花合理時間抓出大多數的臭蟲,要好過窮盡一生抓出所有臭蟲
5.
Ch5 – 重構名錄
(Toward a Catalog of Refactorings)
6.
5.1 – 重構的記錄格式
每個重構手法都有如下五個部分: 名稱(name) – 建造一個重構詞彙表 概要(summary) -此重構手法適用情景 動機(motivation)– 為何需要這個重構,和何時不該使用這個重構 作法(mechanics) – 一步一步介紹如何進行 範例(examples) – 舉例說明如何運作
7.
5.2 – 尋找引用點
不要盲目地「搜尋 ─ 替換」 強型別語言中可尋求編譯器的協助,進而找出被吊掛的引用點 在繼承中宣告,或被覆寫多次的函式時,編譯器會迷或 編譯器可能太慢,可先使用文字收尋工具,最後再利用編譯器做復查的動作 編譯器無法找到經由反射機制(reflection)而得到的引用點
8.
5.3 – 這些重構準則有多成熟
重構的基本技巧 ─ 小步前進、頻繁測試 ─ 本書的準則是作者自己使用重構的記錄。 是在「單行程」(single-process)軟體這一大前題下考慮並介紹它們的 設計範式(Design Patterns)為你的重構行為提供了目標 運用重構的時候,這本書提供的僅僅是一個起點。希望各位也開始發展屬於自己的重構手法
Baixar agora