O'Reilly Open Source Convention
oreilly.comO'Reilly Network
Conferences International Safari: Books Online


Arrow Home
Arrow Registration
Arrow Speakers
Arrow Keynotes
Arrow Tutorials
Arrow Sessions
Arrow At-a-Glance
Arrow BOFs
Arrow Events
Arrow Exhibitors
Arrow Sponsors
Arrow Hotel/Travel
Arrow Venue Map
Arrow See & Do
Arrow Press
Arrow Mail List
Kids World


From the Frontiers of Research to the Heart of the Enterprise
O'Reilly Open Source Convention
Sheraton San Diego Hotel and Marina
July 22-26, 2002 -- San Diego, CA


Apache

Tutorial

Perl Program Repair Shop and Red Flags
Mark-Jason Dominus, Plover Systems Co.

Track: Perl
Date: Tuesday, July 23
Time: 1:45pm - 5:15pm
Location: Grande Ballroom C

You've probably been working too hard when you program, writing twenty lines of code when you only needed ten. There is a better way, and this tutorial shows it to you. You'll learn how to improve your own code and the code of others, making it cleaner, more readable, more reusable, and more efficient, while at the same time making it 30-50% smaller. Smaller code contains fewer bugs and takes less time to maintain.

This class expands on 'Repair Shop I' but is independent of it, with little overlap. We'll see more red flags and more common errors. We’ll take a complete CGI tic-tac-toe application and reduce its code by half without removing any functionality or introducing any bugs. All code guaranteed authentic!

Participants are encouraged to submit their own code for anonymous review in the class. Class content varies depending on submissions, but is sure to include some of the following topics:

  • Structural vs. functional code
  • Elimination of structure
  • Boolean values
  • Programs that take two steps forward and one step back
  • Programs that are 10% backslashes
  • print print print print print
  • C-style 'for' loops
  • Loop counter variables
  • Array length variables
  • Unnecessary shell calls
  • How (and why) to let 'undef' be the special value
  • Confusion of internal and external representations of data
  • Tool use
  • Elimination of repeated code with higher-order functions
  • Learning to use a hammer
  • The 'swswsw' problem
  • Avoiding special cases
  • Using uniform data representations



oreilly.com Home | O'Reilly Bookstores | How to Order | O'Reilly Contacts
International | About O'Reilly | Affiliated Companies | Privacy Policy


© 2001, O'Reilly Media, Inc.
conf-webmaster@oreilly.com