Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When I wrote the original edition of Refactoring I had to decide how to open the book. Traditionally technical books start with a general introduction that outlines things like history and broad principles. When someone does that at a conference, I get slightly sleepy. My mind starts wandering with a low-priority background process that polls the speaker until he or she gives an example. The examples wake me up because it is with examples that I can see what is going on. With principles it is too easy to make generalizations, too hard to figure out how to apply things. An example helps make things clear.
So I decided to start the book with an example of refactoring. Several reviewers saw it as an unusual and somewhat brave move. But I’ve never regretted it. I used the same example for many talks I gave on refactoring too—and found that an example made a very good introduction. Although the specifics in the example were specific, you can use the concrete example to illustrate many broader issues.