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項必修法則
168
| 第十八章:沒有事情是一成不變的
選擇你的戰場
沒有事情是一成不變的,但沒有事情應該一直在變。
當然,我們要選擇我們的戰場。我們可能不會一直改變所有的程式,並同時添加更多的
新作品。我們一直都會找到讓人不開心的程式,並且無法馬上修改它們,無論有多少。
它需要工作量可能會很大。也有可能超過重構所需的心力。
我們或許有一定數量的
技術債務
,直到我們之後有機會改善為止。你應該將它放到專
案計畫,讓重大的債務變成工作項目,把它放到開發路線圖,而不是把它忘記,任其惡
化。
改愈多,愈沒效
這聽起來像個惡夢。誰有可能會一直與不斷改變的程式共事?追蹤許多同時改變的東西
就已經很難了,更不用說與它們相處!
但是,我們必須接受程式改變的事實:所有保持不變的程式都是一種負債。沒有程式不
需要修改。把一段程式視為可迴避的怪物,只會適得其反。[Page-162]
問題
1.
哪些屬性會讓軟體容易修改?你會自然地把軟體寫成這樣嗎?
2.
我們該如何在“沒有人擁有程式”與“有些人確實比其他人有經驗”之間取得平衡?
這會如何影響程式員的工作分配?
3.
每一個專案都有頻繁改變的程式,與小幅度改變的程式。後者可能很穩重,但是它很
少被用到,可能是它的設計很健全,可被外部的模組擴充,也可能是人們對它內部的
汙穢避之唯恐不及。這兩種剛性程式,你有多少?
4.
你的專案使用的工具是否支援程式的修改?你該如何改善它?
改愈多,愈沒效
|
169
參考
y
遵守遊戲規則
“沒有事情是一成不變的”是我的團隊三個相輔相成的規則之一。
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