From: Sam H. <sh...@ma...> - 2004-10-22 21:06:41
|
On Oct 22, 2004, at 4:30 PM, John Jones wrote: > Sam Hathaway wrote: > >> Fairly new on the wiki: >> >> http://devel.webwork.rochester.edu/twiki/bin/view/Webwork/ >> CodingStandards >> >> Please read, comment, disagree, etc. > > It looks pretty good. > I don't know if this would be a change, or just an addition, but I > would follow a different convention when commenting out a chunk of > code (as opposed to a single line). Then, I prefer commenting > everything with # in the first column (by everything, I include > previously commented lines and blank lines). It leaves the old > indentation in tact so it is easy to read what was there, and it is > easy to scan past to see where the commenting starts and ends. It is > also what emacs's comment-region does by default (which was written by > people who like to debate things like code formatting). I also preserve existing comment characters when commenting-out a block of code, but I indent the comment characters as far as the least-indented line of the block. For really long blocks, POD's "=for comment" construct can be useful. -sam |