TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Consider Using Docs-as-Code

9 点作者 NiklasBegley超过 3 年前

3 条评论

kevincox超过 3 年前
Using docs-as-code really shows some limitations on our code review tools.<p>High Friction: Google Docs makes adding suggestions and comments. Opening a PR or opening a bug is so much more effort that people are much less likely to do it.<p>Low Visibility: When a suggestion is pending on Google Docs users reading the doc can see the pending suggestions and use them right away, even if not reviewed. When browsing code the pending changes are hard to find.<p>Non-Optimized: Most of the code review tools (including Git) work at the line level. (Git doesn&#x27;t fundamentally care about lines but diff and merge operations do rely on lie-level diffs). Prose really needs word-level diffs to be effective.<p>Too simple: Formatting is very useful for docs. Markdown helps this but still falls sort of images in diagrams. Simply pasting a screenshot into a doc gets back to the High Friction concern above.<p>At the end of the day docs end up being much more of a collaborative experience and these issues hurt a lot more for docs then they do for code. Most organizations struggle to write docs anyways so using a tool where making improvements and additions is as simple as possible is worth more than the advantages of code. I still highly recommend reviews, but that can generally be done by leaving your edits as suggestions and asking a peer to review, comment and accept them.<p>However a high quality code-based-docs system has some huge advantages as well, automated checks (did you a new doc for all defined alerts), testing (run the code samples in the docs), automation (find and replace, or even just searching), portability (You can copy the source of the docs to some emergency access system in case your regular doc host dies), integration (reference functions, lines and files from your source) and others.<p>I would love to see docs-as-code get better but our tooling isn&#x27;t ready for it yet in my opinion.
评论 #28359265 未加载
评论 #28360666 未加载
karmakaze超过 3 年前
TR;DR - A fancy name for storing Markdown (or other static generated docs) in you source code repo.<p>Could be useful to know how Doctave differs from Jekyll, Hugo, etc.
smackeyacky超过 3 年前
This is an old idea thats been tried a few times. I think its hard enough to keep code comments up to date, let alone a whole document system.<p><a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Web_(programming_system)" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Web_(programming_system)</a>