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
28
u/Independent_Feed5651 Mar 22 '22 edited Mar 22 '22
This.
Code which is easy to understand and easy to change is the most important rule.
That doesn’t mean trying to “future proof” your code with additional tech debt. That doesn’t mean adding unnecessary comments. It means laying your code out in a way which allows a newcomer to understand what you’re doing almost instantly… via: layout (project files and class layout) and naming (files, classes, functions, variables).
Performance seems important.. but if you build an app in a semi-intelligent way, most performance gains can be had using simple data structures which can be inserted in later if necessary.
Also.. my pet peev: using design patterns which over-complicate and over abstract a simple app. If a majority of devs think your design pattern choice was unnecessary.. then it was.