Writing 2014-06-21

October 18th, 2014

hw20140621-01.jpg Read the rest of this entry »

Writing 2014-06-20

October 18th, 2014

hw20140620-01.jpg Read the rest of this entry »

Writing 2014-06-19

October 18th, 2014

hw20140619-01.jpg Read the rest of this entry »

Writing 2014-06-18

October 18th, 2014

hw20140618-01.jpg Read the rest of this entry »

PBP: 049 Lists

October 16th, 2014

This best practice is a simple suggestion: Put every raw list in parenthesis.  It’s good. Read the rest of this entry »

PBP: 048 Low-Precedence Operators

October 13th, 2014

The best practice is not to mix low and high precedence boolean operators.  This is both good and bad, but following the rule can save your sanity. Read the rest of this entry »

PBP: 047 Thin Commas

October 9th, 2014

The PBP cautions us not to use commas to separate and sequence statements.  I think this is good advice most of the time. Read the rest of this entry »

PBP: 046 Fat Commas

October 6th, 2014

Perl has a weird but cool operator, the “fat comma”, written as =>.  It’s a comma, but with a special property that means a bareword on the left side is allowed.  They’re often used for initializing hashes without having to quote every hash key.

The PBP suggests reserving => for items that go together, or, as it says “for pairs”.  Name => value pairs, mostly.  These things are related to each other and => makes that visible.  Read the rest of this entry »

PBP: 045 Barewords

October 2nd, 2014

Perl supports “barewords”, which are strings that just sit naked in your program.  If it isn’t parsable code, it’s a bareword.  The PBP says: Don’t.  I agree, as does ‘use strict’, which I always use. Read the rest of this entry »

PBP: 044 Heredoc Quoters

September 29th, 2014

The PBP suggests that all heredocs be explicitly and deliberately quoted.  When I first read this, I didn’t know you could do that!  It’s a great idea. Read the rest of this entry »