Documenting Your Application

Documentation helps someone understand, run, and maintain an application. It also helps you return to your own code after time away.

Write useful comments

Explain intent, rules, or a decision that is not obvious from the code. Avoid repeating every statement in English. For important functions, describe their purpose, inputs, returned value, and side effects when those details are not clear from the name.

Update comments when behaviour changes. Remove abandoned code and outdated instructions so readers can identify the current implementation.

Include a useful README

  • Purpose: what the application does and who it is for.
  • Setup: files, tools, and exact steps needed to run it.
  • Usage: main controls and expected behaviour.
  • Data: supplied data, API dependencies, and what is stored locally.
  • Testing: checks performed and important results.
  • Limitations: known issues and unsupported behaviour.
  • Credits: sources and licences for assets or adapted material.

Do not include secret credentials. Distinguish working features from planned features. Check setup instructions from a fresh start rather than assuming the reader has your existing environment.

Development checklist

  • [ ] Required behaviour is working and tested.
  • [ ] Debugging followed reproduce → inspect → isolate → fix → retest.
  • [ ] Comments explain important intent and match the code.
  • [ ] Setup and usage instructions are complete.
  • [ ] Dependencies, credits, and limitations are documented.
  • [ ] Temporary debugging code and misleading instructions are removed.