Answers.Body: <p>As I've heard it put: &quot;Unix documentation is written in such a way that, when you finally figure it out for yourself, you can never say that it didn't say so in the first pace&quot;.</p>
  <p>This points to the fact that reading documentation is a different process from reading ordinary prose. For documentation you have to engage with the prose:</p>
  <ol>
  <li><p>you read it</p>
  </li>
  <li><p>you think &quot;that can never be true&quot;</p>
  </li>
  <li><p>you try to think of a counter example</p>
  </li>
  <li><p>you read the documentation again to see why your example is wrong,</p>
  </li>
  <li><p>6 7 8 rinse and repeat.</p>
  </li>
  </ol>
  <p>This &quot;struggle against the documentation&quot; is frustrating and tiresome. Many people give up pretty early in the game.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-05T02:13:58.693Z
Answers.LastActivityDate: 2022-04-07T23:05:18.520Z
Answers.LastEditDate: 2022-04-07T23:05:18.520Z
Answers.UserDisplayName: Victor Eijkhout
Answers.Body: <p>In some cases, I suspect the problem may be that the student doesn't really <em>want</em> to understand, they want to <em>do</em> (e.g. complete the lab exercise or coursework).  Unfortunately these days there is an awful lot of code examples easily available on-line in tutorials and e.g. stack exchange, and it is often easier to search for existing code that is similar to your problem and cut-and-paste to get your program working.  Understanding the programming language and the documentation is often hard work as a learner and there isn't an immediate benefit from making that effort (but very large benefits much later on).  I suspect that I wasn't very good with deferred rewards when I was a student, but I had the advantage of learning to program before the WWW existed, so I didn't have the option.  When I am teaching I try to emphasise the benefits of understanding what you are doing, rather than just trying to get it to work, but to some extent I think this is a life-skill that can only really be learned by experience.</p>
  <p>To answer the question more directly, the thing that may not be obvious to the student is <em>why</em> being able read the documentation is an important skill worth learning, despite not being the fastest solution to the problem immediately facing them.</p>
  <p>I dread to think what effect <a href="https://openai.com/blog/openai-codex/" rel="nofollow noreferrer">Codex</a> and <a href="https://copilot.github.com/" rel="nofollow noreferrer">CoPilot</a> will have on learning to program.  I'm not against the use of tools in programming, far from it, but tools for experts can get in the way of learning the fundamentals.  I'd be glad to hear of any work that has been done on this!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:04:17.583Z
Answers.Text: Right, if someone is "trying to solve a programming problem" that doesn't make them a programmer any more than me trying to solve a medical problem makes me a doctor. If someone wants to deeply understand the system they are working with and why it is that way, I suppose that makes them a software engineer. Students eventually go either the first way and to another major, or towards a strong capacity in programming. If you want to understand something, obstacles are just part of the process. One time I bought a second reference book to solve a problem, and discovered an error in the first.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:14:05.623Z
Answers.Text: Part of the problem is that these days there are a lot of frameworks and libraries that make it easy to "do" some quite impressive things without having a deep understanding of what you are doing.  Students aren't necessarily aware that there is more to programming than that (and a deeper level of understanding is possible).  Also a *lot* of education (perhaps just in the U.K.) is goal-oriented rather than understanding-oriented, so I don't think this is a flaw in the students, but a product of the educational environment?
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:20:50.343Z
Answers.Text: Yes, I think it's better when doing impressive things requires deep understanding. Making deep things reachable with a shallow understanding and a few syntax details does not make them safe to build large systems on. I'm not sure how this will all work out. "AI will save our behinds", is my usual answer. I hope some idiot can whip together a sufficiently smart AI soon.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:38:28.953Z
Answers.Text: I think AI is going to make things a lot worse as it will take the work that would normally be done by junior programmers, which raises the question of where the senior programmers will come from later on?  20 years ago you could make money setting up basic commercial websites, but wix & wordpress etc. have put an end to a lot of that.  I suspect CoPilot will eventually do the same for low-end programming.  I don't think that is a good thing.
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T14:59:49.177Z
Answers.Text: I was thinking larger and long-term: humans would make beer, create art and music, and do standup comedy, and AI would run the planet.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T15:02:01.377Z
Answers.Text: Bit of a pity, programming can be good fun! ;o)
Answers.UserDisplayName: Dikran Marsupial
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T08:59:43.140Z
Answers.LastActivityDate: 2022-04-02T09:17:48.860Z
Answers.LastEditDate: 2022-04-02T09:17:48.860Z
Answers.UserDisplayName: Dikran Marsupial
Answers.Body: <p>I have a partial answer, perhaps, as to why it is so hard for novices to learn from documentation. But the answer isn't universal and doesn't apply to all products/languages.</p>
  <p>There are some companies (I remember Sun Microsystems) that employ people to write documentation who are expert writers rather than expert geeks. They need to be able to talk to geeks and to write in such a way that the uber geeks agree is accurate, but their focus was on reader understanding. A friend of mine once did this for Sun.</p>
  <p>But there are other places in which the geeks themselves write the docs. There might be a lot of reasons for this and it might require the backing of a large company to do otherwise, but such documentation can fail users.</p>
  <p>I recently reviewed the documentation and tutorials for a product in development. The docs were written by the same folks that did the product. The problem was that in order to understand the documentation you also needed to already deeply understand the problem the product was trying to solve (not a novice attribute) as well as the basic overall UI that the product used. This was probably comprehensible to someone already deeply immersed in the problem space as well as having a lot of experience with similar UI structures.</p>
  <p>One of the reasons, perhaps, that you can get away with it is that you already have the background of the entire platform structure that novices don't have. So it is all &quot;Greek&quot; to them. (&quot;Geek&quot; to them??).</p>
  <p>A solution, though expensive, is to have different documentation for different experience levels. This is why textbooks exist, actually, and why clear explanation is so valued there. Professional level books are pretty much closed to novices before they go through the apprenticeship needed to grok it properly. And, I remember that after going through the three semester Calculus sequence in college, I then went through several semesters of Advanced Calculus and Analysis, where it became clearer.</p>
  <p>Few shortcuts to real learning, I'm afraid.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:30:08.527Z
