Jump to content

After looking in GitHub for the first 2 Perl episodes all I can say is, "PATRICK, COMMENT YOUR C...


G+_Darryl Medley
 Share

Recommended Posts

After looking in GitHub for the first 2 Perl episodes all I can say is, "PATRICK, COMMENT YOUR CODE, please." Remember this is for beginners who don't know the language. Shannon should be your reference. If she can't understand what's going on by looking at the code and comments then you should make adjustments accordingly. Thanks and I think you rock!

Link to comment
Share on other sites

There's absolutely nothing to comment in that code. It's just assignments and prints. The only thing at all complex is the string interpolation, which is what I assume the lesson will be about. This is a basic and important feature of the language itself. Comments should NOT describe language features, but should describe WHY the actions are being taken in the context of the program's function. These programs have no function other than demonstrating language features, so comments would be out of place.

Link to comment
Share on other sites

I don't like to see obvious things commented in production code either but in code meant for teaching, the new features being taught should be explained. For example, one of the files has the line:

$animal =~ s/cat/bunny/gi;

I had to search online to figure out what it does. If it simply had a comment:

# Globally replace all occurrences of "cat" with "bunny", case-insensitive

then the source code itself would have been instructive. Also, only some of the files in the GitHub were featured on the shows so there's a lot in the files that wasn't covered.

Link to comment
Share on other sites

 Share

×
×
  • Create New...