
Ask HN: How to document your work? how much is too much - random_kris
I&#x27;ve been working in a small office of mostly junior programmers. Until now we weren&#x27;t keeping any documentation apart from word documents on shared drive...  
I&#x27;ve decided to change that so I am slowly building a documentation system for every project I work on. When it gets big enough I&#x27;ll let others use &#x2F; edit it...  
My question is how much is too much? Should I keep links to relevant info for each project (url to VMs, password etc...) or should I document every page that I create for a project. 
For example: project A is a CRUD app, with 2 form fields, and 1 datatable.
Should I document every SQL query done inside application, every REST endpoint, every frontend component?  Should I keep them together (so each page gets 1 frontend, 1backend, 1database doc) or should I split stuff between frontend &#x2F; backend....<p>any good examples or design patterns that I could follow?
======
gshdg
Docs about code should go in code. That’s what comments and docblocks are.

Function signatures should be self-documenting. IMO API documentation is self-
defeating for a small team because of how quickly it falls out of date.

Docs about design should go into either READMEs or a documentation system.
Important trivia like URLs should too. (But don’t document every single URL
any more than you document every function signature. Just make sure people
know how to get to the staging system and the staff-only admin tools, etc.)
Ditto for how-to docs.

Secrets should go into a password manager or something like AWS Secrets
Manager.

------
lazyasciiart
Step 1: who is this documentation for? Non-technical users? Your colleagues
and yourself when you come back to update it?

Step 2: for technical docs, the closer the docs are to the code, the more
/likely/ it is to stay uptodate. What do you mean by "building a documentation
system"?

~~~
random_kris
I have a folder with markdown files where lots of stuff is documentated -> I
call this documentation system. Stuff is accessed via search or menu (im using
mkdocs) Documentation is for me and colleagues (looking up passwords, various
links, urls, tutorials etc..)

------
daleholborow
For anything rest API, I highly recommend you include Swagger/OpenAPI docs
within your endpoint code, and don't bother to duplicate any of that material
externally.

