alama@world: ~/
./toggle-theme
Refactoring: Improving the Design of Existing Code cover

# Refactoring: Improving the Design of Existing Code

by Martin Fowler
Completed
Software Engineering Object-Oriented Programming Software Reengineering

Description

A guide to improving the design of existing code through behaviour-preserving transformations, covering a catalogue of code smells and the techniques used to address them.

cat notes.md

My Notes

Why I Read This Book

I wanted to develop a more structured approach to improving existing codebases. As I often work with legacy code, I needed proven techniques to make incremental improvements without breaking functionality.

Key Takeaways

Code Smells

The book's catalog of "code smells" provided me with a vocabulary to identify problematic patterns in code that might need refactoring, making it easier to communicate issues with team members.

Refactoring Techniques

Learning the step-by-step refactoring techniques has given me confidence to make changes safely. The book emphasizes making small, testable changes that maintain behavior while improving structure.

Test-Driven Development

Fowler emphasizes the importance of having tests in place before refactoring, which reinforced my commitment to maintaining comprehensive test coverage.

How I've Applied It

I've incorporated many of the refactoring patterns into my daily work, particularly "Extract Method," "Move Method," and "Replace Conditional with Polymorphism." These have helped me transform complex, difficult-to-maintain code into more modular, readable components.

The book has also influenced how I approach code reviews, where I now look for opportunities to suggest specific refactorings that can improve the codebase incrementally.

Overall, this book has become an essential reference that I return to frequently when faced with challenging code organization problems.