Answers.Text: Apprenticeship... Wait, I've said that already. And it's not a shortcut. But it might be the shortest path in the NP hard problem of learning a profession. Not a new idea at all. We just have to care enough about people to help them flourish. But that's not really profitable in the short run. Long run.... The only answer.
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-10T11:07:15.957Z
Answers.Text: There is a reason why *technical writing* is a separate profession and you can even get advanced degrees in it. It is sufficiently different from both "technical" and "writing" in general.
Answers.UserDisplayName: Jörg W Mittag
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-01T13:02:46.350Z
Answers.LastActivityDate: 2022-04-01T13:02:46.350Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>I don't believe there is anything special to reading documentation. As most things programming related, it's a bit of basic knowledge and a lot of experience. You obviously need a basic understanding of the language (or whatever the docu is about) and the &quot;grammar&quot; which is used for syntax, optional command line or function arguments and the like. But at my Uni this (along with more extensive formal grammar) was covered in the first semester.</p>
  <p>To put it another way: If I completed my 5 year CS degree without ever looking at documentation I wouldn't suddenly go &quot;I'm not prepared for this&quot; when handed my first manual.</p>
  <p>If I had to point out something it would probably be</p>
  <p>a) Documentation (apart from the most common languages) in my experiance is rated on a scale ranging from &quot;patchy&quot; to &quot;non-existant&quot;.<br />
  The people who wrote it are usually experts on the subject and rather spend their time being experts than write documentation for other people. So a lot of things get left out because either they are obvious to them (and not you) or they just don't have the time or feel like it. So reading documentation sometimes can be a bit of a guessing game. With more experience it get's easier to fill in the gaps.</p>
  <p>b) Even if patchy, documentation sometimes can be massive and feel intimidating. E.g. the reference manual for one of the smaller microcontrollers I'm using, has about 1600 pages. And that's only hardware. The programming manual is another 2000 pages. So you have to know exactly what you problem is and where to look.</p>
  <p>So if people are &quot;lost&quot; when reading documentation, I don't think it's because the are missing the vital &quot;magic documentation reading skill&quot; but it's rather a symptom of deeper issues with the problem or programming in general.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-05T23:37:02.503Z
Answers.Text: "The people who wrote it are usually experts on the subject and rather spend their time being experts than write documentation for other people" -- most "true" experts I know are all about documenting their knowledge, not only for their future self reference, but usually because they genuinely care about a library or product's longevity (reducing the [bus factor](https://en.wikipedia.org/wiki/Bus_factor)) and simply sharing knowledge about a thing they're passionate about.
Answers.UserDisplayName: ggorlen
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-01T13:13:41.640Z
Answers.LastActivityDate: 2022-04-01T13:13:41.640Z
Answers.UserDisplayName: Max
Answers.Body: <p>I think that both of the posters so far (Fureesh and Buffy) have great insights.  I would only add one more piece I've observed from my own students.  It starts with the observation that most people don't particularly enjoy reading dry text, and will give up easily if it becomes impenetrable.</p>
  <p>I can't find it now, but I recall some literacy studies that suggest that kids start to give up on text if more than one in ten sentences are too hard.  Since I can't find it, take the number ten with a giant grain of salt.  What's important here is that there was <strong>a</strong> number, and that it was possible to characterize motivation as a function of the percentage of non-understood items within the overall text.  What's also important is that adults aren't truly so different from kids.</p>
  <p>So, take a look at Oracle's documentation for <a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html" rel="nofollow noreferrer">Java's String class</a>.  It is, by my estimate, pretty excellent documentation.  It has nice text at the top that outlines the basics of the structure, a list of method calls, and then a write-up of each call.  It's very helpful, and I've referred to it many times over the course of my career.</p>
  <p>But now view it from the perspective of a real beginner who is just learning about Strings (think about how <em>beginner</em> that is), and the entire document becomes very different.  We start with a bunch of totally impenetrable header stuff, like implemented interfaces.</p>
  <p>When we get to a text introduction, we start with:</p>
  <blockquote>
  <p>&quot;The <code>String</code> class represents character strings.&quot;  All string literals in Java programs, such as <code>&quot;abc&quot;</code>, are implemented as instances of this class.</p>
  </blockquote>
  <p>So far ,that might be okay.  For the beginner, character isn't a fully fleshed-out concept, but... we might be able to deal with this.  And the next sentence is possibly excellent:</p>
  <blockquote>
  <p>All string literals in Java programs, such as <code>&quot;abc&quot;</code>, are implemented as instances of this class.</p>
  </blockquote>
  <p>Though, again, there are some large concepts that you need to understand before it makes <em>sense</em>.  But it reads a bit like <code>&quot;abc&quot;</code> is an example of String, and that's a comprehensible idea.</p>
  <p>Then, immediately:</p>
  <blockquote>
  <p>Strings are constant; their values cannot be changed after they are created.</p>
  </blockquote>
  <p>Wait, what?</p>
  <blockquote>
  <p>String buffers support mutable strings.</p>
  </blockquote>
  <p>We're very lost now.  Is a string buffer a string?  Is that a reference to something else?  What is mutable, exactly?</p>
  <blockquote>
  <p>Because String objects are immutable they can be shared. For example:</p>
  <pre><code>    String str = &quot;abc&quot;;
  </code></pre>
  <p>is equivalent to:</p>
  <pre><code>    char data[] = {'a', 'b', 'c'};
      String str = new String(data);
  </code></pre>
  </blockquote>
  <p>Well, that's confusing, not least because the <em>example</em> doesn't appear to match with the sentence leading up to it.  But, for the beginner, we are now looking at a series of glyphs.  Just the line <code>char data[] = {'a', 'b', 'c'};</code> has many, many concepts locked into it.  There is precious little chance of someone just learning about strings making heads or tails of that code.</p>
  <p>It honestly doesn't get much better as you head into the rest of the document.  For the beginner, the documentation is not at all helpful without a teacher to walk through it with them.</p>
  <p>I assume that most people had a similar experience to me with <code>man</code> pages, and couldn't make sense of them until someone broke it down first.  Maybe other people didn't have those sorts of troubles, but I'm pretty sure that the norm is for people to find them very confusing at first.</p>
  <p>Anyway, consider, then, what is likely the early experience that learners will have with documentation.  It wasn't useful!  The early lesson, it seems, is that documentation is dense, full of needless foreign concepts, and not that helpful.</p>
  <p>The students will nevertheless go off and find other information that is more helpful.  After all, they still need to do whatever it is that they need to do.  Where do they go?  A friend, a YouTube tutorial, an article, whatever.</p>
  <p>It is perfectly natural, then, that as they develop, they continue to (a) go to the kinds of resources that they have found helpful in the past, and (b) therefore don't develop their skills in documentation comprehension.</p>
  <p>I think, then, that something like what you propose, with explicit guidance about how to deal with documentation for people at a more professional stage, could be very useful indeed, since at that point, they are more ready to deal with what they'll find there.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T00:57:15.013Z
