Publisher: Pearson Education (US)
Do you like The Clean Coder ?
Join aNobii to see if your friends read it, and discover similar books!
1) “ professionalism is all about taking responsibility” 2) “The true professional knows that delivering function at the expense of structure is a fool’s errand. It is the structure of your code that allows it to be flexible. If you compromise the structure, you compromise the future. The fundamental assumption underlying all software projects is that software is easy to change. If you violate this assumption by creating inflexible structures, then you undercut the economic model that the entire industry is based on. In short: You must be able to make changes without exorbitant costs.” 3) “Your career is your responsibility. It is not your employer’s responsibility to make sure you are marketable. It is not your employer’s responsibility to train you, or to send you to conferences, or to buy you books. These things are your responsibility. Woe to the software developer who entrusts his career to his employer.” 4) “It is also not your employer’s responsibility to give you the time you need to learn. Some employers may provide that time. Some employers may even demand that you take the time. But again, they are doing you a favor, and you should be appropriately appreciative. Such favors are not something you should expect.” 5) “It is the responsibility of every software professional to understand the domain of the solutions they are programming. If you are writing an accounting system, you should know the accounting field. If you are writing a travel application, you should know the travel industry. You don’t have to be a domain expert, but there is a reasonable amount of due diligence that you ought to engage in.” 6) “Your employer’s problems are your problems. You need to understand what those problems are and work toward the best solutions. As you develop a system you need to put yourself in your employer’s shoes and make sure that the features you are developing are really going to address your employer’s needs.” 7) “Professionals speak truth to power. Professionals have the courage to say no to their managers. How do you say no to your boss? After all, it’s your boss! Aren’t you supposed to do what your boss says? No. Not if you are a professional. Slaves are not allowed to say no. Laborers may be hesitant to say no. But professionals are expected to say no. Indeed, good managers crave someone who has the guts to say no. It’s the only way you can really get anything done.” 8) “If you are not holding back some energy in reserve, if you don’t have a new plan, if you aren’t going to change your behavior, and if you are reasonably confident in your original estimate, then promising to try is fundamentally dishonest. You are lying. And you are probably doing it to save face and to avoid a confrontation.” 9) “One important point here is: If you don’t tell anyone about the potential problem as soon as possible, you’re not giving anyone a chance to help you follow through on your commitment.” 10) “The trick to managing lateness is early detection and transparency. The worst case scenario occurs when you continue to tell everyone, up to the very end, that you will be on time—and then let them all down. Don’t do this. Instead, regularly measure your progress against your goal, and come up with three4 fact-based end dates: best case, nominal case, and worst case. Be as honest as you can about all three dates. Do not incorporate hope into your estimates! Present all three numbers to your team and stakeholders. Update these numbers daily.” 11) “How can you consider yourself to be a professional if you do not know that all your code works? How can you know all your code works if you don’t test it every time you make a change? How can you test it every time you make a change if you don’t have automated unit tests with very high coverage? How can you get automated unit tests with very high coverage without practicing TDD?” 12) “A commitment is something you must achieve. If you commit to getting something done by a certain date, then you simply have to get it done by that date. If that means you have to work 12 hours a day, on weekends, skipping family vacations, then so be it. You’ve made the commitment, and you have to honor it.” 13) “The professional developer is calm and decisive under pressure. As the pressure grows he adheres to his training and disciplines, knowing that they are the best way to meet the deadlines and commitments that are pressing on him.” 14) “Sometimes commitments are made for us. Sometimes we find that our business has made promises to the customers without consulting us. When this happens we are honor bound to help the business find a way to meet those commitments. However, we are not honor bound to accept the commitments.”
Stefano Borghi said on Aug 20, 2014, 19:11
他在談他心目中的專家和專業態度. 他認為一個專家, 必須要"永續經營", 所以要不斷學習增加自己的專業能力.
上班時間是給公司的, 那不算是額外的學習. R. Martin給了一個主觀認定的時間, 每周額外學習專業相關的知識20小時. 也就是每天要花三小時. 這三小時的專業學習最好跟工作沒有直接關系, 而是要去做一些能激發你對這個專業的熱情的事情. 這樣才能永續經營.
所以他也不贊成超時工作. 如果一個工作無法讓 專業人員 騰出時間 每天進修三小時, 可能就不是一個好工作...
另外兩個有趣的概念是 Kata 和 Flow Zone.
Kata 中文譯為 "套路", 指的是一種特定的程式設計練習題組. 通常是小題組. 像是知名的 The bowling game 或者是 CodeKata. 這種題組通常是被設計來 暖身 或者熟練 基本技巧.
R. Martin 認為, 程式設計是一種工藝技術, 需要反覆練習才能熟練精進, 也需要常常複習. 所以套路就顯得很重要. 透過重複練習套路, 我們可以反省之前的寫法, 更能夠將理論內化為技巧. 以我自己來說, 過去比較習慣在腦海中思考, 比較少寫成程式, 所以我寫程式的速度並不快. 現在的工作內容也不需要寫大量的程式, 所以程式設計的概念有所進步, 但是速度和技能並沒有太大的提升. 我想我也需要找一些 Kata 來練習.
Flow Zone 被譯為 "神馳". 定義是一種將個人精神力完全投注在某種活動上的感覺；心流產生時同時會有高度的興奮及充實感。 一般人都很希望進入這個境界, 因為集中力會變高, 感覺好像生產力大幅提升. 但是很意外的是, R. Martin 認為我們應該避免進入這種狀態. 因為注意力太過集中, 反而導致只注意到細節, 而沒有考慮到宏觀的問題, 例如採用了不合適的資料結構, 反而事後要花很多利器修正.
這有點違反一般的認知, 但是其實蠻有道理的 R. Martin 也提到很多人都喜歡聽音樂寫程式, 認為這樣生產力比較高, 精神比較集中, 但是他認為這只是因為聽音樂比較容易進入神馳狀態而已. Tom DeMarco 也曾在他的書中提過類似的論點, 根據研究顯示, 低噪音的環境是最好的, 其次才是有音樂, 基本上越安靜越好, 即使只有一點聲音干擾, 人的生產力都會有顯著降低.
BarrosH said on Apr 30, 2014, 21:03