G+_Darryl Medley Posted June 9, 2014 Share Posted June 9, 2014 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 More sharing options...
G+_Lee Crocker Posted June 10, 2014 Share Posted June 10, 2014 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 More sharing options...
G+_Darryl Medley Posted June 10, 2014 Author Share Posted June 10, 2014 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 More sharing options...
G+_Larry Weiss Posted June 11, 2014 Share Posted June 11, 2014 Darryl, I agree completely with you. This is tutorial code, not production code. Link to comment Share on other sites More sharing options...
G+_Joe C. Hecht Posted June 14, 2014 Share Posted June 14, 2014 That code was slop. Link to comment Share on other sites More sharing options...
Recommended Posts