Extreme Programming in Perl

Peter Kitson

ISBN : -

Order a printed copy of this book from Amazon --UNAVAILABLE--

Cover Design - Extreme Programming in Perl

For your free electronic copy of this book please verify the numbers below. 

(We need to do this to make sure you're a person and not a malicious script)



Sample Chapter From Extreme Programming in Perl
     Copyright © Robert Nagler


Perl is a language for getting your job done.

– Larry Wall

Perl is a dynamic, object-oriented, interpreted, applications programming language with a full complement of security features, syntax-directed editors, debuggers, profilers and libraries. You can also write scripts in it. Perl lets you program any way you want, and XP helps you choose which way is the most effective for your project.

This chapter discusses how Perl shares similar values with XP, and how the Perl culture uses XP programming practices. Finally, we note why XP is needed to organize Perl’s exuberance.

3.1 Core Values

Perl and XP share a similar set of values. It’s rare for programming languages and methodologies to define values at all, so this basic fact puts Perl and XP in a unique category. We discussed XP’s values in Extreme Programming, so let’s compare Perl’s core values to XP’s:

• Laziness means you work hard to look for the simplest solution and
that you communicate efficiently. You don’t want to misunderstand
what someone said which might cause you to do more work than you
have to.
• Impatience encourages you to do the simplest thing that could possibly
work. You use the code to communicate your understanding of the
problem to the customer, because you don’t like sitting through long,
boring meetings.
• Hubris is courage born from the fear your code will be too complex
for others to understand. Hubris makes you strive for positive feedback
and to react quickly to negative feedback from your peers, the
computer, and the customer.

Larry Wall, Perl’s inventor, calls these values the “three great virtues of a programmer”.1 They tell us why Perl is the way it is: a language that grows organically to meet the demands of its customers.

3.2 Customer-Orientation

Perl and XP were invented in the trenches. Larry Wall had to produce reports for configuration management based on netnews.2 Kent Beck was tasked with saving the Chrysler Comprehensive Compensation project. Neither Perl nor XP were designed in the ivory towers of academia. Both XP and Perl were developed to solve a specific problem, and quickly so that Kent and Larry would keep their jobs.

It’s too early to tell with XP, but Perl has remained true to its roots. Perl continues to evolve based on feedback from its customers: the Perl community. Features are added or changed if enough people clamor for them.

This smorgasbord approach to programming languages is non-traditional, much like XP’s focus on people over process is non-traditional in the development methodology community. Perl gives you a wide variety of tools without constraining how you use them. For example, Perl is object-oriented but objects aren’t required to create modules or scripts. Perl programmers aren’t forced to encapsulate all their code in objects to solve every problem, especially when simpler alternatives exist.3 XP asks you to ignore what you aren’t going to need, and Perl lets you put this principle into action.