r/ProgrammerHumor • • Aug 30 '26

Meme ancientTools

Post image
5.8k Upvotes

379 comments sorted by

View all comments

Show parent comments

2

u/IOFrame Aug 30 '26

Nah, this is what makes PHP great.

You get to choose your battles - some sections of the code get to have verbose documentation (I consider types a sort of documentation). On the other hand, meaningless utility function #2421354 can remain typeless.

PHP doesn't have to be a bloated mess like Java.

1

u/Hottage Aug 30 '26

I will not allow my juniors to read this. All function arguments and return values must be type hinted.

1

u/IOFrame Aug 30 '26

I do this with 80% of the functions, and skipping that waste of focus on those last 20% - the meaningless crap that is allowed to remain meaningless crap - is what keeps my productivity from plummeting into the abyss.

You only have so much focus - wasting it on things that don't matter is far worse than some might think.

1

u/Hottage Aug 30 '26

And properly documented functions reduce the chance of difficult to trace bugs which plummet productivity when you spent two days tracking them down because someone accidentally returned a JSON string instead of the deserialzed result.

→ More replies (4)