Answers.Text: This seems like a great list of things to keep in mind for *writing* documentation, but I don't think it gets me closer to my goal.
Answers.UserDisplayName: Karl Knechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T04:19:00.667Z
Answers.Text: @KarlKnechtel I'm sorry to hear that.  I'll give you a sense of where this would fit into my thinking, though, in case that helps you.  When I design lessons for catch-up skills, where students went wrong is often my starting point, and I devise my lessons from there towards my goals.  I don't believe that young professionals would have much problem with documentation; I believe that they have learned from early on that it's not useful, and my answer outlines roughly how I think that happened.  The teaching then, would be oriented towards breaking down those specific problems.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T04:21:02.093Z
Answers.Text: @KarlKnechtel The other result, if my outline is correct, is that very early students are actually *right* not to go to the documentation.  It will not help them without additional hand-holding.  They need at least a sprinkling of background and maturity in the field to begin to make good use of those resources.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T10:55:01.713Z
Answers.Text: I think the issue I have is that it *won't* generally be useful for the new student unless you artificially make it so, but the skill needs to be learned *in advance* for when it will be useful later as a professional. So my current thinking (oriented towards book-writing) is that it needs to be an explicit topic, introduced only at the right time.
Answers.UserDisplayName: Karl Knechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T17:32:47.903Z
Answers.Text: @KarlKnechtel Yes, I think that's accurate.  In my 4-year program, we introduce documentation at multiple passes over the first three years.  The first pass is essentially pre-digested, with a short excerpt that contains only the five methods that we are talking about at that moment, and we discuss how to interpret what we are looking at.  At the next exposure, a few months later, we do it again, but it's easier.  From then on we provide api-style method lists...
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T17:34:11.580Z
Answers.Text: ... with confidence that the students can read them.  Later, we get into full (simple) API documents, and we have guided hunting expeditions.  The guidance diminishes over time as they get used to it.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T17:35:18.767Z
Answers.Text: For the whole next year, we will point them towards object documents, and eventually towards packages with many objects, and only support as needed.  In the following year we start again with API documents in scheme instead of Java.
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T17:36:48.447Z
Answers.Text: By the time our kids get to their fourth year, they are pretty capable of looking through documentation.  But, of course, some of that is because of this instruction, and some of it is just because by the fourth year, they also have a generally rich background, so they understand a lot in general by then
Answers.UserDisplayName: Ben I.
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-07T10:15:00.360Z
Answers.Text: I am trying to guess how many long sentences are in *Atlas Shrugged* :-) My take on what I have seen of the evolution of languages and tools over the last 30 years is that there has been an exponential explosion of layers and possibilities, such that starting off now to learn the fundamentals is probably out of reach for most humans. It was always arcane, but usually with a pretty restricted list of separate areas to learn. Compare today's environment with *The C Programming Language* and a text editor and compiler commands. Why exactly did we go in this direction? Where is it leading?
Answers.UserDisplayName: Scott Rowe
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-01T15:15:23.583Z
Answers.LastActivityDate: 2022-04-01T15:15:23.583Z
Answers.UserDisplayName: Ben I.
Answers.Body: <p>Documentation is to (e.g.) a stack overflow answer as a dictionary is to a textbook of english. (Or, put another way - by the logic of this question, english language SE would/should have very few questions.) Documentation has certain rules, yes, and these are mainly necessary because it is so compressed from a standard explanation. Instead of saying &quot;The function takes in x, which is an integer which tells the function what power to raise the number to, as well as y, which is an optional boolean (i.e. true/false value) that ...&quot; this all boils down to five or six words of documentation.</p>
  <p>Worse, this compression is accentuated by the use of jargon that a newer user likely isn't familiar with (e.g., 'bool' short for 'boolean' short for 'a value that can be true or false' - and this is all very abstract! if you haven't ever seen a use for a boolean value in programming, you'd sure have some questions at this). Also, much like a dictionary, the examples are brief, often unexplained, and at the bottom of the page.</p>
  <p>And further, using documentation requires that you know <em>what to search in the documentation</em> in the first place! If you don't know what you don't know, documentation is a useless tool (see also the oft-mentioned problem on stack overflow of over-constraining what the answer must look like, as in, 'how do I sort this list in [xyz] way' instead of 'how can I best store this data'). For instance - I took Spanish in high school, and while I did own a Spanish-English dictionary, my use of it was sketchy at best because I did not know enough Spanish to tell whether I was conjugating the translated words properly, appropriately accounting for connotation, and so forth. (Spoiler: I almost certainly was not.)</p>
  <p>Together, all of this combines to create a tool that is useful if you already know what you're doing and need a reference, but almost actively detrimental if you do not know what you're doing.</p>
  <p>So, in terms of approaching how to use documentation with students, I think the answer is a combination of two things. First, don't advise defaulting to using documentation to solve your problems. I do think it's a bit amusing you brought up the Stack Overflow 'check the documentation!' thing, because while I do agree a decent percentage of the time that a google search would have helped everyone involved, there's also a decent percentage of the time that the OP was looking for the function that the documentation page linked references - that is, saying 'well just look at the documentation page for [function]!' is equivalent to saying 'well just check the oscilloscope manual!' when someone asks what <em>tool</em> they should be using.</p>
  <p>To again overuse the dictionary-documentation analogy, when writing, I rarely check the dictionary if I'm looking for a word - I'll check thesaurus.com to find a word that's closer to the meaning and connotation I'm looking for, maybe check articles about similar topics to see what their word choice is like, and so forth. I rarely crack open a dictionary, because searching for a word that 'fits' would mean going from a to z, and I fall down enough rabbit holes as is. The first place I check when trying to solve a programming problem is ~80% of the time 'stack overflow how to [task] python.' If I have a question about a specific function, then I check the documentation.</p>
  <p>In terms of understanding documentation, I'd say your best strategy is likely to be looking at documentation pages for functions that the students <em>are</em> familiar with, in order to explore documentation layout and have them find the pieces they know should be there. Alternatively, for a less-familiar function, cross referencing the documentation with Stack Overflow q&amp;a for more contextualized examples, and also attempting running the function and messing around with the inputs is probably a good strategy. But also, a lot of the functions these students would likely be using might be better explained on YouTube or Stack Overflow! By the time they need documentation, there's a not insignificant chance they'll have gained the knowledge to understand it via programmer osmosis (a dangerous thing to assume, I'm aware).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T10:58:48.377Z
