this post was submitted on 24 Sep 2024
484 points (98.8% liked)

Programmer Humor

32138 readers
988 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
[–] kautau 15 points 5 days ago (2 children)

As long as "cleaner than you found it" also includes "better documented." I've worked with people who think that "the code should speak for itself" to the point that they will make biased decisions with no explanation or documentation and then if you ask them about it after their response is "look at the PR for how that decision was made." I'm not going to git blame and find your PR to find an outcome from an argument between two people that after scrolling just says "sometimes the API returns a JSON string here instead of nested JSON so we have this conditional" when that could be a comment

[–] [email protected] 3 points 3 days ago* (last edited 2 days ago)

In particular business logic that's not obvious should be documented in comments.

// Typically 1 = 1, but on March accounting wants that 1 = 2. This function makes that mapping.

[–] [email protected] 6 points 4 days ago (2 children)

Not to mention that sometimes, the code that's supposed to "speak for itself" doesn't do the things that they think it would do.

[–] [email protected] 3 points 4 days ago

The code is speaking to me, but it's just word salad.

[–] kautau 4 points 4 days ago

Right. Given the option I will always choose to work with a decent programmer who can communicate well and documents their code, over a very strong programmer that doesn’t think they should waste time with documentation