did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780201795264

Perl Medic Transforming Legacy Code

by
  • ISBN13:

    9780201795264

  • ISBN10:

    0201795264

  • Edition: 1st
  • Format: Paperback
  • Copyright: 2004-03-05
  • Publisher: Addison-Wesley Professional
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99 Save up to $4.00
  • Digital
    $35.99
    Add to Cart

    DURATION
    PRICE

Supplemental Materials

What is included with this book?

Summary

Bring new power, performance, and scalability to your existing Perl code!
  • Cure whatever ails your Perl code!
  • Maintain, optimize, and scale any Perl software... whether you wrote it or not
  • Perl software engineering best practices for enterprise environments
  • Includes case studies and code in a fun-to-read format
Today's Perl developers spend 60-80% of their time working with existing Perl code. Now, there's a start-to-finish guide to understanding that code, maintaining it, updating it, and refactoring it for maximum performance and reliability. Peter J. Scott, lead author of Perl Debugged, has written the first systematic guide to Perl software engineering. Through extensive examples, he shows how to bring powerful discipline, consistency, and structure to any Perl program-new or old. You'll discover how to:
  • Scale existing Perl code to serve larger network, Web, enterprise, or e-commerce applications
  • Rewrite, restructure, and upgrade any Perl program for improved performance
  • Bring standards and best practices to your entire library of Perl software
  • Organize Perl code into modules and components that are easier to reuse
  • Upgrade code written for earlier versions of Perl
  • Write and execute better tests for your software...or anyone else's
  • Use Perl in team-based, methodology-driven environments
  • Document your Perl code more effectively and efficiently

If you've ever inherited Perl code that's hard to maintain, if you write Perl code others will read, if you want to write code that'll be easier for you to maintain, the book that comes to your rescue is Perl Medic.

If you code in Perl, you need to read this book.–Adam Turoff, Technical Editor, The Perl Review.

Perl Medic is more than a book. It is a well-crafted strategy for approaching, updating, and furthering the cause of inherited Perl programs.–Allen Wyke, co-author of several computer books including JavaScript Unleashed and Pure JavaScript.

Scott's explanations of complex material are smooth and deceptively simple. He knows his subject matter and his craft-he makes it look easy. Scott remains relentless practical-even the 'Analysis' chapter is filled with code and tests to run.–Dan Livingston, author of several computer books including Advanced Flash 5: Actionscript in Action



Author Biography

Peter J. Scott runs Pacific Systems Design Technologies, providing Perl training, application development, and enterprise systems analysis. He was a speaker on the 2002 Perl Whirl cruise and at YAPC::Canada, and he founded his local Perl Monger group. A software developer since 1981 and a Perl developer since 1992, he has also created programs for NASA's Jet Propulsion Laboratory. Scott graduated from Cambridge University, England, with a Master of Arts degree in Computer Science and now lives in the Pacific Northwest

Table of Contents

Prefacep. xi
Perl or perl?p. xv
Obtaining Perlp. xvi
Historical Perlp. xvii
Who This Book Is Forp. xviii
Typographical Conventionsp. xix
For Further Referencep. xx
Perl Versionsp. xx
Perl 6p. xxi
Acknowledgmentsp. xxii
Introduction (First Response)p. 1
First Things Firstp. 2
Reasons for Inheritancep. 3
What Next?p. 5
Observe the Program in Its Natural Habitatp. 5
Get Personalp. 6
Strictnessp. 6
Warningsp. 7
Surveying the Scenep. 13
Versionsp. 14
Part or Whole?p. 15
Find the Dependenciesp. 18
Test Now, Test Forever (Diagnosis)p. 25
Testing Your Patiencep. 26
Extreme Testingp. 27
An Example Using Test:: Modulesp. 40
Testing Legacy Codep. 56
A Final Encouragementp. 59
Rewriting (Transplants)p. 61
Strategizingp. 62
Why Are You Doing This?p. 63
Stylep. 68
Commentsp. 72
Restylingp. 74
Variable Renamingp. 75
Editingp. 79
Line Editingp. 80
Antipatternsp. 84
Evolutionp. 94
The Disciplined Perl Programp. 101
Package Variables vs. Lexical Variablesp. 102
Warnings and Strictnessp. 107
@use strict in Detailp. 110
@use warnings in Detailp. 117
Selective Disablingp. 119
Caveat Programmerp. 128
Perl Poetryp. 129
Restructuring (The Operating Table)p. 131
Keep It Briefp. 132
Cargo Cult Perlp. 133
Escaping the Global Variable Trapp. 156
Debugging Strategiesp. 157
Upgrading (Plastic Surgery)p. 161
Strategiesp. 162
Perl 4p. 163
Perl 5.000p. 164
Perl 5.001p. 165
Perl 5.002p. 165
Perl 5.003p. 166
Perl 5.004p. 166
Perl 5.005p. 167
Perl 5.6.0p. 169
Perl 5.6.1p. 170
Perl 5.8.0p. 170
Perl 5.8.1p. 171
Perl 5.8.2p. 172
Perl 5.8.3p. 172
Using Modules (Genetic Enhancement)p. 173
The Case for CPANp. 174
Using CPANp. 182
Improving Code with Modulesp. 188
Custom Perlsp. 196
Analysis (Forensic Pathology)p. 201
Static Analysisp. 202
Eliminating Superfluous Codep. 210
Finding Inefficient Codep. 212
Debuggingp. 216
Increasing Maintainability (Prophylaxis)p. 225
Making It Robustp. 226
Advanced Brevityp. 235
Documentationp. 239
Custom Warningsp. 242
Version Control System Integrationp. 244
A Case Studyp. 247
The Setupp. 248
Triagep. 251
Desperately Seeking Sanityp. 255
Coming into the 21st Centuryp. 259
Incorporating Modules Effectivelyp. 262
Incorporating Modules Effectively, Part 2p. 265
Making It Maturep. 268
Making It Mature, Part 2p. 272
Making It Mature, Part 3p. 276
Advanced Modificationp. 277
Conclusion (Prognosis)p. 283
In Conclusionp. 284
Perl Peoplep. 288
A Final Thoughtp. 291
Source Codep. 293
Tie::Array::Boundedp. 293
Benchmark::TimeTickp. 295
@smallprofppp. 300
Bibliographyp. 303
Indexp. 307
About the Authorp. 312
Table of Contents provided by Ingram. All Rights Reserved.

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Excerpts

