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

0

u/[deleted] Mar 22 '22

[deleted]

5

u/daneelthesane Mar 22 '22

I agree. I am reading "self-documenting code" right now that doesn't tell me a goddamn thing unless you are already sharing brains with the guy who wrote it. Sure, a lot of code can be self-documenting, and that is an ideal, I guess, but there are also people who love to make things as obscure as possible, as short as possible, etc. Picking the right names for variables and methods doesn't help if the syntax doesn't tell you what is going on, or you don't know why.

1

u/DaredewilSK Mar 22 '22

Well, everyone works differently. I don't think I ever needed comments in our codebase, but maybe it's more of an exception.