Goodreads helps you keep track of books you want to read.
Start by marking “Refactoring: Improving the Design of Existing Code” as Want to Read:
Refactoring: Improving the Design of Existing Code
Enlarge cover
Rate this book
Clear rating
Open Preview

Refactoring: Improving the Design of Existing Code

4.20  ·  Rating Details  ·  4,296 Ratings  ·  153 Reviews
As the application of object technology—particularly the Java programming language—has become commonplace, a new problem has emerged to confront the software development community. Significant numbers of poorly designed programs have been created by less-experienced developers, resulting in applications that are inefficient and hard to maintain and extend. Increasingly, so ...more
Hardcover, 431 pages
Published July 8th 1999 by Addison-Wesley Professional (first published January 1st 1999)
More Details... edit details

Friend Reviews

To see what your friends thought of this book, please sign up.

Reader Q&A

To ask other readers questions about Refactoring, please sign up.

Be the first to ask a question about Refactoring

The Pragmatic Programmer by Andrew HuntThe C Programming Language by Brian W. KernighanDesign Patterns by Erich GammaClean Code by Robert C. MartinCode Complete by Steve McConnell
Essential Programming Books
7th out of 126 books — 333 voters
The Pragmatic Programmer by Andrew HuntClean Code by Robert C. MartinCode Complete by Steve McConnellRefactoring by Martin FowlerWorking Effectively with Legacy Code by Michael C. Feathers
Software Craftsmanship
4th out of 27 books — 78 voters

More lists with this book...

Community Reviews

(showing 1-30 of 3,000)
filter  |  sort: default (?)  |  Rating Details
David Workman
While this book is more of a reference book than a book to read through a memorise (and I intend to use it as such in the future), this book is well worth having for software engineers looking to improve their practices. Even if you don't subscribe to Martin Fowler's 'lots of small methods and classes' style of programming (and I admit, it takes some getting used to), the techniques in this book are still useful and applicable to any software project.

The book consists mainly of a catalog of ref
Jan 06, 2013 Andreea rated it really liked it
If you are interested in improving and maintaining the quality of your code this book should be on your reading list. It is not the kind of book you read once and forget about it. When you are doing refactoring it’s always recommended to come back and check the categories explained in it.

What I really enjoyed is that it confirmed some of the ideas I already had about software development. On the first hand you should have a robust test suite in order to be certain that refactoring didn’t change
Ivan Idris
Jan 22, 2012 Ivan Idris rated it it was amazing
Refactoring is the process of rewriting software, without changing the way it functions, in order to improve its readability, testability or maintanability. A book has been written on the subject by Martin Fowler. Some of the chapters were written by other people.

“Refactoring: Improving the Design of Existing Code” is focused on OO programming (lots of Java examples) and Agile practices. It is setup as a catalog of refactoring techniques. Each page dedicated to a refactoring is clearly marked, s
Apr 18, 2012 Nick rated it really liked it
I was having a great time reorganizing and hopefully improving some Java at work, and a coworker had mentioned this book. Good stuff. I didn't read through the whole reference section, but took a quick look at some. It seems like the IDE I was using (IntelliJ) had a bunch of refactorings (not sure what the overlap is with this catalog) available as keyboard shortcuts, basically. But it's still fun to read about. Unfortunately, I got this book approximately the same week I shifted off Java develo ...more
Mar 09, 2009 Daniel rated it it was amazing
Shelves: work
The best programming book I've read in a long time.

There are a lot of design and analysis books but not a lot of programming books. I would gladly read anything from Fowler. It's so simple of a concept but it goes against a lot of 'common sense'. Essentially, don't over design. Don't spend too much time in design and analysis that you've been told to do based on the wrong assumptions of the waterfall model (which never worked).

Kent's book on Test-driven Development is a great companion to this
Jesse Buss
Jan 27, 2016 Jesse Buss rated it liked it
Overall I was disappointed in this book. Modern tools and IDE's have removed nearly all of the pain points that are laid out in this book, which made reading annoying and tiresome. I skipped the "Mechanics" section of every single refactor because they are just not relevant in 2016. Your compiler and IDE will tell you every thing you need to know in nearly all cases.

