Refactoring in Ruby (Paperback)

William C. Wake, Kevin Rutherford

  • 出版商: Addison Wesley
  • 出版日期: 2009-10-25
  • 售價: $1,575
  • 貴賓價: 9.5$1,496
  • 語言: 英文
  • 頁數: 288
  • 裝訂: Paperback
  • ISBN: 0321545044
  • ISBN-13: 9780321545046
  • 相關分類: RubyRefactoring
  • 立即出貨



The First Hands-On, Practical, All-Ruby Refactoring Workbook!


Refactoring–the art of improving the design of existing code–has taken the world by storm. So has Ruby. Now, for the first time, there’s a refactoring workbook designed from the ground up for the dynamic Ruby language.


Refactoring in Ruby gives you all the realistic, hands-on practice you need to refactor Ruby code quickly and effectively. You’ll discover how to recognize “code smells,” which signal opportunities for improvement, and then perfect your program’s design one small, safe step at a time.


The book shows you when and how to refactor with both legacy code and during new test-driven development, and walks you through real-world refactoring in detail. The workbook concludes with several applications designed to help practice refactoring in realistic domains, plus a handy code review checklist you’ll refer to again and again. Along the way, you’ll learn powerful lessons about designing higher quality Ruby software–lessons that will enable you to experience the joy of writing consistently great code.


Refactoring in Ruby will help you

  • Recognize why poor code design occurs, so you can prevent it from occurring in your own code
  • Master better design techniques that lead to more efficient, reliable, and maintainable software
  • Fix code that’s too long, large, or difficult to follow
  • Ferret out duplication, and express each idea “once and only once”
  • Recognize missing or inadequately formed classes
  • Simplify overly complex relationships between classes and their subclasses
  • Achieve the right balance of responsibilities among objects
  • Make your code easier to test and change
  • Cope with incomplete library modules, and fix runaway dependencies
  • Learn the next steps to take after you refactor





- 辨識為何會出現糟糕的程式碼設計,以便在自己的程式碼中避免這種情況
- 掌握更好的設計技巧,以實現更高效、可靠和易於維護的軟體
- 修復過長、過大或難以理解的程式碼
- 消除重複,並將每個想法「只表達一次」
- 辨識缺失或不完整的類別
- 簡化類別及其子類別之間過於複雜的關係
- 在物件之間實現適當的責任平衡
- 使程式碼更易於測試和修改
- 處理不完整的程式庫模組,並修復失控的相依性
- 學習重構後的下一步驟