Refactoring: Improving the Design of Existing Code (Addison-Wesley Signature Series (Fowler)) (英語) ハードカバー – イラスト付き, 2018/11/19
Martin Fowler is Chief Scientist at ThoughtWorks. He describes himself as “an author, speaker, consultant and general loud-mouth on software development.” Fowler concentrates on designing enterprise software: exploring what makes a good design and what practices are needed to create one.
- 出版社 : Addison-Wesley Professional; 第2版 (2018/11/19)
- 発売日 : 2018/11/19
- 言語 : 英語
- ハードカバー : 448ページ
- ISBN-10 : 0134757599
- ISBN-13 : 978-0134757599
- 寸法 : 2.03 x 18.8 x 23.37 cm
- Amazon 売れ筋ランキング: - 53,085位洋書 (の売れ筋ランキングを見る洋書)
The book was bound upside down. Even if that had been correct, the paper is of the cheapest possible quality which means you can see the text of the next page through the page you are reading, something that makes reading source code, where punctuation really matters, much more difficult.
My only gripe is that book looked half the size of the original! This isn't due to an extensive refactoring, but the rather thin, poor quality paper. "Bible paper" as one colleague quipped when they saw it. The thin pages are easily creased or torn, and the ink from the other side of each page shows through slightly. Very disappointing to see this with an Addison Wesley book, especially given the price and the fact the hard cover is the usual robust and high quality binding. I've deducted a star for this, although I nearly deducted two!
In the 20 years since the first edition this has become an uncontroversial point and "refactoring" has entered the daily lexicon of the software engineering discipline. Surely time for an update to the classic text on the subject to bring it up to date with all the learning that 20 years of widespread practise have revealed!
Unfortunately it seems that there isn't much new to say. The refactoring techniques have been shuffled around a bit, sometimes consolidated or split, but they all seem very familiar. They are now so familiar that they seem trivial in fact, so obvious they barely need mentioning. Whilst there is value in establishing a common lexicon for these common operations, the detailed step by step examples become a chore to read through because they are so obvious.
Most of the examples boil down to making small, incremental changes and then running your comprehensive set of tests (which take a few seconds to run) to make sure you didn't make a mistake. Fine if you're working on some small, isolated piece of code with unit tests accessible at a keystroke... Less helpful when you're working with part of a legacy system that takes 15 minutes to build and 30 to run through its tests (if they exist). Unfortunately the latter are where refactoring is probably most needed.
The book is worth adding to your library and at least skimming to pick up some patterns and terminology if you're new to programming. You might occasionally even find yourself consulting it as a reference for how to do a refactoring, though the answer is probably "in the obvious way".
The author should rightly be proud of the fact that his original text was so influential that 20 years later it is hard to imagine that there was a time when it needed to be written ;-)
The content of this book is second to none - it’s a goldmine of useful techniques to help keep code in the best shape possible. Fowler goes into excruciating detail with regard to the steps taken for each refactoring. I found the reinforcement of ‘smaller steps’ incredibly useful when applying the techniques on my own later - I moved incrementally with the confidence of knowing which exact step in the process may have triggered a test failure.
On the subject of testing, the book hammers home it’s importance in being able to actually refactor, which I can only see as a good thing.
Returning to the topic of physical quality, the book is hardbacked, the pages are printed with some colour (rare for a programming book), in addition to having a ribbon in the spine. These attributes only add to the positive experience of reading this book.