Why Documentation Is Important

Over the past 2 weeks I've been rebuilding this site, having left it disused for nearly a year and a half. As I was building it, I decided to use a PHP templating engine that I wrote over 2 years ago. At the time I decided that I didn't need to document it as I'd remember how to use it and that it was straightforward enough.

I was wrong. I loaded it up and then had to look for one of the test projects I'd used it on to try and figure out how to use it. Even then, I still couldn't get it. I eventually managed it by looking through the code and by trial and error, but it shouldn't have been that way. I should have written documentation.

When writing a library or code snippet, examples and documentation are hugely important. If you're releasing it on a site like GitHub, then people are extremely unlikely to use it if there's no documentation or examples. If they can't figure out how to use it, most of the time they'll move on. Even if it's for your own use, at least write some useful examples. You'll thank yourself in the future.