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
2
u/vi_sucks Mar 23 '22
Oh, so when the system goes down because someone replaced the local global cache with a pseudo cache hosted on a cloud or something, you don't think it would be useful to know that the original intention was for the cache to be useful during a network interruption?
Knowing what code does is less than a fraction of the difficulty of being a programming. Everyone can google some syntax to figure out what the code is doing. Understanding how it was built, why it was built that way, and how it came to be the way it is now is WAY more important. And that's substantially more difficult without comments. Even bad comments are better than no comments.
Hell I had a bug last week where there was a comment that just said "TODO ask senior engineer X". Shit comment, obviously. But since the bug had been in the system for 3 freaking years, it was way more helpful to be able to ask him directly "yo, is this supposed to do this?" And get an answer in minutes instead of starting a 3 day email volley with the users to figure out if the code that clearly did what the variable names said it did was actually supposed to be doing that when the users said it shouldn't.