less than 1 minute read

It is common to work on brownfield projects where the codebase is messy and difficult to work with. This book by Martin Fowler covers the process of refactoring and how to improve the design of existing code.

The book is driven by examples to illustrate the process of refactoring. It covers the common code smells and how to identify them - duplicated code, long function, long parameter list, global or mutable data or loops. The author suggests that we should write test suites before refactoring, to drive effectiveness and avoiding mistakes.

The common refacotrings include changing function declarations, encapsulation, extracting code, removing dead code, renaming fields or variables, replacing inline code with function calls, nested conditionals with guard clauses.

I would recommend this book to programmers who want to write understandable and maintainable code to help them be more effective when working in a team.

Comments