Austin Computer Book Club

Free Chapter: Refactoring

With a little more than a month before our Aug. 27 meeting to discuss Martin Fowler’s Refactoring, 2nd ed., you still have plenty of time to grab your own copy of this essential masterpiece. If you’re worried that this title is too expensive, too long, or too dense, just read on for a little help overcoming those obstacles!

Too expensive? It’s true: it’s not a cheap one. Published this year, a color-printed hardback; it’s practically a college textbook. Note that it is in large part a reference book, cataloging many types of refactorings in detail, so it will be a handy (and good-looking) book to keep on your desk for the rest of your career.

But if you’re still unwilling or unable to spend the $44-$48, that’s okay. One idea: this material is valuable enough that you could ask your company to order a copy. Even for shared team use, at least. You can also check in at the publisher’s website periodically; I’ve seen serious sales there of 40% or more just in the last couple of months.

Lastly – and finally getting to the title of this post – the book’s site offers the entire first chapter as a free PDF. It’s a substantial 44 pages, giving a full, in-depth explanation of what refactoring is, using example code. Reading this PDF by itself would be plenty to “justify” coming to the meetup (aside from the fact that you never have to have read much of the book to attend!).

Too long, or too dense? I’ll admit it, the thought of reading an encyclopedic catalog of refactoring techniques from cover to cover made me a little hesitant to dive in. When I did finally crack it open, I was relieved to find the author himself let me off the hook! From the preface, under “how to get the most from this book without reading all of it” (!):

If you want to understand what refactoring is, read Chapter 1—the example should make the process clear.
If you want to understand why you should refactor, read the first two chapters. They will tell you what refactoring is and why you should do it.
If you want to find where you should refactor, read Chapter 3. It tells you the signs that suggest the need for refactoring.
If you want to actually do refactoring, read the first four chapters completely, then skip-read the catalog. Read enough of the catalog to know, roughly, what is in there. You don’t have to understand all the details. When you actually need to carry out a refactoring, read the refactoring in detail and use it to help you. The catalog is a reference section, so you probably won’t want to read it in one go.

Note that the first use case there can be met using the free PDF from the ThoughtWorks site linked above.

So grab that PDF, and a full copy eventually, somehow, and we’ll see you on August 27!

Leave a Reply

Your email address will not be published. Required fields are marked *