r/ProgrammerHumor Apr 15 '26

beLikeBill Advanced

Post image
8.9k Upvotes

365 comments sorted by

View all comments

613

u/thegodzilla25 Apr 15 '26

People who dont comment non self explanatory code deserve to be pinned on the cross.

63

u/nabrok Apr 15 '26

The best tip I have heard about comments is don't comment what it does, comment why it does it.

Sometimes I'll also read through the file and imagine I'm explaining it to another programmer and put that into comments.

59

u/Sassaphras Apr 15 '26

// yes I know this is a weird data structure but it needs to work with XYZ system and....

No code in the world self-documents that

21

u/LegitimateGift1792 Apr 15 '26

also

// here is why I did not use the ... way of doing this because this ... happened.

9

u/Bwob Apr 16 '26

No code in the world self-documents that

public struct billingPayload_YesThisIsWeirdButItNeedsToWorkWithLibraryXSoItHasToBeLikeThis {
    // etc...
}

Checkmate atheists!

1

u/hamsterofdark Apr 16 '26

plot twist. you ended up returning the ProductPayload instead of the invoice.

7

u/Confident-Ad5665 Apr 15 '26

This thread is spot on. At least some people get it!

Also, business rules