可理解性: 為什麼幾十萬字的小說看一遍我們就可以理解, 而幾千行code卻要一讀再讀? --Objects are principally about people and their mental models, not polymorphism, coupling and cohesion代碼難以理解是軟體行業的痼疾. 眾多方法和方法論致力於解決這個問題, 不管主觀還是客觀. 造成理解困難的原因有很多, 我們今天討論其中一種: 商務程序被分解在代碼中, 支離破碎.
Q: 為什麼通過單元測試發現的 Bug 很少 ?A: 單元測試不是用來發現 Bug 的, 而是用來預防 Bug 的. 如果採用 TDD, 測試案例完成之時, 產品代碼尚未編寫, Bug更無從談起. Q: 那是否寫單元測試就能提高代碼品質了 ?A: 關於這一點, 似乎有人不這麼看, <<TDD Opinion: Quality Is a Function of Thought and Reflection, Not Bug Prevention>>.不錯,
Knowing all details at the beginning is considered impossible, or not necessary, so BDUF (Big Design Up Front) is considered harmful.It's usually true, but in some cases, we do need to know details as more as possible. Samples include bug fixing
Code is cheap, show me the talk. -- from 力岩.模式名稱CoC, Context over Code意圖通過講解背景問題和曆史, 而不是目前的方案, 使新人(新換入的pair)更快速和透徹的理解目前的代碼動機當新人加入項目開始Pair, 或者交換Pair後, 留守Feature的人要負責向新Pair講解目前的設計和代碼. 而一個壞味道是, 留守的人往往急於開始編碼, 草草帶著新人過一遍代碼就開始新任務了.
The ProblemsTwo problems:Even there're already tons of articles and books talking about the meeting efficiency and effectiveness, but "too many meetings", "meeting takes too long" are still the most popular items in retrospective meetings.People
Estimation is the most disputed practice in software development. The reasons include:It's difficult. We can't know every atom in the universe.It's easy to be out of date. Things changed frequently.But the real reason is some kind of human being's
See Also: AntiPattern: Batch Code ReviewCode review, specially daily code review, is considered a good practice. I've participated lots of code review meetings, and something concerns me. It's the low efficiency. Usually it takes longer time than
As a brainstorming method, the 5 Whys are hard to beat. This technique is inexpensive, easy to implement. Because it is so elementary in nature, it can be adapted quickly and applied to almost any problem. In software development, usually it will be