PBP: 087 Extended Boilerplates

March 5th, 2015

The Best Practices make some suggestions on additional things to include in your POD, and suggest those items get listed in your general boilerplates to fill out.  Some of the suggestions are interesting, but I’m not sure they belong in every POD ever. Read the rest of this entry »

PBP: 086 Boilerplates

March 2nd, 2015

The Best Practices suggest creating boilerplates for POD documentation.  They helpfully provide some examples, and suggest differentiating between modules and applications.  I can’t argue with these ideas, particularly when trying to get a group to standardize on a set, but they are not as clear-cut wins in my mind as the book make them out to be. Read the rest of this entry »

Cross Platform Perl Talk Abstract

February 26th, 2015

I am submitting a talk to this year’s YAPC::NA.  It’s a talk I’ve given a couple of times, and has been well received.  The submission form wants a URL for the abstract, and this was the most straightforward way I could think of to put it up.  Feedback is welcome, even if the talk itself is not accepted. Read the rest of this entry »

PBP: 085 Types of Documentation

February 26th, 2015

This Practice starts off a new section, on documentation.  I think there’s at least one point in this chapter I disagree with Mr. Conway’s conclusions, but we’ll get there presently.  In general, I think he has valuable things to say, and the issues are worth thinking about and deciding on.

Documentation is important, and it’s something many of us are terrible at.

The first Practice he suggests is to be aware there are several kinds of documentation, and to separate the user documentation from the technical documentation. Read the rest of this entry »

PBP: 084 Loop Labels

February 23rd, 2015

The PBP suggests applying a label to each loop that is exited explicitly.  A simple request, but one I usually find vexing. Read the rest of this entry »

PBP: 083 Redoing

February 19th, 2015

This Practice is to encourage the use of a for loop instead of while plus a counter.  It reminds us of redo, a Perl feature I always forget which lets us do the loop over at this iterator.  If the only place the while loop does not increment is to try again, a redo fits perfectly.  If the loop has to do more complex changes to the iterator – back up, start over at zero, whatever – then you’ll sill need the more complex while+counter. Read the rest of this entry »

PBP: 082 Distributed Control

February 16th, 2015

Mr. Conway disagrees with some of my college professors again.  He says that it is not useful to abuse loop constructs just to consolidate control in a single location.  He is a hero for this stance. Read the rest of this entry »

PBP: 081 Linear Coding

February 12th, 2015

This suggestion seems oddly worded to me, although I’m not sure I can think of a better one.  The book says, “Reject as many iterations as possible, as early as possible.”  Luckily, it goes on to explain what this means, as that isn’t – at least to  me – terribly clear.  It winds up being an extension of “coding in paragraphs” and is more about how to organize your code than how to format it.  I think I agree with this and do it all the time, despite having had many college professors claim it is the root of all evil. Read the rest of this entry »

PBP: 080 do-while Loops

February 9th, 2015

This suggestion from the PBP is simple: Don’t use do … while loops.  The reasoning is good and readable alternatives are provided.  I wind up having no trouble with this suggestion, although I wasn’t as happy with it when I first read it. Read the rest of this entry »

PBP: 079 Tabular Ternaries

January 29th, 2015

Mr. Conway suggests that you can cascade uses of the ternary (?:) operator instead of an if-elsif-else chain.  He feels this is much more readable.  I strongly disagree. Read the rest of this entry »