Software Engineering: How do programmers document their work?Code
- Variable names, method names, class names
- Check in comments
- Comments in code where appropriate
- Test naming when unit testing
If done adequately it should be enough for another developer to pick up the code.
Wikis and document generators are useful when you are developing complex/large libraries or back end systems that will be consumed by other developers but those come with a maintenance cost. You only document your public interfaces in these cases.
Depending on the project you may need to produce some formal documentation like architecture, functional design, technical design and API documents. These documents are usually produced in a tool appropriate for the job and if it is an established company you will probably have some templates or be given some templates by the client.
In addition, if you have to comply with standards like ISO 9000 then you may have to produce additional formal documentation as dictated by the standard.
User guides, manuals, tutorials, videos, etc are ideally produced by a technical writer. If there is no technical writer then this can become the responsibility of the programmers. This kind of documentation can take many forms. You can produce scenario walk-throughs which flows nicely from story driven or use case development if you are developing that way. You can produce a manual that details every screen. You can produce a wiki.
The kind of documentation produced depends largely on the requirements of clients, standards compliance and company policy. In my experience developers prefer not to document anything but instead produce quality self documenting code.