r/learnprogramming • • 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

427 comments sorted by

View all comments

Show parent comments

1

u/DoctorFuu Mar 23 '22

Ah yeah sure, first I succeed, and then there's nothing to worry about.

Thanks, that was super helpful.

1

u/AutomaticYak Mar 23 '22

The post was written in the context of a professional setting. The comment you replied to was in the context of a professional setting. I replied in the context of a professional setting. But, here it is for when you are not in a professional setting yet:

While learning, keep the original post in mind. Remember that in a professional setting, people will often need to work in your code later. So your goal is twofold: make it work, but also make it understandable for someone that doesn’t live in your brain space or even yourself six months down the line. To obtain feedback on code you’re learning on, if you don’t have anyone in your life that is working in programming, you could post in forums like this asking people if they would mind reviewing your code and to do you if they’ll help. It can be sketchy because you won’t know if the people answering you are good at what they do, but if you get a few responses that have some similar notes, you’re probably on the right path.

When you’re writing code and get stumped, being able to google your problem in a variety of ways will help you move forward. I Google, open the first three, look at them and decide if that’s actually what I want and maybe repeat with different wording.

But at the end of the day, if you keep in mind that your code is not likely to be a private island and you’re willing to consider different methods for what you’ve written, you should be ok.

Disclaimer: I am also in the learning phase of programming, about six weeks into a six month program. I have, however, worked in professional environments for 20+ years across various industries and roles. The rules of engagement are not terribly different from job to job.