this post was submitted on 26 Nov 2023
699 points (89.1% liked)

Programmer Humor

19594 readers
859 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] CowsLookLikeMaps@sh.itjust.works 3 points 11 months ago* (last edited 11 months ago)

Or you're stuck within the confines of a horrible legacy system which the business will not allow you the time to refactor/rewrite but still want your code to be somewhat readable.

But in general, I agree with your argument. When writing from scratch or improving reasonably well designed code, often documentation could be replaced by breaking it up into another function or naming variable better. It's a bit of a code smell for violating the SRP. And yet there are times that documentation is needed for the "why". Things are nuanced I guess.