This practice is simple, and probably covers a lot of the places I appear to have been waffling between one view and another. The book says to comment anything that puzzled or tricked you. Pretty simple? The questionable part is that everyone will find different issues tricky. Read the rest of this entry »
PBP: 095 Defensive Documentation
April 9th, 2015PBP: 094 Elucidating Documentation
April 6th, 2015The Best Practice discussed here is to use short comments at the end of the line to provide extra detail and make possibly obscure code a little clearer. I think this can be very useful, but I’m not sure it plays well with a 78 character margin as suggested elsewhere, especially if the function involved is complex and you’re more than a couple of tab stops from the margin. Read the rest of this entry »
PBP: 093 Algorithmic Documentation
March 26th, 2015The Best Practices suggest using a full-line comment before a paragraph of code to explain the algorithm. This is, in my experience, good advice, and what comments should be used for. Read the rest of this entry »
PBP: 092 Comments
March 23rd, 2015The Best Practices suggest creating a template for block comments that are suitable for your team. On the whole the reasons given in the book are good ones and it sounds like a great idea, but I find it harder to implement in practice. Read the rest of this entry »
PBP: 091 Technical Documentation
March 19th, 2015The Best Practices suggest breaking your documentation apart by audience. Different audiences need different documentation. It then goes on to suggest where this different documentation belongs… and that’s why my opinion diverges. Read the rest of this entry »
PBP: 090 Position
March 16th, 2015The PBP suggests keeping all the POD at the end of the file. Considering I feel it should be with the code, I naturally disagree. Read the rest of this entry »
PBP: 089 Contiguity
March 12th, 2015The PBP likes documentation in POD, in your source files, but wants it all in one chunk, separated from the code it documents. This is one of the suggestions in the PBP I not only disagree with, I find damaging. I feel strongly that the documentation goes as close to the code as possible, to minimize the distance between them and make the tendency to avoid updating them harder to forget. Read the rest of this entry »
PBP: 088 Location
March 9th, 2015The Best Practices suggest putting your documentation in your source files, and provides some reasons. This is okay. Read the rest of this entry »
PBP: 087 Extended Boilerplates
March 5th, 2015The 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, 2015The 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 »