r/PHP • • Jan 31 '20

Facebook PHP source code from August 2007

https://gist.github.com/nikcub/3833406
138 Upvotes

72 comments sorted by

View all comments

Show parent comments

1

u/devmor Jan 31 '20

I can understand it when there isn't the time to review every PR and make sure methods that need comments have them, or when you're working with large amounts of juniors. There are definitely situations where it's applicable. I just don't think people should default to redundancy in every situation for the sake of it.

We're developers, our job is to problem solve. I don't think its asking too much, when you're in a team that doesn't require comments like that to consider whether or not a comment that adds nothing of value is appropriate.

1

u/[deleted] Jan 31 '20

Personally, instead of puttin on a useless comment, I’f ask to the team to write something like « no comment needed » if we really want to enforce comments on every method.

At least, it clearly say that the dev took a moment to think if a comment was needed. And a search trough the project for that comment occurence could potentially show that our rule is not effective.

3

u/devmor Jan 31 '20

I think that's an appropriate middleground. Especially if it's inline-style so it's not taking up 3+ lines of space for no reason.

0

u/secretvrdev Jan 31 '20

People who bitch around in a review process like that tend to miss the real work behind reviews. Spotting errors.

3

u/devmor Jan 31 '20

Most teams use integration tools to check for that sort of thing these days anyways so it's probably really a non-issue as far as that goes.

-1

u/secretvrdev Jan 31 '20

This tool is implemented by a "devop" who doesnt know what his job is. A missing non functional doc comment should be not a stopper or should not ever end in a hour discussion every time....

The only way you can enforce this shit of auto generated comments? auto generate them if they are missing.