Answers.Text: My general approach towards jargon is to address the essential things head-on at the beginning (the programming meaning of `string` is perhaps not obvious, but there isn't any getting around it) and avoid the rest. I hope that's an appropriate foundation for approaching documentation. As for unknown unknowns: I suppose that reading *error messages* is a more fundamental skill (and possibly the biggest reason that jargon is necessary)
Answers.UserDisplayName: Karl Knechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-03T05:30:33.000Z
Answers.LastActivityDate: 2022-04-03T05:30:33.000Z
Answers.UserDisplayName: auden
Answers.Body: <p>Documentations are written in a very specific format that follows certain rules. When were those rules explained to a person who starts learning programming?</p>
  <p>People look for patterns in order to manage in situations not entirely familiar to them. What patterns do documentations follow that new programmers are familiar with?</p>
  <p>I don't think there are many.</p>
  <p>The closest you can get is reading an encyclopedia or a dictionary, but not many people do that. What happens then if a person tries to find a definiton for a term they are unfamiliar with? They most probably simply google it. But what are they looking for and what is the best search result for them? One that uses that term in a familiar constructs. One that shows examples. One that consists of multiple explanations trying to present different points of view, so the person reading it can graps the topic as best and as easily as possible.</p>
  <p>Where do we find those elements in documentations?</p>
  <p>Now, think about what makes a given documentation <em>great</em>. I am sure you have seen better and worse documentations. Try to think what disinguished those bad documentations from the good documentations.</p>
  <p>Sometimes it's about examples. Sometimes it's about very specific terminology used. Many documentations fail to acknowledge the fact that they need to be <em>both</em> accurate enough for an expert <em>and</em> written in a language that is simple enough that an inexperienced user should be able to exctract information from it. This is extremely hard to do.</p>
  <p>So, to summarize, I believe that the initial problems with extracting information from a given documentation is a combination of unfamiliarity and complexity of the tool. Documentation <em>seems</em> straightforward, but in reality it's really hard to create one that is both accurate and easy to understand.</p>
  <p>That's why I believe teaching how to read documentations and getting familiar with them should be a thing. It will just save so much time for everyone.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-02T00:58:25.840Z
Answers.Text: "Documentations are written in a very specific format that follows certain rules." I'm not sure I communicated myself clearly. My primary goal here is to figure out *concretely* what those rules are, so that I can explicitly state them rather than just intuitively understanding them.
Answers.UserDisplayName: Karl Knechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-04-01T13:14:43.287Z
Answers.LastActivityDate: 2022-04-01T13:14:43.287Z
Answers.UserDisplayName: Fureeish
Body: <p>As an experienced programmer and frequent user of Stack Overflow, I often run into this problem. I try to tell people calmly to read the documentation for whatever it is they are trying to use - but this often doesn't resolve the issue even when it seems like it ought to. Sometimes a direct link is needed (with an anchor to the appropriate part of the page); perhaps a relevant quotation, or even my own rephrasing or explanation.</p>
  <p>Because I'm accustomed to doing my own research, and to the actual process of reading and understanding documentation, I'm often a little mystified here. I get the suspicion that common &quot;documentation-ese&quot; writing conventions are just not intuitive for a lot of people, whereas I've become so accustomed to typical documentation writing style that I don't notice any issues.</p>
  <p>Am I correct in my suspicion, for example, that new students commonly get confused because they don't know how to parse the usual descriptions of a function signature (e.g. with optional parameters in square brackets, the special meaning of <code>...</code>, the way that Python documentation used <code>/</code> to separate positional-only arguments for C-level functions even before native Python support was added for them...)? If so, are there resources that explain this sort of thing? I've evaluated many &quot;learn to program with X as your first language&quot; books over the years, and I can't recall any that get into that material.</p>
  <p>What other things cause confusion? Is there something about, for example, the layout of a typical documentation page that inhibits students from drawing connections? Recently I got feedback complaining that some documentation didn't appear to &quot;indicate what classes the methods come from&quot; (which seems rather dubious, and which inspired me to ask the question).</p>
  <p>Knowing what needs to be mentioned, is any special approach needed to explain the task of reading documentation? Or should I think of it like any other subject? I have it in my long-term plans to write one of those learn-to-program books myself, and I'd like to break the mold by including something useful on the topic.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-04-01T13:27:04.427Z
Comments.Text: Not an answer, just an anecdote: From my experience teaching first years, it takes a while to convince students that unlike the Windows "Help" button, a Linux man-page is actually useful (more or less (pun intended)). Also students switch from being taught  everything by a teacher to having to figure out things by themselves for the first time.
Comments.UserDisplayName: Max
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-05-27T20:31:45.030Z
Comments.Text: @NOTCSEducator That link appears to go to a completely unrelated chat transcript.
Comments.UserDisplayName: Karl Knechtel
Tags: <documentation><conceptual-frameworks>
Title: What things aren't obvious about reading documentation? How can I explain to others how to do it?
ThreadText: # What things aren't obvious about reading documentation? How can I explain to others how to do it?
  
  (Asked by: username_0 on 2022-04-01)
  
  As an experienced programmer and frequent user of Stack Overflow, I often run into this problem. I try to tell people calmly to read the documentation for whatever it is they are trying to use - but this often doesn't resolve the issue even when it seems like it ought to. Sometimes a direct link is needed (with an anchor to the appropriate part of the page); perhaps a relevant quotation, or even my own rephrasing or explanation.
  
  Because I'm accustomed to doing my own research, and to the actual process of reading and understanding documentation, I'm often a little mystified here. I get the suspicion that common "documentation-ese" writing conventions are just not intuitive for a lot of people, whereas I've become so accustomed to typical documentation writing style that I don't notice any issues.
  
  Am I correct in my suspicion, for example, that new students commonly get confused because they don't know how to parse the usual descriptions of a function signature (e.g. with optional parameters in square brackets, the special meaning of `...`, the way that Python documentation used `/` to separate positional-only arguments for C-level functions even before native Python support was added for them...)? If so, are there resources that explain this sort of thing? I've evaluated many "learn to program with X as your first language" books over the years, and I can't recall any that get into that material.
  
  What other things cause confusion? Is there something about, for example, the layout of a typical documentation page that inhibits students from drawing connections? Recently I got feedback complaining that some documentation didn't appear to "indicate what classes the methods come from" (which seems rather dubious, and which inspired me to ask the question).
  
  Knowing what needs to be mentioned, is any special approach needed to explain the task of reading documentation? Or should I think of it like any other subject? I have it in my long-term plans to write one of those learn-to-program books myself, and I'd like to break the mold by including something useful on the topic.
  
  **Tags:** documentation, conceptual-frameworks
  
  > **Comments:**
  > **username_1**: Not an answer, just an anecdote: From my experience teaching first years, it takes a while to convince students that unlike the Windows "Help" button, a Linux man-page is actually useful (more or less (pun intended)). Also students switch from being taught  everything by a teacher to having to figure out things by themselves for the first time.  
  > **username_0**: @NOTCSEducator That link appears to go to a completely unrelated chat transcript.  
  
  ---
  
  ## 7 answers
  
  ### Answer by username_3 on 2022-04-02. Score: 4
  
  In some cases, I suspect the problem may be that the student doesn't really *want* to understand, they want to *do* (e.g. complete the lab exercise or coursework). Unfortunately these days there is an awful lot of code examples easily available on-line in tutorials and e.g. stack exchange, and it is often easier to search for existing code that is similar to your problem and cut-and-paste to get your program working. Understanding the programming language and the documentation is often hard work as a learner and there isn't an immediate benefit from making that effort (but very large benefits much later on). I suspect that I wasn't very good with deferred rewards when I was a student, but I had the advantage of learning to program before the WWW existed, so I didn't have the option. When I am teaching I try to emphasise the benefits of understanding what you are doing, rather than just trying to get it to work, but to some extent I think this is a life-skill that can only really be learned by experience.
  
  To answer the question more directly, the thing that may not be obvious to the student is *why* being able read the documentation is an important skill worth learning, despite not being the fastest solution to the problem immediately facing them.
  
  I dread to think what effect [Codex](https://openai.com/blog/openai-codex/) and [CoPilot](https://copilot.github.com/) will have on learning to program. I'm not against the use of tools in programming, far from it, but tools for experts can get in the way of learning the fundamentals. I'd be glad to hear of any work that has been done on this!
  
  > **Comments:**
  > **username_4**: Right, if someone is "trying to solve a programming problem" that doesn't make them a programmer any more than me trying to solve a medical problem makes me a doctor. If someone wants to deeply understand the system they are working with and why it is that way, I suppose that makes them a software engineer. Students eventually go either the first way and to another major, or towards a strong capacity in programming. If you want to understand something, obstacles are just part of the process. One time I bought a second reference book to solve a problem, and discovered an error in the first.  
  > **username_3**: Part of the problem is that these days there are a lot of frameworks and libraries that make it easy to "do" some quite impressive things without having a deep understanding of what you are doing.  Students aren't necessarily aware that there is more to programming than that (and a deeper level of understanding is possible).  Also a *lot* of education (perhaps just in the U.K.) is goal-oriented rather than understanding-oriented, so I don't think this is a flaw in the students, but a product of the educational environment?  
  > **username_4**: Yes, I think it's better when doing impressive things requires deep understanding. Making deep things reachable with a shallow understanding and a few syntax details does not make them safe to build large systems on. I'm not sure how this will all work out. "AI will save our behinds", is my usual answer. I hope some idiot can whip together a sufficiently smart AI soon.  
  > **username_3**: I think AI is going to make things a lot worse as it will take the work that would normally be done by junior programmers, which raises the question of where the senior programmers will come from later on?  20 years ago you could make money setting up basic commercial websites, but wix & wordpress etc. have put an end to a lot of that.  I suspect CoPilot will eventually do the same for low-end programming.  I don't think that is a good thing.  
  > **username_4**: I was thinking larger and long-term: humans would make beer, create art and music, and do standup comedy, and AI would run the planet.  
  > **username_3**: Bit of a pity, programming can be good fun! ;o)  
  
  ---
  
  ### Answer by username_5 on 2022-04-01. Score: 4
  
  I have a partial answer, perhaps, as to why it is so hard for novices to learn from documentation. But the answer isn't universal and doesn't apply to all products/languages.
  
  There are some companies (I remember Sun Microsystems) that employ people to write documentation who are expert writers rather than expert geeks. They need to be able to talk to geeks and to write in such a way that the uber geeks agree is accurate, but their focus was on reader understanding. A friend of mine once did this for Sun.
  
  But there are other places in which the geeks themselves write the docs. There might be a lot of reasons for this and it might require the backing of a large company to do otherwise, but such documentation can fail users.
  
  I recently reviewed the documentation and tutorials for a product in development. The docs were written by the same folks that did the product. The problem was that in order to understand the documentation you also needed to already deeply understand the problem the product was trying to solve (not a novice attribute) as well as the basic overall UI that the product used. This was probably comprehensible to someone already deeply immersed in the problem space as well as having a lot of experience with similar UI structures.
  
  One of the reasons, perhaps, that you can get away with it is that you already have the background of the entire platform structure that novices don't have. So it is all "Greek" to them. ("Geek" to them??).
  
  A solution, though expensive, is to have different documentation for different experience levels. This is why textbooks exist, actually, and why clear explanation is so valued there. Professional level books are pretty much closed to novices before they go through the apprenticeship needed to grok it properly. And, I remember that after going through the three semester Calculus sequence in college, I then went through several semesters of Advanced Calculus and Analysis, where it became clearer.
  
  Few shortcuts to real learning, I'm afraid.
  
  > **Comments:**
  > **username_4**: Apprenticeship... Wait, I've said that already. And it's not a shortcut. But it might be the shortest path in the NP hard problem of learning a profession. Not a new idea at all. We just have to care enough about people to help them flourish. But that's not really profitable in the short run. Long run.... The only answer.  
  > **username_6**: There is a reason why *technical writing* is a separate profession and you can even get advanced degrees in it. It is sufficiently different from both "technical" and "writing" in general.  
  
  ---
  
  ### Answer by username_8 on 2022-04-01. Score: 4
  
  I think that both of the posters so far (Fureesh and username_5) have great insights. I would only add one more piece I've observed from my own students. It starts with the observation that most people don't particularly enjoy reading dry text, and will give up easily if it becomes impenetrable.
  
  I can't find it now, but I recall some literacy studies that suggest that kids start to give up on text if more than one in ten sentences are too hard. Since I can't find it, take the number ten with a giant grain of salt. What's important here is that there was **a** number, and that it was possible to characterize motivation as a function of the percentage of non-understood items within the overall text. What's also important is that adults aren't truly so different from kids.
  
  So, take a look at Oracle's documentation for [Java's String class](https://docs.oracle.com/javase/7/docs/api/java/lang/String.html). It is, by my estimate, pretty excellent documentation. It has nice text at the top that outlines the basics of the structure, a list of method calls, and then a write-up of each call. It's very helpful, and I've referred to it many times over the course of my career.
  
  But now view it from the perspective of a real beginner who is just learning about Strings (think about how *beginner* that is), and the entire document becomes very different. We start with a bunch of totally impenetrable header stuff, like implemented interfaces.
  
  When we get to a text introduction, we start with:
  
  > "The `String` class represents character strings." All string literals in Java programs, such as `"abc"`, are implemented as instances of this class.
  
  So far ,that might be okay. For the beginner, character isn't a fully fleshed-out concept, but... we might be able to deal with this. And the next sentence is possibly excellent:
  
  > All string literals in Java programs, such as `"abc"`, are implemented as instances of this class.
  
  Though, again, there are some large concepts that you need to understand before it makes *sense*. But it reads a bit like `"abc"` is an example of String, and that's a comprehensible idea.
  
  Then, immediately:
  
  > Strings are constant; their values cannot be changed after they are created.
  
  Wait, what?
  
  > String buffers support mutable strings.
  
  We're very lost now. Is a string buffer a string? Is that a reference to something else? What is mutable, exactly?
  
  > Because String objects are immutable they can be shared. For example:
  >
  > ```
  >     String str = "abc";
  >
  > ```
  >
  > is equivalent to:
  >
  > ```
  >     char data[] = {'a', 'b', 'c'};
  >     String str = new String(data);
  >
  > ```
  
  Well, that's confusing, not least because the *example* doesn't appear to match with the sentence leading up to it. But, for the beginner, we are now looking at a series of glyphs. Just the line `char data[] = {'a', 'b', 'c'};` has many, many concepts locked into it. There is precious little chance of someone just learning about strings making heads or tails of that code.
  
  It honestly doesn't get much better as you head into the rest of the document. For the beginner, the documentation is not at all helpful without a teacher to walk through it with them.
  
  I assume that most people had a similar experience to me with `man` pages, and couldn't make sense of them until someone broke it down first. Maybe other people didn't have those sorts of troubles, but I'm pretty sure that the norm is for people to find them very confusing at first.
  
  Anyway, consider, then, what is likely the early experience that learners will have with documentation. It wasn't useful! The early lesson, it seems, is that documentation is dense, full of needless foreign concepts, and not that helpful.
  
  The students will nevertheless go off and find other information that is more helpful. After all, they still need to do whatever it is that they need to do. Where do they go? A friend, a YouTube tutorial, an article, whatever.
  
  It is perfectly natural, then, that as they develop, they continue to (a) go to the kinds of resources that they have found helpful in the past, and (b) therefore don't develop their skills in documentation comprehension.
  
  I think, then, that something like what you propose, with explicit guidance about how to deal with documentation for people at a more professional stage, could be very useful indeed, since at that point, they are more ready to deal with what they'll find there.
  
  > **Comments:**
  > **username_0**: This seems like a great list of things to keep in mind for *writing* documentation, but I don't think it gets me closer to my goal.  
  > **username_8**: @username_0 I'm sorry to hear that.  I'll give you a sense of where this would fit into my thinking, though, in case that helps you.  When I design lessons for catch-up skills, where students went wrong is often my starting point, and I devise my lessons from there towards my goals.  I don't believe that young professionals would have much problem with documentation; I believe that they have learned from early on that it's not useful, and my answer outlines roughly how I think that happened.  The teaching then, would be oriented towards breaking down those specific problems.  
  > **username_8**: @username_0 The other result, if my outline is correct, is that very early students are actually *right* not to go to the documentation.  It will not help them without additional hand-holding.  They need at least a sprinkling of background and maturity in the field to begin to make good use of those resources.  
  > **username_0**: I think the issue I have is that it *won't* generally be useful for the new student unless you artificially make it so, but the skill needs to be learned *in advance* for when it will be useful later as a professional. So my current thinking (oriented towards book-writing) is that it needs to be an explicit topic, introduced only at the right time.  
  > **username_8**: @username_0 Yes, I think that's accurate.  In my 4-year program, we introduce documentation at multiple passes over the first three years.  The first pass is essentially pre-digested, with a short excerpt that contains only the five methods that we are talking about at that moment, and we discuss how to interpret what we are looking at.  At the next exposure, a few months later, we do it again, but it's easier.  From then on we provide api-style method lists...  
  > **username_8**: ... with confidence that the students can read them.  Later, we get into full (simple) API documents, and we have guided hunting expeditions.  The guidance diminishes over time as they get used to it.  
  > **username_8**: For the whole next year, we will point them towards object documents, and eventually towards packages with many objects, and only support as needed.  In the following year we start again with API documents in scheme instead of Java.  
  > **username_8**: By the time our kids get to their fourth year, they are pretty capable of looking through documentation.  But, of course, some of that is because of this instruction, and some of it is just because by the fourth year, they also have a generally rich background, so they understand a lot in general by then  
  > **username_4**: I am trying to guess how many long sentences are in *Atlas Shrugged* :-) My take on what I have seen of the evolution of languages and tools over the last 30 years is that there has been an exponential explosion of layers and possibilities, such that starting off now to learn the fundamentals is probably out of reach for most humans. It was always arcane, but usually with a pretty restricted list of separate areas to learn. Compare today's environment with *The C Programming Language* and a text editor and compiler commands. Why exactly did we go in this direction? Where is it leading?  
  
  ---
  
  ### Answer by username_1 on 2022-04-01. Score: 3
  
  I don't believe there is anything special to reading documentation. As most things programming related, it's a bit of basic knowledge and a lot of experience. You obviously need a basic understanding of the language (or whatever the docu is about) and the "grammar" which is used for syntax, optional command line or function arguments and the like. But at my Uni this (along with more extensive formal grammar) was covered in the first semester.
  
  To put it another way: If I completed my 5 year CS degree without ever looking at documentation I wouldn't suddenly go "I'm not prepared for this" when handed my first manual.
  
  If I had to point out something it would probably be
  
  a) Documentation (apart from the most common languages) in my experiance is rated on a scale ranging from "patchy" to "non-existant".  
  The people who wrote it are usually experts on the subject and rather spend their time being experts than write documentation for other people. So a lot of things get left out because either they are obvious to them (and not you) or they just don't have the time or feel like it. So reading documentation sometimes can be a bit of a guessing game. With more experience it get's easier to fill in the gaps.
  
  b) Even if patchy, documentation sometimes can be massive and feel intimidating. E.g. the reference manual for one of the smaller microcontrollers I'm using, has about 1600 pages. And that's only hardware. The programming manual is another 2000 pages. So you have to know exactly what you problem is and where to look.
  
  So if people are "lost" when reading documentation, I don't think it's because the are missing the vital "magic documentation reading skill" but it's rather a symptom of deeper issues with the problem or programming in general.
  
  > **Comments:**
  > **username_7**: "The people who wrote it are usually experts on the subject and rather spend their time being experts than write documentation for other people" -- most "true" experts I know are all about documenting their knowledge, not only for their future self reference, but usually because they genuinely care about a library or product's longevity (reducing the [bus factor](https://en.wikipedia.org/wiki/Bus_factor)) and simply sharing knowledge about a thing they're passionate about.  
  
  ---
  
  ### Answer by username_9 on 2022-04-03. Score: 2
  
  Documentation is to (e.g.) a stack overflow answer as a dictionary is to a textbook of english. (Or, put another way - by the logic of this question, english language SE would/should have very few questions.) Documentation has certain rules, yes, and these are mainly necessary because it is so compressed from a standard explanation. Instead of saying "The function takes in x, which is an integer which tells the function what power to raise the number to, as well as y, which is an optional boolean (i.e. true/false value) that ..." this all boils down to five or six words of documentation.
  
  Worse, this compression is accentuated by the use of jargon that a newer user likely isn't familiar with (e.g., 'bool' short for 'boolean' short for 'a value that can be true or false' - and this is all very abstract! if you haven't ever seen a use for a boolean value in programming, you'd sure have some questions at this). Also, much like a dictionary, the examples are brief, often unexplained, and at the bottom of the page.
  
  And further, using documentation requires that you know *what to search in the documentation* in the first place! If you don't know what you don't know, documentation is a useless tool (see also the oft-mentioned problem on stack overflow of over-constraining what the answer must look like, as in, 'how do I sort this list in [xyz] way' instead of 'how can I best store this data'). For instance - I took Spanish in high school, and while I did own a Spanish-English dictionary, my use of it was sketchy at best because I did not know enough Spanish to tell whether I was conjugating the translated words properly, appropriately accounting for connotation, and so forth. (Spoiler: I almost certainly was not.)
  
  Together, all of this combines to create a tool that is useful if you already know what you're doing and need a reference, but almost actively detrimental if you do not know what you're doing.
  
  So, in terms of approaching how to use documentation with students, I think the answer is a combination of two things. First, don't advise defaulting to using documentation to solve your problems. I do think it's a bit amusing you brought up the Stack Overflow 'check the documentation!' thing, because while I do agree a decent percentage of the time that a google search would have helped everyone involved, there's also a decent percentage of the time that the OP was looking for the function that the documentation page linked references - that is, saying 'well just look at the documentation page for [function]!' is equivalent to saying 'well just check the oscilloscope manual!' when someone asks what *tool* they should be using.
  
  To again overuse the dictionary-documentation analogy, when writing, I rarely check the dictionary if I'm looking for a word - I'll check thesaurus.com to find a word that's closer to the meaning and connotation I'm looking for, maybe check articles about similar topics to see what their word choice is like, and so forth. I rarely crack open a dictionary, because searching for a word that 'fits' would mean going from a to z, and I fall down enough rabbit holes as is. The first place I check when trying to solve a programming problem is ~80% of the time 'stack overflow how to [task] python.' If I have a question about a specific function, then I check the documentation.
  
  In terms of understanding documentation, I'd say your best strategy is likely to be looking at documentation pages for functions that the students *are* familiar with, in order to explore documentation layout and have them find the pieces they know should be there. Alternatively, for a less-familiar function, cross referencing the documentation with Stack Overflow q&a for more contextualized examples, and also attempting running the function and messing around with the inputs is probably a good strategy. But also, a lot of the functions these students would likely be using might be better explained on YouTube or Stack Overflow! By the time they need documentation, there's a not insignificant chance they'll have gained the knowledge to understand it via programmer osmosis (a dangerous thing to assume, I'm aware).
  
  > **Comments:**
  > **username_0**: My general approach towards jargon is to address the essential things head-on at the beginning (the programming meaning of `string` is perhaps not obvious, but there isn't any getting around it) and avoid the rest. I hope that's an appropriate foundation for approaching documentation. As for unknown unknowns: I suppose that reading *error messages* is a more fundamental skill (and possibly the biggest reason that jargon is necessary)  
  
  ---
  
  ### Answer by username_10 on 2022-04-01. Score: 2
  
  Documentations are written in a very specific format that follows certain rules. When were those rules explained to a person who starts learning programming?
  
  People look for patterns in order to manage in situations not entirely familiar to them. What patterns do documentations follow that new programmers are familiar with?
  
  I don't think there are many.
  
  The closest you can get is reading an encyclopedia or a dictionary, but not many people do that. What happens then if a person tries to find a definiton for a term they are unfamiliar with? They most probably simply google it. But what are they looking for and what is the best search result for them? One that uses that term in a familiar constructs. One that shows examples. One that consists of multiple explanations trying to present different points of view, so the person reading it can graps the topic as best and as easily as possible.
  
  Where do we find those elements in documentations?
  
  Now, think about what makes a given documentation *great*. I am sure you have seen better and worse documentations. Try to think what disinguished those bad documentations from the good documentations.
  
  Sometimes it's about examples. Sometimes it's about very specific terminology used. Many documentations fail to acknowledge the fact that they need to be *both* accurate enough for an expert *and* written in a language that is simple enough that an inexperienced user should be able to exctract information from it. This is extremely hard to do.
  
  So, to summarize, I believe that the initial problems with extracting information from a given documentation is a combination of unfamiliarity and complexity of the tool. Documentation *seems* straightforward, but in reality it's really hard to create one that is both accurate and easy to understand.
  
  That's why I believe teaching how to read documentations and getting familiar with them should be a thing. It will just save so much time for everyone.
  
  > **Comments:**
  > **username_0**: "Documentations are written in a very specific format that follows certain rules." I'm not sure I communicated myself clearly. My primary goal here is to figure out *concretely* what those rules are, so that I can explicitly state them rather than just intuitively understanding them.  
  
  ---
  
  ### Answer by username_2 on 2022-04-05. Score: 0
  
  As I've heard it put: "Unix documentation is written in such a way that, when you finally figure it out for yourself, you can never say that it didn't say so in the first pace".
  
  This points to the fact that reading documentation is a different process from reading ordinary prose. For documentation you have to engage with the prose:
  
  1. you read it
  2. you think "that can never be true"
  3. you try to think of a counter example
  4. you read the documentation again to see why your example is wrong,
  5. 6 7 8 rinse and repeat.
  
  This "struggle against the documentation" is frustrating and tiresome. Many people give up pretty early in the game.
  
  
  ---
  
  