Home > Store

Refactoring: Improving the Design of Existing Code, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

Refactoring: Improving the Design of Existing Code, 2nd Edition

Best Value Purchase

Book + eBook + FREE Web Edition Bundle

  • Your Price: $73.09
  • List Price: $123.98
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

  • About this Web Edition
  • A Web Edition is an online learning product that you view in your web browser. Some Web Editions include additional interactive features, such as videos and quizzes. A Web Edition will be accessible from your Account page after purchase.

    Viewing a Web Edition requires a web browser with full HTML5 compatibility (Chrome, Firefox, Safari). Supported platforms are:

    • macOS 10.13 or greater
    • Windows 8 or greater
    • iOS 14 or greater
    • Linux

More Purchase Options

Book + FREE Web Edition

  • Your Price: $52.79
  • List Price: $65.99
  • About this Web Edition
  • A Web Edition is an online learning product that you view in your web browser. Some Web Editions include additional interactive features, such as videos and quizzes. A Web Edition will be accessible from your Account page after purchase.

    Viewing a Web Edition requires a web browser with full HTML5 compatibility (Chrome, Firefox, Safari). Supported platforms are:

    • macOS 10.13 or greater
    • Windows 8 or greater
    • iOS 14 or greater
    • Linux

eBook + FREE Web Edition

  • Your Price: $46.39
  • List Price: $57.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Acrobat® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.

  • About this Web Edition
  • A Web Edition is an online learning product that you view in your web browser. Some Web Editions include additional interactive features, such as videos and quizzes. A Web Edition will be accessible from your Account page after purchase.

    Viewing a Web Edition requires a web browser with full HTML5 compatibility (Chrome, Firefox, Safari). Supported platforms are:

    • macOS 10.13 or greater
    • Windows 8 or greater
    • iOS 14 or greater
    • Linux

Web Edition

  • Your Price: $46.39
  • List Price: $57.99
  • About this Web Edition
  • A Web Edition is an online learning product that you view in your web browser. Some Web Editions include additional interactive features, such as videos and quizzes. A Web Edition will be accessible from your Account page after purchase.

    Viewing a Web Edition requires a web browser with full HTML5 compatibility (Chrome, Firefox, Safari). Supported platforms are:

    • macOS 10.13 or greater
    • Windows 8 or greater
    • iOS 14 or greater
    • Linux

About

Features

  • The first update to a classic that is the standard reference for refactoring in over 15 years
  • Enhanced, web-based features including interactive examples, video snippets, code highlighting
  • Extensive use of JavaScript examples

Description

  • Copyright 2019
  • Dimensions: 7-3/8" x 9-1/8"
  • Pages: 448
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-475759-9
  • ISBN-13: 978-0-13-475759-9

Martin Fowler’s guide to reworking bad code into well-structured code

Refactoring improves the design of existing code and enhances software maintainability, as well as making existing code easier to understand. Original Agile Manifesto signer and software development thought leader, Martin Fowler, provides a catalog of refactorings that explains why you should refactor; how to recognize code that needs refactoring; and how to actually do it successfully, no matter what language you use.

  • Refactoring principles: understand the process and general principles of refactoring
  • Code smells: recognize “bad smells” in code that signal opportunities to refactor
  • Application improvement: quickly apply useful refactorings to make a program easier to comprehend and change
  • Building tests: writing good tests increases a programmer’s effectiveness
  • Moving features: an important part of refactoring is moving elements between contexts
  • Data structures: a collection of refactorings to organize data, an important role in programs
  • Conditional Logic: use refactorings to make conditional sections easier to understand
  • APIs: modules and their functions are the building blocks of our software, and APIs are the joints that we use to plug them together
  • Inheritance: it is both very useful and easy to misuse, and it’s often hard to see the misuse until it’s in the rear-view mirror---refactorings can fix the misuse

Examples are written in JavaScript, but you shouldn’t find it difficult to adapt the refactorings to whatever language you are currently using as they look mostly the same in different languages.

"Whenever you read [Refactoring], it’s time to read it again. And if you haven’t read it yet, please do before writing another line of code." –David Heinemeier Hansson, Creator of Ruby on Rails, Founder & CTO at Basecamp

“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.” –M. Fowler (1999)

Extras

Related Article

What It's Like to Work at...Thoughtworks: A Conversation with Martin Fowler

Author's Site

Please visit the author's site at martinfowler.com.

Sample Content

Online Sample Chapter

When to Start Refactoring Code—and When to Stop

Table of Contents

  • Preface
  • 1. Refactoring, a First Example
  • 2. Principles in Refactoring
  • 3. Bad Smells in Code
  • 4. Building Tests
  • 5. Toward a Catalog of Refactorings
  • 6. Composing Methods
  • 7. Moving Features between Objects
  • 8. Organizing Data
  • 9. Simplifying Conditional Expressions
  • 10. Making Method Calls Simpler
  • 11. Dealing with Generalization
  • 12. Big Refactorings
  • 13. Refactoring, Reuse, and Reality
  • 14. Refactoring Tools
  • 15. Putting It All Together

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.