Every day I find myself relying on well documented code to work efficiently and productively. Good documentation helps me understand what a class or method does, what it was created for, or what that other developer was thinking when they wrote the module my code hinges on. Unfortunately, I have a history of preferring to read good documentation much more than I’ve preferred writing it, often because it seems too difficult and time consuming.
Lately however, I’ve been working on writing better documentation, and I’ve found it’s much easier than I expected. In this article, I’ll share some tips to help you document your own code more quickly and easily. We’ll look at what makes or breaks documentation, in which cases it is most vital, and what my process is for writing better docs.