r/AskProgramming • u/[deleted] • Oct 14 '20
Programmers, who write documentation, why make it soo abstract with little to none explanation and examples? Do you like people suffering?
65
Upvotes
r/AskProgramming • u/[deleted] • Oct 14 '20
1
u/JMurph2015 Oct 15 '20
Docs written by engineers working on that project generally don't account enough for the fact that in the back of their head, they understand what is going on and how it all fits together, but your users may not. So you could write a doc that describes what something does, but without the context it makes no sense.
Another issue is that sometimes the interfaces you're talking about are extremely abstract and general, which means that while yes there are some specific use cases that you may see frequently, it just doesn't do the interface justice to pigeonhole it like that. Imagine (a toy example to be clear) you were writing docs for a generalized sorting algorithm which relied on external comparison functions to do all of the sorting (as is the case in most languages standard libraries). Now 90% of the time people are going to use that interface to sort array-lists of strings. However documenting it in those terms would be entirely underselling the functionality of that interface because it's (hypothetically) actually capable of sorting arbitrary containers of arbitrary types.