Skip to Content
成為卓越程式設計師的38項必修法則
book

成為卓越程式設計師的38項必修法則

by Pete Goodliffe
May 2015
Intermediate to advanced
376 pages
5h 48m
Chinese
GoTop Information, Inc.
Content preview from 成為卓越程式設計師的38項必修法則
第十一章
測試時間
品質是免費的,但只限於那些願意為它大量付出的人。
- Tom DeMarco
Timothy Lister
大全:生產性專案與團隊
測試驅動開發(TTD):對某些人而言,它是一種信仰。對某些人而言,它是唯一理智
的程式開發方式。對某些人而言,它是個好主義,因為他們不用完全地投入工作。對其
他人而言,完全是在浪費體力。
那它到底是什麼?
TDD 是建構更佳軟體的重要技術,儘管目前還有人弄不清楚
測試驅動
單位測試
真正
的意思。我們來突破這一點,並討論一種更健康的測試方法,以寫出更好的程式。
為什麼要測試?
毫無疑問的:我們
必須
測試我們的程式。
當然你會執行新的程式,看看它是否能動作。有一些程式員有充足的自信,或囂張,寫
完程式之後,沒有經過
任何
測試就釋出。當你看到貪圖省事的行為,程式很難在第一次
就可正常動作:問題會被 QA 發現,或更糟糕的,在使用者使用它時被發現。
94
| 第十一章:測試時間
縮短回饋回路
要開發很棒的軟體,並妥善地開發它,程式員需要
收到回饋
。我們需要儘可能頻繁且快
速地收到回饋。良好的測試策略會縮短回饋回路,讓我們更有效率地工作:
y
我們知道當程式碼在外面被使用時可以動作,並回傳精確的結果給使用者。如果不
是這樣的話,他們會抱怨。如果那是唯一的回饋回路,軟體開發會非常緩慢而且代 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

精通機器學習|使用Python

精通機器學習|使用Python

Sarah Guido, Andreas C. Mueller
Java性能优化实践:JVM调优策略、工具与技巧

Java性能优化实践:JVM调优策略、工具与技巧

Benjamin J. Evans, James Gough, Chris Newland

Publisher Resources

ISBN: 9789863475699