this post was submitted on 02 Oct 2023
1532 points (98.4% liked)

Programmer Humor

32512 readers
869 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
[–] magic_lobster_party@kbin.social 1 points 1 year ago (1 children)

According to who? If I have access to the source code, which I often do, I’d rather just read the code. Chances are that if documentation exists, it’s no longer up to date.

[–] auchschonda@feddit.de 2 points 1 year ago

Modularity. Part of it is defining a proper Interface for using the hidden complexity.

Exceptions are only one example. Functions can have behavior, inner states, prior calling requirements etc.. you cannot read from its mere prototype.

Do you really want everyone to read the inner code to learn that?

Chances are that if documentation exists, it’s no longer up to date.

This risk also applies to descriptive function names. They can be poor, wrong or outdated, too.