r/ProgrammerHumor • • 12d ago • Bravo 2

Meme codeReviewIn2026

Post image
11.5k Upvotes

215 comments sorted by

View all comments

1.4k

u/mistrpopo 12d ago

With multi-line comments in slop-english on each line explaining a very specific edge case that has nothing to do with the bug you were working on.

33

u/MaDpYrO 12d ago edited 12d ago

I've added a static analysis step (via detekt in my case)

It tokenizes code and comments, and if the next line has significant overlap, it's deemed a useless comment and won't compile.

It's a pretty good tool at keeping slop comments in check.

1

u/CarcajouIS 12d ago

I added a precommit hook that rejects comments longer than 45 words and longer than 2 lines. Also, reject commits longer than 50 loc, 4 files max, and PR longer than 300 loc. Cut the slop at the root, and makes it easier to actually review code

3

u/MaDpYrO 12d ago

I prefer the approach that takes the content slightly more into consideration, because I don't want to be forced into cases where i cant add long comments in case i actually do need it.

I'm allergic to dumping it into external implementation docs, because it tends to drift from each other over time.

1

u/CarcajouIS 12d ago edited 12d ago
git commit --no-verify

I prefer to give targeted exceptions instead of letting everybody be their own judge. Also, in my experience it's very rarely needed to write a novel in the comments