7 ms·
How I Judge the Quality of Documentation in 30 Seconds (2014)
- jtms 8y agoI appreciate and agree with all of the author's points, but I think that a few really well thought out and explained examples on a simple Github README is worth far more to me from a practical standpoint. I generally will look at the examples, try them out in a stand alone test, spend a few minutes seeing what the quality of the source code is, and then make a decision to go further with it or not. For a smaller project that only has a limited set of features I think most of the author's points are maybe a bit overly picky.
- MrTonyD 8y agoInteresting to see how someone experienced evaluates documentation. I've been doing Curriculum Development for several years, and it's easy to identify bad Curriculum. If I flip through a course and don't see a lot of diagrams (20%-50%) then I know that somebody didn't know all the research showing that diagrams aid recall and simplify the understanding of relationships. And if I don't see frequent labs/practice, then somebody didn't know all the research showing that the brain needs to have new concepts reinforced, and skipping that step prevents new information from being well-absorbed. I could go on, but those two are typical. And people wonder why Training isn't more effective. I have seen bad training sink more than one high-tech company - though nobody at those companies seemed to understand that. There is also an art to properly decomposing complex topics so that they can be "intuitive". My very best technical courses were often criticized as being "easy" and "obvious" - but only by those who hadn't tried to learn the same information before.
- ArchTypical 8y ago> With GitHub Pages, Read the Docs, and other places to host generated documentation for free > If your documentation is generated from source code, I am immediately skeptical Looks like another self-important troll. Those statements are just lolwhut. I'm not going to learn (or force others to learn) a tool to read documentation. Put a /docs folder in the appropriate project directories and have the team that handles it, decide what to put in that (even if it's a URL to somewhere else). Disregarding existing documentation because you dislike the organization/formatting is such an act of blind ignorance, I'm surprised he thinks he knows anything about it. Documentation is not a solved problem (although it's easier than testing). > If you included all of the things needed to document a project in source, your code would be unreadable. That's only because modern IDEs haven't implemented inline-documentation methods yet. One day we'll get companion documents with every sourcefile that will allow developers to read notes and link to associated content from orthogonal comment files.
- MrTonyD 8y agoWhile I don't agree with the article 100%, I too am skeptical when I see documentation generated from source. A complex topic requires decomposing the information into different types of information with different approaches to explain it. Not everything is "here is the API". For example there may be an important overarching conceptual model, and information which maps into it. I don't know any way to express that in any of the source program documentation tools (at least, I've never seen it done in the many hundreds of projects I've seen.) The problems go well beyond formatting and organization. (Though, some things are simple APIs where some trivial examples and some minimal text can explain it sufficiently. That does describe a lot of existing libraries.)
- kevin_thibedeau 8y agoSphinx does this better than most since it is a general purpose documentation tool first with API doc generation as an optional add on. After setting it up you can easily add manually written documentation as needed. Most importantly, you can easily cross-reference the API docs and the manual prose from each other. Doxygen and its ilk are overly focused on generated API documentation extracted from meta-comments and you rarely see them used with well organized manually written text.
- amingilani 8y agoHere's a summary: 1. Get a website: don't use a readme on GitHub. 2. Use Prose: don't generate from source, you need more. 3. Give permalinks for citation purposes 4. Your URL should acknowledge the documentation version and language, for future-proofing And now for my own opinion: 1. No, not every project finds it rational to put time into creating a website. Especially if they're small. Sometimes, the time is better spent doing dev work than creating a pretty site to satisfy you. 2. Rails' documentation is generated from source, so is Node's. A lot of documentation is. They give accompanying guides, sure, but there's nothing wrong with generating the majority of your documentation from source. 3 & 4. These are nice to have, sure, but not requirements. If a project is small, I'd rather the solo dev spend their free time solving tough problems. Essentially: if you're judging a whole project in 30 seconds, I think you're the problem and not the developer that spent all their time making a project for you to use. So, go ahead, "close the tab" as many times as you like there. But if you really want to help someone, open a pull request, or at least file an issue in a curteous time.
- achamayou 8y agoYou really have to go out of your way to not provide 3., any half-decent documentation generation mechanism, even trivial markdown rendering scripts, will have some sort of support for permalinks. Short of deliberately not versioning your documentation, it's quite difficult to avoid producing working permalinks. Generating reference from source is fine, but it's definitely insufficient. Trying to pick up a library or a framework from reference alone is like learning a language solely from a dictionary. Documentation should at least include some general design and architecture elements, and tutorials or commented examples. Writing accurate documentation mostly requires a thorough understanding of the code, it's one of the least easy things to contribute productively as a newcomer. I'd much rather the developer did not implement some features (which they took the time to list or maybe even sketch out their intentions for in the documentation), and documented what they did implement thoroughly. That's a much better starting point for contribution than a more or less feature-complete project that needs reverse engineering because there is no documentation at all.
- guessmyname 8y ago> Rails' documentation is generated from source, so is Node's. Indeed! There's no better documentation than the code itself. Godoc —the documentation tool for Go— also generates it from the source code. Concise and clear, here is an example input [1] and its corresponding output [2]. [1] https://golang.org/src/net/http/doc.go https://golang.org/src/net/http/doc.go [2] https://golang.org/pkg/net/http/ https://golang.org/pkg/net/http/
- kaycebasques 8y agoEric runs the yearly Write The Docs conference in Portland every year. I highly recommend attending if you are interested in documentation from a cross-functional perspective.
- maxxxxx 8y agoMy company should start hiring from that conference. We really need people who care about docs. Devs usually hate it.
- Sgt_Apone 8y agoThey actually have a fairly active Slack [1] with a job posts channel, as well as a Job Board [2] on their main site. [1] http://slack.writethedocs.org/ http://slack.writethedocs.org/ [2] https://jobs.writethedocs.org/ https://jobs.writethedocs.org/
- benbristow 8y agoI think the language thing is a bit unfair. If your service targets non-English speaking countries, 100% you need your documentation translated. Otherwise - why?
- bArray 8y agoAgreed and also, maybe it will support other languages in the future - just not at this moment.
- ronilan 8y agoI’ve published Open Source code and documentation. It is a lot of work. I think that “How I judge someone’s else hours of effort in 30 seconds” is a toxic attitude.
- bArray 8y agoExactly, if everyone was held to this standard, there would be much less projects out there. Hell, I've thrown some undocumented projects out there with the intention of cleaning them up later or if it gains traction. I have so many side projects that I couldn't possibly reasonably document them all.
- pvorb 8y agoBy not documenting them you make clear that they're not intended for production use, which is perfectly valid in my opinion. I also do this a lot.
- austinpray 8y agoIt’s toxic and lazy too. You should first go look and see if the actual code is high quality/does what you want. If your idea of shopping for dependencies is looking at the amount of GitHub stars and the quality of the documentation: you are going to miss some real diamonds in the rough.
- rosser 8y agoIs it laziness or efficiency? It's, in my read, a heuristic (he even uses that word) for deciding whether it's worth spending time reading the docs before looking at the actual code, to see if it does what he wants. It's about how he should best spend his time, which is finite, after all. Paid time even more so.
- Gigablah 8y agoIt’s a really bad heuristic. I evaluate projects by (1) actually reading their source code, (2) looking up their frequency of updates and release packaging, (3) the community interaction of authors and contributors. The total amount of effort it took to write that blog post could have been spent on submitting PRs to improve documentation of various projects.
- mlthoughts2018 8y agoInternal development is very different than externally facing development. For example, generated API docs are a horrible thing for purely internal code, because you need a documentation build and deployment system that inevitably breaks and nobody wants to maintain and gets out of sync and suddenly the documentation is stale and there's some engineer on the brink of rage quitting if someone pings them to manually rebuild the documentation pages one more goddamn time. Having it just in the repo as a set of Markdown docs or something is much better, and "the website" is just URLs to those files in GitHub. Same risk of becoming stale as anything else, but no overhead of documentation build and deployment.
- sverige 8y agoI know that writing good documentation is hard, and that a lot of devs don't like to do it, but I completely agree with TFA. If the project isn't worth the time to document properly, it's self-announcing that it isn't worth using that code. Why would anyone use throwaway code posted on GitHub? Even if it's been written by a "rock star," the risks are too high. The philosophy of OpenBSD is the correct one, I think: incorrect documentation is a bug and should be fixed with the same energy that is directed toward bugs in code. If it's only going to be used by you, great! Don't be offended if someone else looks at it and says, no thanks because of the lack of documentation.
- jquast 8y agoI noticed a lot of FOSS bug reports/emails for my projects are coming from foreigners lately, and I spent a lot of time thinking about how to help. Translation seemed insurmountable. I considered a lot of options. My conclusion was to always strive for brevity and clarity. Say it all, say no more, be clear, and be concise. I now consider a foreign audience that may take significantly longer to understand what I write, they may use translation tools, they may be confused by any "flowery language".
- uvtc 8y agoGiven that GitLab/GitHub/etc (and, often, online package repositories) automatically display markdown files as rendered html, a directory of markdown files is a fine way to document your project. The docs can, at any point, optionally be processed into html that goes into a separate website (lots of folks have written tools for this. My own is [Rippledoc](https://gitlab.com/uvtc/rippledoc) https://gitlab.com/uvtc/rippledoc)). Also, if the project is a library or framework with a public interface, you need both API docs generated from source, and prose docs.
- solipsism 8y agoI was excited about this, but it was mostly worthless. The equivalent of a "how to write a great paper" guide explaining font size, where to put your name, to include a table of contents... And that's it. Nothing about what to write and how to write it? This is the hard part.
- randallsquared 8y ago> If you don’t provide a language in your URL, you are implicitly sending the message that the documentation will never be translated. Is the `accept-language` header basically dead, these days?
- a1369209993 8y agoYes, and good riddance; a GET request for a given URL should return bit-for-bit identical results[1] regardless of browser differences[0]. 0: Explicitly stateful features such as API endpoints or "logged in as" fields aren't browser differences. 1: The resulting file, not necessarily the TCP stream used to transfer it. 2: Yes, there are exceptions (eg http://canhazip.com/more http://canhazip.com/more), but documentation is almost the diametric opposite of being one of them.
- Tomte 8y agoThank God, yes. I mean, in theory it's great. In practice you always got cringeworthily bad translated versions of the Debian web site. (A few years ago Debian's German pages got much better)
- jessaustin 8y agoWhy would choosing language via URL be any different than choosing language via header, with respect to the quality of the translation?
- bschwindHN 8y agoI'm very thankful for Rustdoc. Every library's documentation has the same, easily searchable format. The syntax for writing documentation is easy to use and standard across all Rust projects. You can easily generate HTML documentation from your source code and standalone markdown files. crates.io will generate your documentation and host it for you when you publish a library. Your example code in your documentation can actually be compiled and tested so it stays up to date. It's been a joy to use and a major reason I like programming in Rust. I don't know about localization support, but it addresses most of the other issues outlined in the article. https://doc.rust-lang.org/beta/rustdoc/what-is-rustdoc.html https://doc.rust-lang.org/beta/rustdoc/what-is-rustdoc.html
- mpolsz 8y agoAs hard as rust is in itself, it tries to lower most of the other barriers to entry for new programmers. I think that central package repository coupled with sane package manager and consistent documentation is must have for any new language on the market. Both Rust and Elixir have official package manager and repository with documentation hosting and it makes life much easier. This and not having to worry about another holly war later on.
- steveklabnik 8y agoLocalization is basically non-existent :( it’s a thing we want to work on, but aren’t sure how to accomplish.
- Manishearth 8y agoI've discussed this a fair bit and we have a rough plan, but the idea is to wait for other things to localize first.
- steveklabnik 8y agoAh great!
- hyperpallium 8y agoCode is the best documentation, it's what I seem to always end up consulting. And always in sync. Plus some guide to the overall architecture. Now... a pattern language was meant to provide this, but failed. Perhaps, since a program is a theory, to understand the structure of the code, you must understand the structure of the problem/domain... and there's no shortcut. But even if so, a helpful guide seems possible. Autogenerated docs can help navigate the codebase, but tools can autonavigate just as well. They could show the overall code structure, but don't. They could be in sync, but aren't. A minimal but complete (all-steps) example, partly to learn from. and build on, and also to assure me that it works. Idea: I keep kinda expecting the text alongside each file/dir on github to be a comment on that file/dir (instead of its latest commit message). Could be incredibly valuable for navigating a codebase and grokking its architecture. (Though prone to desync.) I also like the format of a commit message for this: <50 char summary line, optional further lines. code: electronic documentation: edoc
- kkarakk 8y agopull the ladder up after you mentality, how is someone new to your language/stack going to understand your code without a similar level of knowledge? this type of thinking leads to abandoned codebases and full product rebuilds in another language with better documentation. currently migrating a product for this very reason.
- hyperpallium 8y agoThis was based entirely on my experience with other people's projects that I knew nothing about.
- yspeak 8y agoMost of these comments illustrate why open source projects for the most part are so user unfriendly for the average Joe. It's not so much a criticism but an observation. When many comments says that the best documentation is the source code that reveals a lot. It means don't bother to use unless you're a developer. Even if it's autogenerated from comments it's a poor way to document a user guide. I love open source and use it all the time but the documentation SUCKS and has for decades (although now much better than previously). I do code and understand that it's because no one has time and also that the code changes so frequently but it's hard to grasp how there can be a desire for open source use to proliferate broadly in the non-dev world when for the most part one is expected to read code to use it or at least to get the maximum benefit. There are exceptions like Android that have corporate backers or are more or less intuitive but generally the creator assumes that the user reads code. Thankfully YouTube has developed as an alternative to user documentation in many ways. In fact screen demos are often much easier and quicker to produce, more widely used, and more effective than traditional written documentation.
- cube00 8y agoFor APIs, I find having a good test suite means I can get started understanding how to call the library quickly.
- kkarakk 8y ago>Someone shouldn’t have to learn Programming and English at the same time. However the attitude seems to be very much "learn Chinese/local language or gtfo" from the opposite end wrt localisation ie it is nonexistent. I think devs are really giving up something valuable by not pushing for a global standard language for development. sure I shouldn't HAVE to learn English and Development at the same time BUT who is developing in my language anyways? no language support, no compiler support,no Unicode support and no readable font support. instead of bootstrapping all of that(an impossible task as there is no requirement and no funding from any sources,i've tried but the govt and general public ranges from apathetic to stubborn on this issue), it was easier for me to learn English. I could have theoretically learnt the language one level up on the linguistic chain but I would eventually hit the same issues as I tried to use the available tools.
- jerf 8y agoIt's a nice thought in some ways, but that requirement in particular is where I figured the author must be talking about massive projects, because I'm sure not taking my ~100 man-hour open source project documentation and getting it translated into half-a-dozen languages. A project has to be pretty big (multiple orders of magnitude larger than that) before it can justify having documentation in anything but whatever language the probably-single developer is most comfortable documenting in.
- gilrain 8y agoHow I judge the quality of a judgment: if its maker boasts how little time they spent making the judgment, it’s probably pretty uninformed.
- zygotic12 8y agoJudging books by covers. First time I've seen it in the wild!