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

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

1

u/WhoTouchaMySpagoot Mar 23 '22

I’ve only had one semester of c programming and after that never really much used it. Is this something you would use in real life?

2

u/[deleted] Mar 23 '22

Sure. I copied that code from one of the project at my workplace(I’m a C++ developer).

1

u/arnitdo Mar 23 '22

Look it up on cdecl

1

u/BeardSprite Mar 23 '22

I c char and I leave.

1

u/pekkalacd Mar 23 '22

Beautiful

1

u/KaoIo Mar 25 '22

I knew how to read this I promise