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

174

u/lolitoxico Mar 22 '22

For all learners here, most of the time :

Readability > Performance > Short code.

Learners in school often brag about writing the same program than their classmates with less lines

And sometimes those learners get hired and still have this habit.

don't

56

u/[deleted] Mar 22 '22

something like

char (*(*x())[5])()

26

u/WhoTouchaMySpagoot Mar 22 '22

Is this for real? And if it is what does it do

10

u/brutexx Mar 23 '22

Guess we’ll never know

0

u/[deleted] Mar 23 '22

[deleted]

3

u/WhoTouchaMySpagoot Mar 23 '22

You’re the man

3

u/[deleted] Mar 23 '22

It declare x as function returning pointer to array 5 of pointer to function returning char

→ More replies (2)
→ More replies (1)
→ More replies (3)