mjd-perl-pm on Wed, 15 May 2002 21:21:48 -0400 |
(This is the second announcement. If you've seen this before, please read the CHANGES section at the bottom.) This year I'll be doing three tutorials at the big Perl conference in San Diego. Two of them are new. As in previous years, I need to practice these before I go to San Diego, so I'll be giving both tutorials in Philadelphia next month. If you were to attend in San Diego, you would pay about $320. But you can come to my practice sessions for less than that. I will ask for a (voluntary) donation of $5 at each class to cover expenses. This request does not apply to Penn students, staff, or faculty. WHEN "Perl Program Repair Shop and Red Flags" will be held on Tuesday, 28 May. "Programming With Iterators and Generators" will be held on Wednesday, 29 May. Both tutorials will start at 6PM and end around 9:30 or 10:00 PM. They will be held in Heilmeier Hall (room 100, formerly Alumni Hall) in the Towne Building at University of Pennsylvania. (Directions below.) WHAT Perl Program Repair Shop and Red Flags This is not the same class as last year; it's a revised version with a substantial amount of new material. Be forewarned that some of the new material may be material that I did at last year's practice session and then cut out of the class before the conference, so there may be more overlap with last year's practice session than with what was actually presented at last year's conference. On the other hand, some of the repeated material is stuff I added in response to comments I got at last year's practice session, so maybe it all evens out. Here's the brochure description: PERL PROGRAM REPAIR SHOP AND RED FLAGS II You've probably been working too hard when you program, writing twenty lines of code when you only needed ten. But there is a better way, and I will show 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. I'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. (Send it to mjd-tpc6-repair2+@plover.com.) 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 The brochure description for 'Programming with Iterators and Generators': PROGRAMMING WITH ITERATORS AND GENERATORS Sometimes you'll write a function that takes too long to run because it produces too much useful information. A search function might locate ten thousand matches. A database query might return ten million records. What can you do? Perl provides a simple and familiar model for dealing with such problems: The filehandle! Instead of reading every file in one giant gulp, we can use filehandles to staunch the flow of information, trickling it into the program in manageable gulps. In this class, we'll see several important modules, such as File::Find and DBI, which use this approach. We'll go inside these modules and see how to implement filehandle-like data structures and objects ourselves. We'll see how to write functions that suspend themselves and then pick up later where they left off. We'll learn how to take long-running slow functions and convert them into speedy filehandle-like data generator objects. This fundamental technique is a mainstay of programmers in other languages, but isn't as well-known as it should be. You'll be amazed at how many difficult problems become simple when you unleash the power of filehandles. Introduction: Filehandles are Iterators Iterators are Objects Common Examples of Iterators: readdir, each, and DBI Homemade iterators Examples File tree scanning Permutations Genomic Sequence Generator Filehandle Iterators A Flat-File Database Searching Databases Backwards Random Number Generation Alternatives to Iterators Filters and Transforms: 'map' and 'grep' for iterators Recursively-Constructed Iterators The Semipredicate Problem Alternative Interfaces to Iterators An Extended Example: Web Spiders Converting slow recursive functions to iterators WHERE The Towne Building is located at 220 South 33rd Street in Philadelphia. For directions to the University, see http://www.upenn.edu/admissions/undergrad/visiting/directions.html Maps are available at http://www.seas.upenn.edu/staff/pem.html HOW Unlike in past years, we have essentially unlimited space, so reservations are not required; just show up. However, if you want to receive the class handout materials, and you probably do, you must email me in advance so that I know how many copies to bring. To receive handouts, please send an email message to mjd-perl-practice-2002+@plover.com Don't forget to say which class or classes you plan to attend. Please circulate this notice to any people or mailing lists that you think might want to see it. CHANGES SINCE LAST ANNOUNCEMENT 1. Many people have indicated interest to me, but don't understand that they will not receive printed handouts unless they email me at mjd-perl-practice-2002+@plover.com If you don't notify me at this address, I won't know to bring a handout for you, and you won't get one. (This is not a change, just a re-emphasis.) 2. If you would like to receive a reminder message a day or two before each class, please send a note to mjd-practice-reminder-subscribe@plover.com This mailing list will receive exactly two messages (one announcement for each class) and then I will destroy it forever. THANKS My profuse and heartfelt thanks to Chip Buchholtz and to the University of Pennsylvania School of Engineering and Applied Science for providing the space and AV equipment for these sessions. Mark-Jason Dominus mjd@plover.com **Majordomo list services provided by PANIX <URL:http://www.panix.com>** **To Unsubscribe, send "unsubscribe phl" to majordomo@lists.pm.org**
|
|