Skip to content

Comment on Ask HN: What is your personal motivation for documenting code?

Comments

There's a statement that good code is self-explanatory

Yeah, and that's a statement that has never been true except in trivial cases. Comments and documentation tell the "why", and comments provide additional clarity. Good code tells the "what".

The reason I document boils down to the old saw: be kind to the developer who has to touch the code in the future, particularly because that developer will probably be you.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.