Ask HN: What is your personal motivation for documenting code?
1–9 of 9 posts
Re: Ask HN: What is your personal motivation for documenting code?
#2Re: Ask HN: What is your personal motivation for documenting code?
#3Rather than answering the same questions repeatedly, you can point other teammates to your doc.
It’s also not just a one time thing - Once the docs started gaining traction, you will see your teammates contributing. It takes time to get there, but it will get better over time, and it’s worth it.
Downside 1. Docs can get outdated - There will be times you need to go and refactor the docs. 2. You won’t get promoted because you wrote good docs.
Re: Ask HN: What is your personal motivation for documenting code?
#4Re: Ask HN: What is your personal motivation for documenting code?
#5Yeah, 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.
Re: Ask HN: What is your personal motivation for documenting code?
#6Re: Ask HN: What is your personal motivation for documenting code?
#7In large personal projects I try to be thorough in my documentation and naming conventions it helps me to write more durable software. When I am on my own time I prefer to keep my software as durable as possible because I am not being paid a salary to qualify all the extra time spent on regression, defects, and reviewing prior decisions. I would rather spend this personal time on design decisions instead, and central…
Re: Ask HN: What is your personal motivation for documenting code?
#8In large personal projects I try to be thorough in my documentation and naming conventions it helps me to write more durable software. When I am on my own time I prefer to keep my software as durable as possible because I am not being paid a salary to qualify all the extra time spent on regression, defects, and reviewing prior decisions. I would rather spend this personal time on design decisions instead, and central…
Could you share any examples of interactive documentation or tools to build interactive documentations? The only thing comes to my mind is Swagger / OpenAPI documentation pages from Spring that allows you to send the request.
* Similar input characteristics for a web-based interface.
* Documentation search function and/or auto-complete
Re: Ask HN: What is your personal motivation for documenting code?
#9Earlier quoted context omitted.
Could you share any examples of interactive documentation or tools to build interactive documentations? The only thing comes to my mind is Swagger / OpenAPI documentation pages from Spring that allows you to send the request.
* A terminal command just for displaying documentation on all other supported terminal commands by the application. Then more detailed documentation for each specific command with examples. Finally, a validation engine that allows per character validation of terminal input, as in a REPL. * Similar input characteristics for a web-based interface. * Documentation search function and/or auto-complete