or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Sell Back Your Copy
For a $1.00 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Perl Medic: Transforming Legacy Code
 
See larger image
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Perl Medic: Transforming Legacy Code [Paperback]

Peter J. Scott (Author)
4.4 out of 5 stars  See all reviews (7 customer reviews)

List Price: $39.99
Price: $25.38 & this item ships for FREE with Super Saver Shipping. Details
You Save: $14.61 (37%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Only 2 left in stock--order soon (more on the way).
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more


Book Description

0201795264 978-0201795264 March 15, 2004 1
This book is about taking over Perl code, whether written by someone else or by yourself at an earlier time. Developers regularly estimate that they spend 60 to 80 percent of their time working with existing code. Many problems of code inheritance are common to all languages, but the nature of the language makes Perl especially tricky. The reason why is that Perl is similar to English - bursting with irregular verbs, consistent only when it's convenient, borrowing terms from other languages, and providing many ways to say the same thing. In fact, Perl developers have a motto with the abbreviation TMTOWTDI: There's More Than One Way To Do It. While this flexibility is one of the language's strengths, it also makes it extremely difficult when you are faced with an existing piece of code. There are millions of lines of Perl code being used all over the Web; much of it was built on an ad hoc basis, the creators never imagining that the code would still be in use months or years later. This book will be the resource all Perl programmers need to understand someone else's code, even when it's bad; repair it; convert it to a better style; upgrade it to the latest version of Perl; maintain it; and find and fix its bugs.

Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Customers buy this book with Higher-Order Perl: Transforming Programs with Programs $49.70

Perl Medic: Transforming Legacy Code + Higher-Order Perl: Transforming Programs with Programs
  • This item: Perl Medic: Transforming Legacy Code

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Higher-Order Perl: Transforming Programs with Programs

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

Amazon.com Review

Perl ranks among hackers' favorite languages--there's always another approach to a problem, always optimization to be done, and forever new techniques to try. Perl's a hoot. But the culture of tinkering that surrounds Perl has resulted in a large body of hard-to-understand legacy code. That legacy code has to be maintained, extended, and adapted to new conditions--often without the help of the person who originally created it. Perl Medic considers Perl from the perspective of a programmer looking at code written by someone else and trying to answer the ancient question: "What were they thinking?"

It's a creative approach, and one that makes good reading for someone well-versed in Perl programming (author Peter Scott makes the analogy of becoming fluent in a human language, such as French, then studying its various accents and dialects). He shows, for example, a kludgy piece of code that's meant to catch CGI form uploads, then indicates that the obvious replacement is the CGI.pm module. Elsewhere, Scott shows why symbolic references are bad, and how to avoid them by means of hashes. Some of the value in this book is in the form of documentation of the differences among Perl versions; other useful coverage deals with warnings and strictness control as debugging tools. Read this straight through to improve your own code; use the index to help decipher and improve what someone else has written. --David Wall

Topics covered: How to write good Perl code, read bad Perl code, and convert bad Perl code into good in less time that would be required to write an equivalent replacement program from scratch. Testing, debugging, documenting, replacing custom code with CPAN modules, and embracing features that became available in later versions of Perl are all covered. Overall, the author endorses and generally explains the principles of Extreme Programming (XP) for Perl work.

From the Back Cover

  • 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

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

Bring new power, performance, and scalability to your existing Perl code!

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.

On the Web Site

Download all of the book's sample code from .


Product Details

  • Paperback: 336 pages
  • Publisher: Addison-Wesley Professional; 1 edition (March 15, 2004)
  • Language: English
  • ISBN-10: 0201795264
  • ISBN-13: 978-0201795264
  • Product Dimensions: 9.2 x 7 x 0.7 inches
  • Shipping Weight: 1.2 pounds (View shipping rates and policies)
  • Average Customer Review: 4.4 out of 5 stars  See all reviews (7 customer reviews)
  • Amazon Best Sellers Rank: #214,909 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

7 Reviews
5 star:
 (4)
4 star:
 (2)
3 star:
 (1)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.4 out of 5 stars (7 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

15 of 16 people found the following review helpful:
5.0 out of 5 stars Novel and effective tutorial in solid Perl Programming, March 17, 2004
This review is from: Perl Medic: Transforming Legacy Code (Paperback)
You can learn a lot from books (or so it seems), but you can't learn a feel for the language. I had read all of the O'Reily Perl books and found myself in charge of a large Perl project writing new code. I hired on a real Perl guru and he taught me a ton, in person, about how to write Perl as Perl and do it well. What amazes me about Perl Medic is how much of what the Perl guru taught me is in this book. It's as if I had the man by my side again.

On it's face that makes it sound like you should pick up the book immediately. And for someone who is serious about Perl I think you should get this book. But there are still some faults. It could be a little better organized. And some of the common problems, like CGI scripts having embedded HTML, could be given more prominence and the text templating alternative given some more space. I looked in the tiny index for HTML::Template and found only two references, both of which were pretty short.

In what is probably both a curse and a blessing the book is not only about fixing legacy code. The majority of the book is about becoming a better Perl programmer and writing Perl as Perl. There are a few chapters and the beginning and end that are specifically about working with legacy code, but the majority of the book is practical insights into Perl coding styles using code fragments with effective exposition.

Small problems aside. This unique book is fun to read and is packed with valuable insights if you spend the time to look. The author obviously knows a lot about Perl and understands how to convey that knowledge to the reader effectively. If you are looking to maintain some Perl, or if you have hit a plateau in your understanding of Perl and you need a push to get to a higher level this book is for you.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


11 of 11 people found the following review helpful:
5.0 out of 5 stars One of the best Perl books out there, June 24, 2004
This review is from: Perl Medic: Transforming Legacy Code (Paperback)
A quote on the front cover of this book says "if you code in Perl then you need to read this book". That's a pretty bold claim to make. It made me think of the hyperbole on covers of books that claim to teach you to program in Perl in just a few days. But this book is published by Addison Wesley, who are a well respected technical publisher of technical books and the quote is from Adam Turoff who certainly knows what he's talking about when it comes to Perl programming. So in this case the claim isn't hyperbole. The book really is one that I want every Perl programmer to read.

Perl gets a lot of bad press from people who claim that it encourages people to write unreadable code. Whilst there's certainly a lot of very bad Perl code out there I think that's more a sign that it's used by a lot of people who don't know how to program than a reflection on the language itself. And that's where this book comes in. It assumes that you are familiar with the syntax of Perl but that you've never really been shown how to use it effectively. Which is a situation that many Perl programmers find themselves in.

Perl Medic is actually targetted at people who have to maintain older Perl code written by someone else, but I think that the information it contains is just as useful to anyone coding in Perl. Peter Scott has a lot of experience in writing Perl and in training other people to write Perl and the distillation of that experience and knowledge into these 300-odd pages mean that there are few Perl programmers who won't pick up something useful from this book.

The main emphasis in the book is on increasing the maintainability of code. The techniques are wide-ranging. I particularly enjoyed the examples of refactoring programs and the coverage of using modules from CPAN. Two other very good sections are the one on antipatterns in chapter 4 and the one on cargo cult programming in chapter 6. Together these sections give a programmer a number of easy to recognise quick wins when improving existing code and a checklist of things not to do when writing new code.

There are a couple of niggles. I've already mentioned that I think the book has been slightly mis-targetted and that it should have been aimed at anyone writing Perl code. The other problem that I had was that the medic analogy that runs through the book gets a bit strained at times. But these are only minor and they shouldn't prevent you from adding this book to your library.

In fact, all in all, the quote on the front cover is pretty accurate.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


8 of 8 people found the following review helpful:
5.0 out of 5 stars A good book with a misleading title, May 18, 2004
This review is from: Perl Medic: Transforming Legacy Code (Paperback)
While the "medic" metaphor recurs throughout the book, most of the material isn't directly related to repairing old code. Instead, this is a collection of best practices for new code. (The author recommends rewriting existing code if at all possible.) It ends up resembling another excellent Perl title, Joseph Hall's Effective Perl Programming. Good company to keep. Perl Medic has the advantage of being newer, and of covering a bit more material. The writing style is very easy to read, and the order of presentation works well. An excellent title for any intermediate-level Perl programmer.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews





Only search this product's reviews



Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(4)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject