TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How to Improve Documentation?

29 pointsby shreythecrayalmost 3 years ago
What are some features or styles of documentation that make you want to read more vs. what are some characteristics that make you hate documentation?

12 comments

throwaway81523almost 3 years ago
First of all you need an interalized conviction, based maybe on long and painful experience, that good docs are worth the trouble that it takes to write them. Second, your management has to back you up on this, when normally they are obsessed with slamming today&#x27;s feature out the door and letting the underlying confusion keep piling up. And third, you have to put in the work of actually writing the docs. It&#x27;s not the world&#x27;s most challenging or demanding work, but it takes understanding of the topic you are writing about, and sustained effort to keep the words flowing into your keyboard.<p>There is not a stimulating code-test-debug cycle in writing like there is in programming. It&#x27;s just work work work. There is no framework or tech stack that can change this. So you have to like writing, and think that it is worth it. You have to deal with that first. Worry about subtleties later.
armchairhackeralmost 3 years ago
I like API docs. Docs where each module, definition, function, etc. is documented. Then I can see the docs in my IDE.<p>If the API docs have a good search function, then I can actually search directly from the docs instead of Google. They should also have lots of links because often I’m just clicking through references.<p>I also really like examples. Especially when they’re examples of something i might actually do (e.g. how to use a file library to read a file), to the point where sometimes I just copy&#x2F;paste them.<p>High-level theoretical documentation is good too, but make sure you have the API documentation and examples first. Also try to use graphics and diagrams where appropriate. People have garbage attention spans and most people won’t read a wall of text.<p>The best documentation I know so far is the Rust standard library in docs.rs. Lots of Cargo packages also have great documentation. The Rust &#x2F; Cargo books are a great example of higher-level documentation. If you write docs like well-documented packages on docs.rs you should be good.
warrenmalmost 3 years ago
What I wrote ~9y ago is still a pretty accurate representation of my view - <a href="https:&#x2F;&#x2F;antipaucity.com&#x2F;2013&#x2F;10&#x2F;11&#x2F;theres-never-enough-documentation-theres-too-much-documentation&#x2F;" rel="nofollow">https:&#x2F;&#x2F;antipaucity.com&#x2F;2013&#x2F;10&#x2F;11&#x2F;theres-never-enough-docum...</a><p>#Not Enough:<p>- why-tos (instead of how-tos)<p>- tutorials on things you need<p>- architecture explanation<p>- design philosophy “how we got here”<p>- “why we are here”<p>- future plans &#x2F; roadmaps<p>- deltas from standards recording<p>- back-&#x2F;cross-references to extant (even from other vendors &#x2F; sources) documentation<p>#Too Much&#x2F;Many:<p>- extraneous verbiage – use terse verbosity<p>- tutorials on things you don’t need &#x2F; care about<p>- discussion of non-core aspects of the product<p>- how we used to do things<p>- assumption of comprehension<p>- plagiarism – ie, non-attribution of sources<p>- braggadocio (not just excited) tone<p>- different “voices” or styles
YourGracealmost 3 years ago
I think there are two types of documentation, one is for internal use by developers to build locally and maintain the internals of the system, and another is external&#x2F;client facing documentation providing insights into how to call into the APIs and details about the APIs. I&#x27;ll defer on external documentation as that can be broken up even further with publicly external (open to public), and internally external (document open to everyone within the org regardless of team). For external facing documentation, the most painful experience is when docs are outdated.<p>For internal documentation, the most memorable&#x2F;painful instances I&#x27;ve encountered has been that the code is overly complex and I would have liked documentation to help me understand why we have so many parameters and configurations and their impact. I believe having more explicitly defined methods help reduce ambiguity within the code. I&#x27;ve seen many examples of methods or objects where the goal is avoid as much repeated code as possible which create these burdensome solutions, so it drives the responsibility on the clients and developers to understand how to configure the input to get the desired behavior. Often times, we don&#x27;t need the multiple layers of abstraction or configuration just to consolidate everything into a method, I think it&#x27;s fine to have multiple methods with explicit use cases. That helps developers read the code easier, understand what is happening, and is less mentally challenging. In my opinion, making the code easier to read will help reduce the need for extensive internal documentation besides the required onboarding, dev setup, and overall architecture designs.
verdvermalmost 3 years ago
<a href="https:&#x2F;&#x2F;documentation.divio.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;documentation.divio.com&#x2F;</a> is a great framework for documentation<p>We don&#x27;t always go to the docs for the same reasons, you&#x27;ll want content for each goal the user has.<p>Easy navigation and discovery, typically I have an issue or problem that I&#x27;m trying to resolve.<p>Don&#x27;t Make Me Think is a good book for understanding how users read the internet (and documentation in this case), lots of good tips &#x2F; practices
yardshopalmost 3 years ago
Along with all the other good advice here, make sure to consider the idea of four types of documentation:<p>Documentation System, <a href="https:&#x2F;&#x2F;documentation.divio.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;documentation.divio.com&#x2F;</a><p>tutorials, how-to guides, technical reference and explanation<p>They each serve a different need during the phases of learning and using a system.
softwaredougalmost 3 years ago
Some principles I&#x27;ve found useful<p>* Avoid traditional documentation unless you absolutely need it<p>* Write good, readable tests! For developer users, this is the most &#x27;honest&#x27; documentation to read<p>* Make other types of documentation as testable as possible. On our project, we maintain a series of jupyter notebooks for documentation heavily sprinkled with asserts to prove the state of the world exists as expected...<p>* TIMESTAMP - Prefer writeups, articles, blog posts, etc with timestamps over &#x27;documentation&#x27; that promises to be current - this way its known when the information was relevant, and it&#x27;s expected things grow out of date (like picking up a 1 year old book on a technology). If someone finds it useful and wants to update it, they can update the timestamp. Otherwise, its still a useful bit of context for a given snapshot in the past
评论 #31816884 未加载
eatonphilalmost 3 years ago
Use GIFs and screenshots to explain complex UI interactions. But for gosh sake don&#x27;t only do screenshots for code, making me copy from a screenshot into my editor. Always include copy-paste-able code snippets when there&#x27;s code&#x2F;configuration to share.
hnthrowaway0315almost 3 years ago
IMHO documentation should include basic scenario examples. It should also include all quirks that the team was forced to implement but difficult for other people to pinpoint.
yargalmost 3 years ago
If it&#x27;s documenting code, auto-generate as much as possible (this makes it less likely that the documentation will become invalid).
warrenmalmost 3 years ago
Also see <a href="https:&#x2F;&#x2F;pm.stackexchange.com&#x2F;a&#x2F;802&#x2F;167" rel="nofollow">https:&#x2F;&#x2F;pm.stackexchange.com&#x2F;a&#x2F;802&#x2F;167</a>
评论 #31816875 未加载
themodelplumberalmost 3 years ago
Good q! To me there should be a good ratio of &quot;accuracy scent&quot; to &quot;usefulness scent&quot;.<p>Some documentation is clearly written for subjective accuracy &amp; coverage. The author really wants to nail down the full set of conditions or rules that applies to the given term, section, keyword, etc. Each sentence builds on the last. There will be no skimming here--you must be a sequence-consumer and maybe even some kind of logic-critic to really enjoy this.<p>That&#x27;s nice unless you aren&#x27;t wired for that kind of reading, or you&#x27;ve got other things to do, and you need a common answer or solution fast, and there&#x27;s no FAQ or it&#x27;s not in the FAQ. Someone told you to read the docs, and you start to realize that the docs are more of a schema than a how-to. Well, sometimes that really sucks.<p>But also sometimes there&#x27;s not enough accurate coverage, and the docs simply say e.g. &quot;this function draws a line&quot; and even offer some examples. But none of the examples cover all the stuff that you can do with the function and there are clearly a number of additionally usable keywords or options up there, and if you look in the language source there are a bunch of single-letter vars all over the place with no comments.<p>So there&#x27;s this gap between &quot;here&#x27;s how this part works &amp; you&#x27;re on your way&quot; (casual) and &quot;here&#x27;s REALLY how it works&quot; (orthodox) that is worth giving reasonably both-sided attention IMO if you want to strike a good balance for readers.<p>Some other factors: Is the documentation kept up to date, does it cover OS-integration factors (e.g. where is the config kept and how does it work), how does it read on mobile, how well does the web menu work, is there a URL segment per topic, is there a link from docs back to language home page (not just a self-contained doc blob), etc.<p>A bit of a tangent, but I do think some basic web sense can help if the docs will be published on the web. I recently worked with the maintainer of a wiki help manual for a programming language on this. It seems they had spent a LOT of time deciding which camel case words to use for their wiki, something like a decade ago.<p>And now the problem is, somebody has since taken the official docs to a different domain name, improved the SEO by demoting camel case in favor of fully descriptive page titles, let the docs go out of date, and now there are these obsolete docs with much better SEO that outrank the official up-to-date docs. And this third party can&#x27;t be reached, so the creative solution is to do tons of SEO-style work on the current docs.<p>Which of course, SEO is the absolute favorite topic of every programmer, especially when someone else is showing them how much their SEO needs to improve :-) &#x2F;s<p>Anyway! Good luck with your blog post or docs project.