r/learnprogramming • u/BullCityPicker • Mar 22 '22
Don't be that guy.
I just took over a project for a guy who left. Don't be this guy:
ZERO comments in your codebase.
One and two character variable names with no discernable pattern.
Comment characters used to comment out big chunks of code for no discernable reason.
No error checking.
Reliance on data files that you forgot to include or explain, going in to meaningless data frame names.
Making outrageous claims about how much your code improves things with zero baseline performance.
People like this think you're an idiot because you can't make their code work, and get to be all smug. We will track you down and find you. You will need references someday....oh my.
2.6k
Upvotes
7
u/wjsoul Mar 22 '22
I think what most people in this thread have already said, often times, its not beneficial to over comment. If you name your functions/methods and variables in a way such that it explains itself, you'll find that most of the time, you don't really need comments.
An example would be something like this:
Every one of these functions describes what they're supposed to do, you do not need any comments to explain them.