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項必修法則
第八章
別忽略那個錯誤!
只要你有無知與自信,成功就是必然的。
- Mark Twain
沈靜下來,準備聽一個睡前故事,如果你願意的話。這是一個有關程式員的隱喻…
有天晚上,我走在街頭,準備到酒吧與朋友會面。我們已經有段時間沒有一起暢飲啤酒
了,所以我很期待再次與他見面。匆忙之間,我沒有注意我走到哪裡了。我跘倒了。好
吧,誰叫我自己沒有留意,我想。
我的腿受傷了,但我很想快點跟朋友見面。於是我站起來,繼續趕路。我愈走愈痛。雖
然一開始我以為這只是一場虛驚,但很快地,我就發現不對勁了。
但是我不理會它,繼續趕往酒吧。到達的時候,我痛苦萬分。那一晚並不美好,因為我
非常心煩意亂。隔天早上,我去看醫生,發現我的腿骨折了。當我感覺疼痛時,就不該
走路了,因為當時繼續走路,讓我承受額外的傷害。或許這是我生命中最糟的一天…
許多程式員編寫程式碼的方式就像我的災難夜晚。
錯誤?什麼錯誤?這不嚴重。坦白說,我可以忽略它。不是寫出可靠程式碼的策略。
事實上,它只是懶惰的藉口。(不好的那一類。)無論你認為程式碼中多麼不可能有錯
誤,都應該檢查它,也一定要處理它,每一次都要。如果你不做這件事,就不是在節省
時間,而是在累積未來的問題。
重點
要忽略程式碼中可能的錯誤。不要“等一下”再處理錯誤(你不會
去做的)。
70
| 第八章:別忽略那個錯誤! ...
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