This repository is a curated list of refactoring-related resources. Maintained by Gregory Witek as part of my work on Refactoring Python Code
There are a few definitions of refactoring (in practice very similar). The most popular is a 2-part definition by Martin Fowler:
Refactoring (noun): a change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior.
Refactoring (verb): to restructure software by applying a series of refactorings without changing its observable behavior.
- Refactoring: Improving the Design of Existing Code by Martin Fowler and Kent Beck - the refactoring book, that presented the concept of refactoring to wider audience. Available in 2 editions: 1st contains examples in Java, 2nd in JavaScript. Must-read for any adept of software engineering
- Refactoring Workbook by William C. Wake - a workbook that uses the 1st edition of "Refactoring" book as a reference
- Refactoring to Patterns by Joshua Kerievsky - combines the practice of refactoring with object-oriented design patterns. The book presents real-life problems and solutions showing a total of 27 refactoring techniques
- Refactoring: Ruby Edition by Jay Fields, Shane Harvie, and Martin Fowler, with Kent Beck - the Ruby-specific edition of the original "Refactoring" book with a few techniques added and of course examples adapted so that they're more useful in Ruby
- Refactoring to Rust by Nate Mara (currently in early access program, as of March 2021) - this book focuses on iterative adoption of Rust via its interop mechanisms
- Refactoring at Scale by Maude Lemaire - this book talks about refactoring in large and complex codebases, with examples from author's experience at Slack
- Refactoring TypeScript: Keeping Your Code Healthy by James Hickey
- Refactoring JavaScript: Turning Bad Code Into Good Code by Evan Burchard
- Refactoring for Software Design Smells by Girish Suryanarayana, Ganesh Samarthyam, and Tushar Sharma
- Refactoring to Collections by Adam Wathan - this book (+ videos) focus on refactoring PHP code to use modern collection library (used, among others, by Laravel framework)
- Refactoring Databases: Evolutionary Database Design by Pramod Sadalage - this book talks about refactoring on the database level instead of code level,
- Refactoring.com - part of Martin Fowler's website, contains a catalog of 60+ techniques; free version provides simple examples, paid version contains description, mechanics and more. Most of tecnhiques are available in the "Refactoring" book.
- Refactoring Guru - contains 60+ techniques, each with description, implementation and a simple example + around 20 code smells with description and suggested refactorings that help to get rid of it
- It's Not Refactoring, It's Untangling, by Cody Powell
- What Are We Doing with All These Tests? (And, Refactoring) by Harry J. W. Percival - this is part of the Test-Driven Development with Python book that talks primarily about TDD, but also covers the topic of refactoring
- Examples of Refactoring PHP Code for Better Readability by Gilbert Pellegrom - a few refactoring techniques with examples in PHP
- Let's Not Misuse Refactoring by German Velasco - interesting article that explores what do we really mean when we say that refactoring does not change observable behaviour of our code
- Code Refactoring by Arvind Padmanabhan - Devopedia article describing the concept and history of refactoring; it also provides answers to some common questions about the topic
- Refactoring by the Book by Marcos Matos - the article talks about refactoring while keeping tests green (almost) the whole time
- How to justify code refactoring time? - discussion and advice on justifying refactoring (Stack Exchange)
- History of Refactoring - C2 wiki post about beginnings of refactoring (I am not sure how accurate it is regarding the first use of the term "refactoring")