| Great articles (there is a part 2 here:
https://blog.stoplight.io/writing-documentation-when-you-are... ) The article is about API documentation, but the points apply to every documentation. I think however that a few things are missing in the articles: 1- an OVERVIEW/INTENT page/paragraph. This is THE thing that is missing in almost every -if not all- documentation I've ever read. An example that I always use to illustrate the point: the "File" API. In EVERY documentation I've ever seen, the usage of each function/method is detailled, but NOT why some function must be used before others (opening a file is NOT an obvious concept); the concepts (what is a file?), the workflow are NEVER explained. And Files are basic stuff, what about GUIs? Ever used a big GUI toolset? It's miserable! They never include the high level stuff, you have to dig a lot and if you are lucky, maybe you'll find a blog womewhere that gives a few insights in the mind of the creators. IF you are lucky. So you end up using the wrong type of widget or function (because they look alike) until you crash & burn and realize that it was the wrong choice for your purpose, because NOTHING is explained, you have to discover everything at your cost. 2- graphics/workflow charts This is related to my first point. When I write documentation I include -at least- one high level graphic that shows how the various parts of the system interact, sometimes a flowchart or a Finite-state diagram (when a FSM is used, obviously). ----- When I give a module to my coworkers (be they testers or users of my API), I give them that additional documentation which makes it MUCH easier to understand and test/use. What I find stunning is that I'm always the ONLY ONE to do so! At most my coworkers will write _some_ documentation to explain a few difficult points, but it will mostly be comments, not documentation for an user of their API/module. And if you point it out, the reaction will range from "I've no interest in that" to "it's not necessary, the code talks for itself"... To them, the -automatically generated- JavaDoc comments are "enough", which is total B.S. The most infuriating is that all this -undocumented- code is always the result of a HUGE amount of work and dedication. But it is invariably cruely hobbled by that missing step: helping the users use it properly. I see it everyday in Free/Open source tools, and I've seen it in every project in the companies I've worked with (except mine of course)... So you spend lots of time trying to understand how the stupid thing is supposed to work instead of doing your real work. There is a LONG way before the importance of documentation (and comments) is accepted as what it is: VITAL. Unfortunately, as for testing and security, management not only don't encourage the practice, but they often discourage it (poo-pooing -or worse- such concerns). |
Also, I believe a problem here is that on large organizations and codebases many programmers don't really understand themselves the relationships/interactions between systems, or people setting the standards think overviews are hard to standardize, or they think other people think documentation is a pain to write so they try to minimize the work needed to get it "right".
EDIT: came up with a better way to put it: documentation should deal with what a system does, why and where, then how it achieves so in a broad sense, and finally deal with the implementation details (which is the only part we are kinda handling nowadays, as you explained).