logoalt Hacker News

kalaksitoday at 7:25 AM2 repliesview on HN

Confusing code is one thing, but projects with more complex requirements or edge cases benefit from additional comments and documentation. Not everything is easily inferred from code or can be easily found in a large codebase. You can also describe e.g. chosen tradeoffs.


Replies

seba_dos1today at 1:45 PM

Exactly, that's why a good project will use comments sparingly and have them only where they matter to actually meaningfully augment the code. The rest is noise.

habinerotoday at 7:46 AM

There's no way around just learning the codebase. I have never seen code documentation that was complete or correct, let alone both.

show 2 replies