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項必修法則
第十八章
沒有事情是一成不變的
人們總是說時間可以改變事物,但其實你必須自行改變它們。
- Andy Warhol
程式界流行一種奇怪的說法:一旦你寫出程式之後,它們就是神聖的。它們不能被修
改。永遠。
對別人的程式要加倍小心。別想要碰它。
在開發線的某段區域,或許是在第一次 check-in 的時候,或許是在產品釋出之後,程式
會被防腐處理。它的等級改變了。它被升級。它不再是地痞流氓,而是數位皇族。曾經
有問題的設計,馬上被視為無可非議,而且變成無法改變。內部的程式結構再也不能被
粗暴對待,所有的對外介面都是神聖的,而且永遠不能被修改。
為什麼程式員
這麼想?害怕。害怕錯誤。害怕破壞東西。害怕額外的工作。害怕修改
的成本。
改變你完全不知道的程式,會讓你有非常真實的焦慮感。如果你沒有徹底瞭解邏輯,如
果你不完全知道你在做什麼,如果你不瞭解修改可能發生的後果,那麼你就
有可能
會以
奇怪的方式毀掉程式,或修改特殊情況下的行為,並在產品中加入非常難捉摸的 bug
你不想要做這種事,對吧?
軟體應該是軟的,不是硬的。但是恐懼會讓我們的程式碼凍僵,因為大家不想要修改
它。這是軟體死掉後的僵硬形況。
164
| 第十八章:沒有事情是一成不變的
重點
要對你的程式做防腐處理。如果你的產品裡面有“不能修改”的程
式,那們你的產品就會腐敗。 ...
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