One of my recent readings was Clean Code by Robert C. Martin. Thorough book with lots of examples on it. Firstly, the author describes the principles, patterns and practices of writing clean code. Then introduces several case studies of code cleanups with varying complexity. And at the end, introduces a list of “code smells” and heuristics.
What I really liked about this book is how the author shows the whole process of refactoring in detail, step by step. I used to think that such rock star programmers simply have this incredible brain capacity to tackle down big problems and refactor stuff in one go. Reading the book helped me understand that this is not the way to go. Simply by doing lots of small refactorings helps you isolate one problem at a time and work on it effectively, quickly moving on to another. In the end, you have more features and cleaner code. Not surprisingly, the tests plays a big part in such refactoring cycle.