在世界頂級軟件開發大師Robert C. Martin(Bob大叔)最新力作The Clean Coder: A Code of Conduct for Professional Programmers(《程序員的職業素養》,章顯洲、餘晟譯,人民郵電出版社,2012年)一書中,他結合自己40多年的軟件開發經驗(1969年至今),列出了他所認爲的一個專業軟件開發人員必須精通的事項(與原書中次序保持一致),原文是:Here is a minimal list of the things that every software professional should be conversant with:
■ Design Patterns(設計模式):You ought to be able to describe all 24 patterns in the GOF book and have a working knowledge of many of the patterns in the POSA books.
必須能描述GoF書中的全部24種模式(應該是把簡單工廠模式也算進去了,包括6種創建型模式、7種結構型模式和11種行爲型模式),同時還要有POSA(即Pattern-Oriented Software Architecture<面向模式的軟件架構>系列叢書,一共5卷。第1卷綜合介紹模式系統和軟件架構,廣泛地引入了軟件設計和架構中的通用模式;第2卷介紹用於併發和網絡化對象的模式,專注於建立複雜的併發和網絡軟件系統與應用程序的基本模式;第3卷介紹資源管理模式,即那些在系統中實現有效的資源管理所需的技術;第4卷介紹分佈式計算的模式語言,介紹了一種模式設計語言,將分佈式系統開發中的114個模式聯繫起來;第5卷介紹模式與模式語言,從分析單個模式入手,深入探究了模式之間的關係,介紹瞭如何將模式和模式語言相結合)書中的多數模式的實戰經驗。
■ Design principles(設計原則):You should know the SOLID principles and have a good
understanding of the component principles.
必須知曉SOLID(分別是單一職責原則Single Responsibility Principle,開閉原則Open-Closed Principle,里氏代換原則Liskov Substitution Principle,接口隔離原則Interface Segregation Principle,依賴倒轉原則Dependency Inversion Principle,其中依賴倒轉原則就是Bob大叔1996年提出來的)原則(個人覺得從完整性出發,還應該加上合成複用原則Composite Reuse Principle和迪米特法則Law of Demeter),而且要深刻理解組件設計原則(面向組件設計的一些原則,在設計組件時我們也需要遵循一些原則,例如重用-發佈等價原則REP、共同重用原則CRP、共同封閉原則CCP、無環依賴原則ADP、穩定依賴原則SDP、穩定抽象原則SAP等)。
■ Method(方法):You should understand XP, Scrum, Lean, Kanban, Waterfall, Structured Analysis, and Structured Design.
必須理解極限編程、Scrum、精益、看板、瀑布、結構化分析和結構化設計。
■ Disciplines(實踐):You should practice TDD, Object-Oriented design, Structured Programming, Continuous Integration, and Pair Programming.
必須掌握測試驅動開發、面向對象設計、結構化編程、持續集成和結對編程。
■ Artifacts(工件):You should know how to use: UML, DFDs, Structure Charts, Petri Nets, State Transition Diagrams and Tables, flow charts, and decision tables.
必須知道如何使用UML、DFD數據流圖、結構圖、Petri網絡圖、狀態轉換圖表、流程圖和決策樹。
上述技能,你又精通多少呢?
The Clean Coder: A Code of Conduct for Professional Programmers
Uncle Bob
【作者:劉偉 http://blog.csdn.net/lovelion】