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
-4
u/vi_sucks Mar 22 '22 edited Mar 23 '22
Comments don't lie.
What they do is capture the mind of the developer at a given point in time. Even if that intention is different from the current intended state of the code, that's still incredibly valuable information. First because it's not always true that the current intention is right; but also because when debugging, being able to understand WHY the dev was doing the things he was doing is just as important as figuring out what he did. Since what he did was probably wrong, so you need to backtrack to find out what he should have done.