PrefaceWorldwide, there are well over 200 billion lines of software that are fragmented, redundantly defined, hard to decipher, and highly inflexible... organizations run the risk of being mired down by a mountain of legacy code. William Ulrich, Legacy Systems: Transformation StrategiesCongratulations! Let's say you just graduated with a computer science degree and now, bucking the economic trend, you've landed a job at a prestigious company with a large information technology department. You're going to be replacing Bill, a programmer who won the lottery and was not seen or heard from again, save for a postcard from Puerto Vallarta two weeks later. Your coworkers warn you not to mention the postcard to your supervisor. You sit in Bill's cubicle throwing out pieces of vendor advertising left in the center desk drawer, thinking about how you're going to apply the elegant principles and sublime paradigms that professors inculcated in you at college. Just then, your supervisor arrives and, leaning over your shoulder, taps at your keyboard, bringing up a file."This is the last program Bill was working on. We think it's almost finished. We're behind schedule, so see if you can get it done by Thursday at the latest."As he leaves, you look at the program's tangle of misindented lines and cryptic variable names, searching for comments, but the only ones you can find read, "XXX-Must change" and "Kludge!-But should work." You wonder whether this is a corporate hazing ritual, but your instinct tells you otherwise.Welcome to the real world.In the real world, you're lucky if you get to spend all your time developing one new program after another. Much of the time you'll have to deal with someone else's. In the real world, programmers take over responsibility for programs written by people they might not know, like, or agree with. Even if you're fortunate enough to avoid this situation, you'll still have to maintain your own code; and one day you're going to look at something you wrote two years ago and ask, "What idiot wrote this?" Thereby arriving at more or less the same situation as the less fortunate programmers.This book is about taking over Perl code, whether written by someone else or by yourself at a time when you were less wise about maintainability. Many problems of code inheritance are common to all languages, but I have noticed them especially in Perl.Why does Perl tend to foster maintenance issues? The answer to this is the dark side of Perl's strength and motto: "There's More Than One Way To Do It" (enshrined in the acronym TMTOWTDI). Perl provides so many ways to do it that someone else quite possibly picked one that wasn't your way, or might have used several different ways all in the same program.The medical metaphor for this book stems from the rather drastic nature of the work we do as maintenance programmers. Often we must perform triage, deciding what code is worth saving and what is beyond redemption. Frequently we only have time for first aid, applying a field dressing to a ruptured program. We also have a hard time explaining our bills to the client. There may not be a Hippocratic Oath for programming, but it wouldn't hurt to come up with one.I wrote this book because I kept finding myself telling my students, "I'm going to teach you how to program Perl well, but I'd have to teach you a lot more before you could take over a program that wasn't written well, and you wouldn't appreciate taking that much time away from learning how to write good programs of your own." So I've written a book to fill that need.Perl is to computer languages as English is to human languages: bursting with irregular verbs, consistent only when it's convenient, borrowing terms from other languages to form a great melting pot of syntax. Most computer languages are described in terms of some kind of functional niche (Pascal: teachin

Rewards Program