The suggestion in this one was very simple, “Code in paragraphs.” Deceptively simple, because it means different things to different people. (more…)
Author Archive
PBP: 013 Chunking
Thursday, June 12th, 2014PBP: 012 Blocks
Monday, June 9th, 2014The Best Practices tell us never to place two statements on the same line.
In general, I agree with this, and find it a workable thing to do. There’s a few cases I forget, or decide not to. In most of them, it comes back to bite me later, and I wish I’d listened.
At the end of the day, I like whitespace, so yes, use a new line.
PBP: 011 Tabs
Thursday, June 5th, 2014The PBP suggests using spaces to indent all code lines, instead of hard tabs. The hard tab character should appear nowhere in a file.
I disagree with this, but have given up the argument and simply do it anyway. I feel it a minor loss, and not worth the confusion it causes from people who don’t understand hard tabs. (more…)
PBP: 010 Indendation
Monday, June 2nd, 2014The PBP suggests using four space indentation levels.
The book goes into many reasons for this. It suggests that I’m an “ancient coding master” because I learned with eight columns, and find that a perfectly acceptable number. Cue; GET OFF MY LAWN! =) (more…)
PBP: 009 Line Lengths
Thursday, May 29th, 2014The PBP suggests using a 78-column line length.
I’m good with this. I don’t feel the need to be a pedant about it, but I like the idea in general. (more…)
PBP: 008 Commas
Monday, May 26th, 2014The suggestion is to put a comma after every value in a list, even the last which doesn’t need it. (more…)
PBP: 007 Semicolons
Thursday, May 22nd, 2014The suggestion here is to place a semicolon after every statement. I agree with this, even if it isn’t technically needed. The only place I’ll skip it is if it is a function returning a constant value, and that’s all that is in the function, like this: (more…)
YAPC::NA or not?
Monday, May 19th, 2014PBP: 006 Operators
Monday, May 19th, 2014PBP says to put whitespace around binary operators. This, I entirely agree with. It also notes to keep unary operators together with their operand. This, too, I think is a good idea. (more…)
PBP: 005 Keys and Indices
Thursday, May 15th, 2014The PBP suggests putting whitespace between keys or indices and their brackets.
I find this a good suggestion, although I forget to do it sometimes. I do it for all complex statements, but forget for simple cases.
This is a place perltidy is a big help.