程序員容易忽略的10大軟件開發定律

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"與其他領域一樣,軟件開發領域也有一些非常經典的定律。這些定律包括了一些法則或軟件開發大神的名言。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"康威定律"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"也就是所謂的“按照組織架構來交付軟件”:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“任何一個組織在設計一個系統時,這個系統的結構與這個組織的溝通結構是一致的”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"你或許認爲可以通過一些方式來避免這個定律,比如跨功能團隊的站會、進度更新和決策矩陣,但最終都不可避免地會發生衝突和分歧,而這些將導致衝突和分歧的過程和結果。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"布魯克定律"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這個定律來自《人月神話》:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“在一個已經延期的項目中增加人手只會讓項目延期更長”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當你意識到項目沒有取得預期的進展,並嘗試從其他地方調取更多的資源,不僅會讓項目延期,而且更有可能交付一個更脆弱、更復雜的產品。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"Zawinski定律"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“每一個程序都會膨脹到需要加入Web服務器,不膨脹的程序最終會被膨脹的程序所代替”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對Web服務來說,就是“膨脹到需要用戶賬號登錄並收集所有用戶的數據”。對物理服務來說,就是“膨脹到需要加入一個不安全的WiFi訪問點,設置了你無法修改的默認密碼,以及一個Web服務器”。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"帕金森定律"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“一項工作會佔用掉所有用來完成它的時間”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果你不給一個項目的里程碑階段設置截止日期,這個項目就永遠完成不了。這就是爲什麼一定要給一個MVP(最小可行產品)定一個固定的截止日期。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當然,這個定律也可以用在數據、算力、內存等方面:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“程序最終會把所有可用的存儲空間、CPU時間和內存用光”。"}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"帕累託謬論"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"帕累託原則很容易被曲解,尤其是被管理層曲解,這通常會導致帕累託謬論的出現:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“當你完成了80%的工作,你會認爲真的只剩下20%的工作要做”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"但你可能低估了剩下的20%工作,因爲它可能佔用你80%的時間。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"史特金定律"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“90%的東西都是垃圾”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"是的,包括你的產品在內。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"皮特定律"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“在一個等級制度中,每個員工都傾向於升到他們無法勝任的職位。因此,隨着時間的推移,每個崗位都有可能被不稱職的員工佔據”。"}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"伊格爾森定律"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“你寫的任何超過6個月沒有看過的代碼,有可能已經被別人改過了”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這裏說的6個月已經是一個很樂觀的數字了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不過,有一點需要注意,那就是“Yo Momma推論”:只有作者纔可以給代碼提出批評,任何其他的負面反饋都將被駁回。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"格林斯潘第十定律"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"用在認證方面:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"任何一個定製開發的認證系統都包含一個臨時的、非正式的、隱藏缺陷的、運行緩慢的Kerberos不完整實現。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"這可以概括成一般性的NIH規則:“任何一個定製開發的系統都包含一個臨時的、非正式、隱藏缺陷的、運行緩慢的行業標準的不完整實現(因爲你拒絕直接使用標準實現)”。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"冰山謬論"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“一款新軟件的開發成本只佔管理層預算的總成本的25%左右”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"運維界的一句格言:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果說軟件維護的成本佔了總預算的75%,那麼這75%都應該是運維支持。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"LGTM困境"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“如果你想快速提交10行代碼變更,可以把它隱藏在一個1500行的PR中”。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https:\/\/www.netmeister.org\/blog\/software-engineering-laws.html"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章