DEV Community

Discussion on: What Is The Worst Comment In Your Code?

Collapse
 
dougmckechie profile image
Douglas McKechie

Years ago I remember being humored by the only comment in a very long Perl script; there were hundreds of lines with no comments at all, and about 2/3 of the way down the file there was a command which output some spaces to the screen with a comment on the end of the line "spaces".

print("        ");    // Spaces
Enter fullscreen mode Exit fullscreen mode

I believe my reaction was something like: really out of all the things you write a comment for it is the most obvious thing in the whole file? I showed some of my colleagues at the time and we all had a good laugh about it.