this post was submitted on 08 Dec 2023
623 points (96.4% liked)

Programmer Humor

32482 readers
467 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 54 points 11 months ago (18 children)

And no one on his team ever understood his code.

Sometimes being declarative is better than being "smart"

[–] [email protected] 5 points 11 months ago* (last edited 11 months ago) (4 children)

This is why I usually don't comment on stuff like this in PRs. If it's readable and easy to understand it doesn't need more abstractions. Even if it's less code. What's it save like a few bytes? That's not as useful as the whole team instantly knowing how the code works when they see it lol

I will say though if a jr dev came upon the last code they would just look it up and learn something so that's a total valid path too. Just depends on your codebase and how your team works. I think it usually ends up being a mix with larger teams.

[–] [email protected] 0 points 11 months ago

Yeah, I think there is a tipping point between terse and magic. I might grimace a little at the first one, have no comment on the middle two, and definitely comment on the last one. Wrote code like the person troubleshooting it is on-call, mildly hung over, and it's 3am.

load more comments (3 replies)
load more comments (16 replies)