O'Reilly logo

Perl Medic: Transforming Legacy Code by Peter Scott

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required