Chapter 4. Rewriting (Transplants)

“I would rather make my name than inherit it.”

— William Makepeace Thackeray

Image

4.1. Strategizing

Perhaps the most important question you will have to answer to begin with is this: To what extent should you rewrite the code? Even if at first it looks far too long to replace, rewriting from scratch is an option you should pursue if at all possible for a host of reasons:

• It allows you to psychologically “own” the code: It’s no longer someone else’s code; it’s yours, because you typed it.

• You’ll be far more familiar with the code, because people remember things much better if they’ve written them instead of merely ...

Get Perl Medic: Transforming Legacy Code now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.