Buy new:
$38.59
FREE delivery: Wednesday, Dec 20
Ships from: Amazon.com
Sold by: Amazon.com
List Price: $59.99 Details

The List Price is the suggested retail price of a new product as provided by a manufacturer, supplier, or seller. Except for books, Amazon will display a List Price if the product was purchased by customers on Amazon or offered by other retailers at or above the List Price in at least the past 90 days. List prices may not necessarily reflect the product's prevailing market price.
Learn more
Save: $21.40 (36%)
FREE Returns
Return this item for free
  • Free returns are available for the shipping address you chose. You can return the item for any reason in new and unused condition: no shipping charges
  • Learn more about free returns.
FREE delivery Wednesday, December 20
Or fastest delivery Monday, December 18. Order within 1 hr 12 mins
Arrives before Christmas
In Stock
$$38.59 () Includes selected options. Includes initial monthly payment and selected options. Details
Price
Subtotal
$$38.59
Subtotal
Initial payment breakdown
Shipping cost, delivery date, and order total (including tax) shown at checkout.
FREE delivery January 3 - 19. Details
Arrives after Christmas. Need a gift sooner? Send an Amazon Gift Card instantly by email or text message.
Used: Very Good | Details
Sold by Reuseaworld
Condition: Used: Very Good
Comment: Very well cared for, only mild imperfections, if any.
Access codes and supplements are not guaranteed with used items.
Loading your book clubs
There was a problem loading your book clubs. Please try again.
Not in a club? Learn more
Amazon book clubs early access

Join or create book clubs

Choose books together

Track your books
Bring your club to Amazon Book Clubs, start a new book club and invite your friends to join, or find a club that’s right for you for free.
Kindle app logo image

Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.

Read instantly on your browser with Kindle for Web.

Using your mobile phone camera - scan the code below and download the Kindle app.

QR code to download the Kindle App

Follow the author

Something went wrong. Please try your request again later.

Refactoring: Improving the Design of Existing Code (2nd Edition) (Addison-Wesley Signature Series (Fowler)) 2nd Edition

4.7 4.7 out of 5 stars 978 ratings

