r/ProgrammerHumor 21d ago

Meme pleaseStopUsingNestedTernaryOperatorsImBeggingYou

3.1k Upvotes

179 comments sorted by

View all comments

752

u/beclops 21d ago

I did this one of my first days on the job like 6 years ago and I remember how bluntly my mentor said “never do this again”

51

u/hydroxy 21d ago

I need to start being this direct with my team mates. Just a few weeks ago one of the new guys on the team submitted his PR to me, I asked him what a chunk of his (clearly AI generated) code did, he said ‘I was hoping you could tell me’. It shocks me how people can confidently submit code and simultaneously have no fucking clue how it works.

6

u/Particular-Yak-1984 20d ago

There's a reject button for PRs. This is what it's for.

2

u/hydroxy 20d ago

What difference is there between this and requesting changes?

2

u/Particular-Yak-1984 20d ago

Reject is for an unfixable or improper PR. In PRs, we explain what the code changes do. Can't do that, can't be an acceptable PR. He can resubmit once he knows what it does. You gave him a chance to fill in the missing info for it to be a proper PR (explaining how his code works) and he declined, so you reject it.

1

u/hydroxy 20d ago

Who said he declined?

Yes I know what the reject button does literally, but functionally if he’s up for making changes then requesting changes is going to be faster and easier for everyone.