4 of 4 people found the following review helpful
One of the best Perl books out there,
This review is from: Perl Medic: Transforming Legacy Code: Maintaining Inherited Code (Paperback)A quote on the front cover of this book says "if you code in Perl then youneed to read this book". That's a pretty bold claim to make. It made methink of the hyperbole on covers of books that claim to teach you toprogram in Perl in just a few days. But this book is published by AddisonWesley, who are a well respected technical publisher of technical booksand the quote is from Adam Turoff who certainly knows what he's talkingabout when it comes to Perl programming. So in this case the claim isn'thyperbole. The book really is one that I want every Perl programmer toread.
Perl gets a lot of bad press from people who claim that it encouragespeople to write unreadable code. Whilst there's certainly a lot of verybad Perl code out there I think that's more a sign that it's used by a lotof people who don't know how to program than a reflection on the languageitself. And that's where this book comes in. It assumes that you arefamiliar with the syntax of Perl but that you've never really been shownhow to use it effectively. Which is a situation that many Perl programmersfind themselves in.
Perl Medic is actually targetted at people who have to maintain older Perlcode written by someone else, but I think that the information it containsis just as useful to anyone coding in Perl. Peter Scott has a lot ofexperience in writing Perl and in training other people to write Perl andthe distillation of that experience and knowledge into these 300-odd pagesmean that there are few Perl programmers who won't pick up somethinguseful from this book.
The main emphasis in the book is on increasing the maintainability ofcode. The techniques are wide-ranging. I particularly enjoyed the examplesof refactoring programs and the coverage of using modules from CPAN. Twoother very good sections are the one on antipatterns in chapter 4 and theone on cargo cult programming in chapter 6. Together these sections give aprogrammer a number of easy to recognise quick wins when improvingexisting code and a checklist of things not to do when writing newcode.
There are a couple of niggles. I've already mentioned that I think thebook has been slightly mis-targetted and that it should have been aimed atanyone writing Perl code. The other problem that I had was that the medicanalogy that runs through the book gets a bit strained at times. But theseare only minor and they shouldn't prevent you from adding this book toyour library.
In fact, all in all, the quote on the front cover is pretty accurate.