That being said the content is good, albeit very basic. I would recommend this to someone who is just out of college or with littl
Jun 16, 2015 Katherine rated it really liked it
Shelves: programming
Finally finished this, long after the book club for it was over! This is a classic, which means there are both really good pieces of wisdom in here as well as concerns that don't need to be worried about so much anymore with more modern tools and text editors. The majority of the book is kind of a reference of refactoring "recipes" with checklists to go through to make sure you haven't missed something--time will tell if I end up using that reference portion. The descriptions and motivations for ...more
Krishna Kumar
May 03, 2015 Krishna Kumar rated it really liked it
The author discusses the various types of refactoring that can be done to improve the internal quality of programs. He explains the steps that should be taken to avoid any regression bugs. The author provides guidance on when certain refactoring steps should be taken and when they should not, or other steps taken. Overall a good book, though as the author explains, there are certain system-level refactoring explained only in brief. I would recommend reading this book, along with other books on d ...more
Miguel Ángel Ocaña Silva
Feb 11, 2015 Miguel Ángel Ocaña Silva rated it really liked it
Shelves: software
Además de un 'Must Read' es un libro al que hay que volver cada cierto tiempo.

Los consejos y puntos claves están escondidos entre la colección de refactors que va explicando.

De vez en cuando también incluye alguna perla de humor inglés.

Algunos Refactors pueden parecer muy simples, pero son necesarios ya que va apoyándose en los simples para ir construyendo los más grandes.

También hay mucha insistencia en las mecánicas y su importancia, en principio puedes pasar de forma superficial, pero el l
Aug 29, 2015 Elias rated it it was amazing
Nice book, I'm glad I finally managed to read it. I'm already familiar with the discipline of refactoring and testing, I also had read the first chapter a few years ago but it was interesting to go through the whole book.

Despite the code examples being a bit outdated, this book is still relevant because it's about fundamentals to software engineering that developers end up learning mostly from experience. I specially liked the advice from Kent Beck at the end of the book.

Of course lots of things
Yevgeniy Brikman
Aug 02, 2014 Yevgeniy Brikman rated it liked it
Pros: presenting refactoring as a regular part of the development process is an important step forward. The example at the start of the book is a great demonstration if why this stuff matters. Nice to systematically catalog code smells.

Cons: the code smells section is great, but has no actual code examples. The chapters that go through the refactoring moves are better, but having each one isolated makes it boring to read. The big refactoring chapters are only UML diagrams, which are not good te
Alfredo Chavez
Mar 31, 2014 Alfredo Chavez rated it it was amazing
It doesn't matter if your IDE has refactoring capabilities built-in. You deserve yourself reading this one so you can refactor your code more effectively, but even more important: why and when you should (or shouldn't) refactor.

I'd practiced Object-Oriented programming for 10 years before reading this book, only to find out that I didn't understand it even a little bit. This book was a real eye-opener.

And while you're reading through it, you'll also learn about good OOD too!

Instant classic!
Vedran Novoselac
Jan 09, 2014 Vedran Novoselac rated it it was amazing
Shelves: dev-read
Although written in 1999, it's still as fresh as it was back then. In so many cases I found it to be a positive confirmation of what I was doing unaware it has it's item in this book, but the book does it so much better, with precise mechanics and certain outcome. Sticking to the step-by-step approach, things are less likely to go wrong.

Here are some highlights from the book:
* Introduce Null Object - now widely known, somewhat non-intuitive, but invaluable, especially if you wish to reduce cyclo
Jan 28, 2011 Tim rated it it was amazing
Shelves: technical_docs
Pros: The opening chapters give a great introduction to refactoring. The middle chapters are worth their weight in gold as a reference to object-oriented refactorings. Explains why refactoring is a necessity for us.

Cons: The final 3 chapters by other authors weren't very useful to me, exluding Beck's chapter, but don't necessarily detract from the book because I suspect others will find them relevant.

Summary: One of those "must have" books for all "classical" developers (procedural and object-or
Sylvain Prat
May 18, 2009 Sylvain Prat rated it really liked it
Shelves: programmation
C'est un livre très instructif montrant comment réagencer du code existant en vue de l'améliorer (lisibilité, maintenabilité, testabilité, préparation à l'ajout de fonctionnalités). C'est en quelque sorte un livre de recettes, mais de ce fait il est assez difficile/fastidieux à lire, surtout de bout en bout.

Une chose qui m'a un peu agacé à la lecture du bouquin : les exemples sont introduits après le mode d'emploi, ce qui fait que l'on a du mal à comprendre ce que veux dire l'auteur avant d'avo
Nov 18, 2010 Irwan rated it it was amazing
Shelves: finished, it, references, 2010
This book is the foundation of those sets of techniques, methodologies and practices which came later, but I've already known before finishing this book. Very inspiring for me professional-wise. There is also a historical element in reading it, that is to see the conception of an innovative idea in the academic work until it became adapted in the industry.

Reading the techniques like Extract Method, etc, I usually just scan quickly the steps prescribed, because now it takes only a few keys in the
May 21, 2015 Wangyiran rated it liked it
i want give it between 3 stars and 4 stars.
it tell many refactor ways,it let you can break methods into small methods,and make code more clear.
but the step is too repeated,i just skip it look at these example,fortunate the example is good for understand.
but these example is a toy,in real project,many methods not only way to refactor,so it is not easy to do in real project.

and i have a question:the small refactor bring what benefit to me?just easy understand?or some important something in archite
Zbyszek Sokolowski
Sep 12, 2014 Zbyszek Sokolowski rated it really liked it
This is classic book, just a little outdated nowadays but mainly due too fact that examples uses Java 2.0. On the other hand I found it very useful. It describes many refactoring methods from very basic to more even architectural ones. Learning how to refactor code, has another big advantage it teaches you how to write good code at first try. Moreover because forecasting which features will be added in future some project mistakes are often unavoidable, refactoring gives you a tool how to deal w ...more
Frederik Sørensen
Dec 29, 2013 Frederik Sørensen rated it really liked it
Shelves: software
The book does a very good job at explaining how to make refactorings and provides a very detailed reference section. Each refactoring is shown in detailed small steps so it is easily reproduced in you own system. The authors make an effort to relay that refactoring is an ongoing process and are best made by taking babysteps, not by freezing a project for months while refactoring. They make refactoring a part of the daily routine.

The examples are made in Java but is easily applied to any OO lang
Ivan Prisyazhnyy
Jan 27, 2016 Ivan Prisyazhnyy rated it liked it
Shelves: dev
Not helping much in practice, but can help you if you have no idea what to do looking at the piece of code to brute-force all possibilities. Maybe good to students. Personally, I don't like this kind of formalization, of what should come from your mind masterpiece, from your sense of beautifulness to the best effort of matching business goals and evolution processes.
May 04, 2013 Brian rated it really liked it
A fantastic catalog of refactoring patterns. To read this book is to read code, lots of it. That's both good and bad; good because you can't learn code without actually coding; bad because it's very hard to provide good examples of code that marries well with the reader's experiences. Show a simple example, the richness of the lesson is lost. Show a complex example, the reader gets lost in the example and misses the lesson.

The first priority of code is to make it work. But how often do we stop
Khang Nguyen
Jan 19, 2016 Khang Nguyen rated it liked it
Like many other books of Martin Fowler, easy to read and easy to follow. Though a bit too simple to reflect the complicated nature of refactoring and how decision should be made (but the example in the first chapter is great). The language used in the book is Java, making it quite less practical for a user of dynamic languages like me.
Evan Leybourn
Dec 06, 2014 Evan Leybourn rated it really liked it
Nearly 15 years old, you would think this book (in fact this idea) would be well enough understood to be redundant. Sadly this book remains as relevant today as when I first read it all those years ago. Put simply; if you are a software developer, you /must/ understand this book
Ronald Dragstra
Feb 09, 2016 Ronald Dragstra rated it it was amazing
Classic book that every programmer should have on the bookshelf. It's probably one of the most referenced book by other authors. It's nice to look for their books as well, since Martin Fowler surely inspired them to follow-up on his 'legacy'.
Stancalău Cristian
Dec 06, 2014 Stancalău Cristian rated it really liked it
The topics are very well structured but it is not a book for reading as it is for reference when getting stuck on some refactoring issues. However, I would recommend going through it once just to get familiarized with the terms and techniques.
Yang Zhang
Jan 26, 2015 Yang Zhang rated it it was amazing
Shelves: programming
I am using python extensively in scientific research. I used to think that I was a good programmer. But after a lot failures and struggling, I realized that I am far from a good programmer and in order to become one, you have to read and learn.

This book is definitely a must-read book for intermediates to be propelled into the next level.

It talks about bad senses in the design of object-oriented programs and gives clues to identify problems and suggestions on how to improve them.

After reading thi
Vladimir Rybalko
Nov 29, 2012 Vladimir Rybalko rated it really liked it
Every programmer can develop code that a computer understands, but only units write understandable code to others. It's really brilliant words. Refactoring is a very important process. Very pity that much developers don't understand it. Especially insulting when these people are your managers. In this case, you have only one way, don't speak about refactoring as author advised.
Testing is refactoring's friend. It is another very useful advise. Nice to know that more and more developers spend more
Georgi Mirchev
Aug 10, 2015 Georgi Mirchev rated it it was amazing
Shelves: programming
The book has some really good advices even for experienced programmers. I really found some good ideas especially connected with if/switch statements, input params to objects and using State/Strategy patterns. Thanks!
Carl-Erik Kopseng
Mar 04, 2012 Carl-Erik Kopseng rated it really liked it
Not a book to read cover to cover, but very useful when you are wondering how to achieve something. Might have been groundbreaking in its day, but when reading it a lot of the tips/how-to's seemed not to have passed the test of time. Not because they are not correct, but because a lot of them are now integrated into the tools (IDEs) we use every day. Might make more sense if you are hardcore a Vi/Emacs user without refactoring support.

A lot of the harder refactorings are not in any IDE, and then
« previous 1 3 4 5 6 7 8 9 99 100 next »
There are no discussion topics on this book yet. Be the first to start one »
  • Refactoring to Patterns
  • Working Effectively with Legacy Code
  • Test Driven Development: By Example
  • Domain-Driven Design: Tackling Complexity in the Heart of Software
  • Design Patterns: Elements of Reusable Object-Oriented Software
  • Growing Object-Oriented Software, Guided by Tests
  • Agile Software Development, Principles, Patterns, and Practices
  • Xunit Test Patterns: Refactoring Test Code
  • Code Complete
  • Enterprise Integration Patterns: Designing, Building, and Deploying Messaging Solutions
  • Programming Pearls
  • The Pragmatic Programmer: From Journeyman to Master
  • Effective Java Programming Language Guide
  • Effective C++: 55 Specific Ways to Improve Your Programs and Designs
  • Head First Design Patterns
  • Release It!: Design and Deploy Production-Ready Software (Pragmatic Programmers)
  • Beautiful Code: Leading Programmers Explain How They Think
  • The Practice of Programming

Goodreads is hiring!

If you like books and love to build cool products, we may be looking for you.
Learn more »
Martin Fowler (b. 1963) is a software engineer, Chief Scientist at ThoughtWorks, and an outspoken advocate for best practices in enterprise software design, particularly in regard to agile software development methodologies, including extreme programming.
More about Martin Fowler...

Share This Book

“I’m not a great programmer; I’m just a good programmer with great habits.” 3 likes
“Whenever I have to think to understand what the code is doing, I ask myself if I can refactor the code to make that understanding more immediately apparent.” 2 likes
More quotes…