{"desktop_buybox_group_1":[{"displayPrice":"$38.59","priceAmount":38.59,"currencySymbol":"$","integerValue":"38","decimalSeparator":".","fractionalValue":"59","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"mQRvOWu5mwFYQmCfasO6AT2U8aFmFZKD%2B0WSoafWrMJuLvWIiJ8yLLk8Rr3rc7LxqEL%2BhOVmfP9isjjHV8RgxZtv52sFsHJo6UmvpIvCjYxTRM4gC8n6Xg7Qyxnh9cyG%2BoV68eG82K9jMTR9XVOKqQ%3D%3D","locale":"en-US","buyingOptionType":"NEW","aapiBuyingOptionIndex":0}, {"displayPrice":"$34.08","priceAmount":34.08,"currencySymbol":"$","integerValue":"34","decimalSeparator":".","fractionalValue":"08","symbolPosition":"left","hasSpace":false,"showFractionalPartIfEmpty":true,"offerListingId":"mQRvOWu5mwFYQmCfasO6AT2U8aFmFZKDLfVw31aDwWLSsUJyZtRtpDP%2BXLz5lniAKMbvUcxwLcFa%2BJYSQAmLqaMNUJTInTvmqXKkoPoRDkdEotA3Mzue3zCJOOW%2FgrRzEgkzTbvrv1F6BdKdiLlVFneBg2lT9uc71zCf3Yftu3zBFDgSkqetshEDThQRcUZv","locale":"en-US","buyingOptionType":"USED","aapiBuyingOptionIndex":1}]}

Purchase options and add-ons


Save on audiobooks.
Hundreds of titles up to 80% off. Listen now

Frequently bought together

$38.59
Get it as soon as Wednesday, Dec 20
In Stock
Ships from and sold by Amazon.com.
+
$39.99
Get it as soon as Wednesday, Dec 20
In Stock
Ships from and sold by Amazon.com.
+
$47.49
Get it as soon as Tuesday, Dec 19
In Stock
Ships from and sold by Amazon.com.
Total price:
To see our price, add these items to your cart.
Details
Added to Cart
Choose items to buy together.

From the Publisher

Woman Coding at 2 monitors

Refactoring is...

a disciplined way to clean up code that minimizes the chances of introducing bugs. Although it is focused on the code, refactoring has a large impact on the design of systems. It is vital for senior designers and architects, as well as professional programmers, to understand the principles of refactoring and to use them in their projects.

Editorial Reviews

About the Author

Martin Fowler is Chief Scientist at ThoughtWorks. He describes himself as “an author, speaker, consultant and general loud-mouth on software development.” Fowler concentrates on designing enterprise software: exploring what makes a good design and what practices are needed to create one.

Product details

  • Publisher ‏ : ‎ Addison-Wesley Professional; 2nd edition (November 30, 2018)
  • Language ‏ : ‎ English
  • Hardcover ‏ : ‎ 448 pages
  • ISBN-10 ‏ : ‎ 0134757599
  • ISBN-13 ‏ : ‎ 978-0134757599
  • Item Weight ‏ : ‎ 2.03 pounds
  • Dimensions ‏ : ‎ 0.8 x 7.4 x 9.2 inches
  • Customer Reviews:
    4.7 4.7 out of 5 stars 978 ratings

Important information

To report an issue with this product, click here.

About the author

Follow authors to get new release updates, plus improved recommendations.
Brief content visible, double tap to read full content.
Full content visible, double tap to read brief content.

For all of my career I've been interested in the design and architecture of software systems, particularly those loosely classed as Enterprise Applications. I firmly believe that poor software design leads to software that is difficult to change in response to growing needs, and encourages buggy software that saps the productivity of computer users everywhere.

I'm always trying to find out what designs are effective, what approaches lead people into trouble, how we can organize our work to do better designs, and how to communicate what I've learned to more people. My books and website are all ways in which I can share what I learn and I'm glad I've found a way to make a living doing this.

Customer reviews

4.7 out of 5 stars
4.7 out of 5
978 global ratings

Submit a report

A few common reasons customers report reviews:
  • Harassment, profanity
  • Spam, advertisement, promotions
  • Given in exchange for cash, discounts
When we get your report, we'll check if the review meets our Community guidelines. If it doesn't, we'll remove it.
Sorry we couldn't load the review
Thank you for your feedback

Sorry, there was an error

Please try again later.

Top reviews from the United States

Reviewed in the United States on September 17, 2023
Reviewed in the United States on January 3, 2023
4 people found this helpful
Report
Reviewed in the United States on October 27, 2023
Customer image
4.0 out of 5 stars If you have the right 'why', you can bear almost any 'how'
Reviewed in the United States on October 27, 2023
Code is written by humans, executed by machines. Live code is also read by (other) humans for about 10x more than the time it took to write it. This is where "refactoring" comes to play. It is sort of making continuous improvement to code so it is more readable. It is cleaning up cobwebs from the corners.

One of the most popular CS papers ever ("Hints for Computer System Design", 1983) suggests 3-step process about writing code - first, make it work; second, make it right; finally, make it fast". This book, a succinct second edition of a very popular first, is an excellent "show and tell" for the second part.

It has a catalog of "code smells" and an inventory of "refactoring tricks" mapped to each. The first edition had working Java examples. The present one shows JavaScript ones. The examples are real-life but simple enough to not distract from the core - how to simplify the "first version" of code. Apart from the content, the insights that pops out can only be gleaned from years of deep experience. One example, say, most developers encode a "phone number" attribute as string in the first attempt of modeling. Soon enough, one needs to add "spam rules", "blocking number", "area code" etc. That necessitates phone number to be 'refactored' from string (i.e., a primitive type) to its own object model (say, a class called PhoneNumber). The author cheekily refers to the former type of behavior as "stringly typed" variables. Word play is a hallmark of many good engineers I'd worked with, but it is also a phenomenal way to remember things. Humor shortens the retrieval curve.

What I liked most about the book is a broad adoption of "Paracelsus' Maxim" - the difference between a poison and something benign is the dose. Most of the refactoring pattens come in pairs. You can "extract function" from a big one, or "inline function code" if it is short, obvious and singularly used, say. You can "replace parameter with query" or "replace query with a parameter". The only unpaired pattern shows up with large/complex conditionals (say, a switch, or a multiway nested conditional with 'guard clause) - most/all of them are pain to read and should ideally be refactored, say, with "replace conditional with polymorphism". Live book site has 4 more patterns beyond the book.

I found the refactoring patterns could be of three principal dimensions - one, structure -- variable, method, class, conditional; two, usage and locality -- depending on how much they're used and if they are used within/outside the module (class); three, data and mutation -- there is a clear separation between refactoring a data (or, value) object/data passed as value- or reference; separating data (query) from command etc. On top of that, some of the refactoring could be thought of as "helping the original developer" (say, to modularize or DRY better) vs. "helping others who may read the code later".

When I read the first edition years ago, IDEs were not as robust nor opinionated enough about refactoring. These days, majority if not all the refactoring is done by default - one just needs to click to accept, say, extracting a method. It has been a huge time saving and long-term benefit for collaborative work and fits very well within the philosophy of "continuous integration"/Kaizen etc. One could argue that lowers the importance of such book. While the IDE may do the grunt work, key decisioning remains with humans, for now. Especially since most refactoring could appear in polar opposites it is therefore even more important to understand the context - the "why" - which this book brilliantly lays out.
Images in this review
Customer image Customer image
Customer imageCustomer image
Reviewed in the United States on November 7, 2022
Reviewed in the United States on November 18, 2022
Reviewed in the United States on August 16, 2022
2 people found this helpful
Report
Reviewed in the United States on December 15, 2018
65 people found this helpful
Report

Top reviews from other countries

Translate all reviews to English
Pete
3.0 out of 5 stars Not as good as 1st edition
Reviewed in the United Kingdom on September 8, 2023
Amazon Customer
5.0 out of 5 stars Refactoring right is important
Reviewed in Canada on August 10, 2023
Client d'Amazon
5.0 out of 5 stars Excellent
Reviewed in France on October 13, 2023
Simon Booth
3.0 out of 5 stars Good in its day
Reviewed in the United Kingdom on August 4, 2019
32 people found this helpful
Report
Whatever Ye. Do
5.0 out of 5 stars Thoughtful and engaging
Reviewed in the United Kingdom on April 26, 2019
8 people found this helpful
Report