A README maturity model
github.com
github.com
Please, not in a README.
My problem with documentation remains: It's always out of date, and frequently contradictory. I'm trying to work with Kubernetes right now, and by this "maturity model", it's a Level 5. That doesn't actually provide any real help though, since k8s is moving so quickly the tremendous volumes of documentation which make it so attractive to managers and leaders just can't keep up.
What arguments should I be providing to kubelet? Depends on whether you're reading the code, the admin guide, or the getting started from scratch guide. None of which, by the way, reference the version of k8s you're going back to.
The API docs generated from the code are a bit better, but they were written as part of the code, and the descriptions are incomplete and confusing without the context of the code (separate rant - that codebase is split between so many repos you'll go slightly mad trying to learn what is where if you're not already familiar with it).
In the end, we always end up going back to the code; even k8s documentation acknowledges this by constantly linking back to GitHub.
How do large, fast moving projects like the linux kernel manage this?
[1]: https://swagger.io/
Even for those things which have documentation in Documentation/, there is no formal or informal rule that if you make a change which causes existing statements to become false you have to update them.
If your project is bigger, README probably should not be a full documentation of the project but link to the actual documentation.
I just came up with the idea and the first (bad?) heuristic now, and I didn't check to see if tools with these characteristics already exist. It would be bad initially [2] and it would be onerous for sure, but it would be a start.
[0] https://www.python.org/dev/peps/pep-0257/ [1] http://www.oracle.com/technetwork/java/javase/documentation/... [2] https://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_fu...
https://doc.rust-lang.org/stable/rustdoc/documentation-tests...
The cool thing about these is that you can actually (depending on the situation) make your examples your tests.
To be completely clear, this is what I meant:
Suppose this is the function we want to document (using examples modified documentation tests:
fn foo {
let x = 5;
let y = 6;
println!("{}", x + y);
}
Suppose we have a documentation requirement/heuristic of requiring the comment to have all the variables that are declared in the body of any given function. Then a comment like this would pass because whatever compilation step /processor sees that `x` and `y` both appear in the comment. // Prints x + y
This would fail because `x` is not found: // Prints z + y
This would pass but is not useful/misleading/wrong. // y - x FTW!!!
This example is trivial and only uses the one simple heuristic such that it is both onerous and useless, but it would force the writer of the code to also write comments in accordance with said heuristic. In this particular case, if someone modifies the variable name, adds a new variable, or removes and existing once, then the compiler would force that individual to make a necessary change to that particular comment such that the comment cannot become stale (but the heuristic is bad, so it could still be useless :) ).https://docs.python.org/3/library/doctest.html
For software with a command-line interface, perhaps it would be useful to do some testing at that interface, perhaps using BATS:
https://github.com/sstephenson/bats
That is also automatically tested, but describes the actual user interface.
Enforcing useful up-to-date documentation requires cultural setup work rather than technological setup work.
So say you have a function that essentially implements the "--file" flag: what if the developer put a comment above this function explaining the function's purpose but also the documentation for the admin's use case, which would be setting up the solution?
I believe that if such documentation existed it would be a lot easier to update it when the code is changed (provided the API changes) and have it propogate through to the docs. The comments could also be three tiered: API docs, admin docs, user docs; each would explain to the relevant user how-to make use of the code at that point.
Obviously you could omit user/admin comments for functions that aren't "public facing", such as internal helper functions. But anything that's directly interacted via a CLI flag or HTTPS endpoint could have the documentation right there by the code handling that interaction... or not if it's not relevant.
See "godoc" as an example of this: https://blog.golang.org/godoc-documenting-go-code
The code truly does become the documentation at this point, and acts as a central point of truth.
It's extremely long and almost impossible to read. It starts off as it means to go on:
Pktgen is a traffic generator powered by Intel's DPDK at wire rate traffic with 64 byte frames.
For that to work as a sentence, it needs the phrase "capable of generating packets" putting in the middle.A bit lower down it spends 200 lines showing what happens if you type "ls" in various folders on the developer's machine. Helpful.
It's fascinating to try to read because it's so mad.
If you are the author, I'm happy to provide some more constructive feedback...
Random obscure module: http://search.cpan.org/~prasad/X12-0.80/lib/X12/Parser.pm
OK so in the first paragraph, I know how to parse an X12 transaction file and get the results into my code.
This boils down to know your audience.
I think that's overstating things. He reported a "vulnerability" in Bugzilla which wasn't a security problem in Bugzilla because Bugzilla uses taint, which didn't do any database injection like he claimed, and which is unrelated to CGI.pm becaues Bugzilla doesn't use CGI.pm:
https://bugzilla.mozilla.org/show_bug.cgi?id=1230932
Furthermore, the examples in his presentation don't actually work, he relies on ignorance of lists and Perl data structures, and the one potentially interesting point he makes about calling functions in list context in hash initializers has been documented well understood as a potential mishap in web applications since 2000:
https://events.ccc.de/congress/2014/Fahrplan/system/attachme...
His presentation may have some value to someone spending their first week with Perl in a web context, but that person would have to wade through a lot of nonsense to get at that value.
>The build status identifies specific project aspects that are incomplete and/or causing instability.
>One or more badges showing code coverage or other quality metrics.
I really have to disagree with points like these. I always hate cloning a project and then opening the README to find a totally unreadable mess of Markdown links and images or worse still - literal HTML. As an example, look at uBlock's README.md[0], which even though uBlock is a fantastic project in it's own right, has a horribly unreadable README. If you're already adding a README file within your code repositoy, you should assume that people will read it locally, without fancy HTML rendering. The whole point behind markup was to have a syntax which could be easily parsed by computers and humans alike (it was inspired by the plaintext email formatting style after all!).
Graphics and badges should be put on a website, in this case for example GitHub's github.io service. Specifics should be placed in a man page or something comparable. Links should either be autolinks[1] or reference links[2], to keep the document clean and structured. I'm sure others could come up with more and better recommendations on how to use "normal" markdown to still create a decent README's for GitHub. Maybe we don't even need Markdown and we can just use plain utf-8[3]...
[0]: https://raw.githubusercontent.com/gorhill/uBlock/master/READ...
[1]: http://spec.commonmark.org/0.28/#example-565
[2]: http://spec.commonmark.org/0.28/#reference-link
[3]: I recently downloaded a dwm statusbar manager called "dstat" (from https://www.umaxx.net/) and it's README was a really nice surprise: https://sub.god.jp/f/JmiFHE9S.txt (extracted and uploaded, since there's no public version)
[1] https://dxr.mozilla.org/mozilla-central/source/dom/encoding/...
function markdown()
{
pandoc -s -f markdown -t html "${1}" | sed 's/^<pre class/<p><\/p><pre class/' | lynx -stdin
}
... which doesn't really address your main complaint, but can help in cases where you really don't want to exit your command-line.Requires the pandoc package, which isn't installed by default in Ubuntu.
Neither is lynx, since you mentioned it.
Neat trick :).
Shame that the history of the maturity model looks like this: https://github.com/LappleApple/feedmereadmes/commits/master/... Even when editing in the web UI you can - and should - set a commit message so one can actually understand how a document evolved without going through the diffs.
https://github.com/wine-mirror/wine/commits/master
During the short time I contributed to Wine, I really got to appreciate their high quality source control discipline.
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messa...
https://robots.thoughtbot.com/5-useful-tips-for-a-better-com...
https://en.wikipedia.org/wiki/Outside%E2%80%93in_software_de...
http://blog.estimote.com/post/119525082855/user-stories-on-s...
http://en.tldp.org/HOWTO/Software-Release-Practice-HOWTO/dis...
https://www.gnu.org/prep/standards/standards.html#index-READ...
Also, while I'm sure there's a gigantic amount of rather useless repos on github (I contributed my share...) doesn't mean that it's not a good idea to have guidelines to write usefull READMEs for projects that do matter.
Compare 0.x (before): https://github.com/callemall/material-ui/blob/master/README....
With v1-beta (after): 1.0-beta: https://github.com/callemall/material-ui/blob/v1-beta/README...
The full license can go into a separate file, but a paragraph like "This project licensed under the GPL v2 license. See the LICENSE file for details" can be extremely helpful, and is missing far too often.
These levels are known to Discordians as Chaos, Discord, Confusion, Bureaucracy, and The Aftermath: https://en.wikipedia.org/wiki/Principia_Discordia
Does someone know any projects that have this?
https://github.com/jehna/readme-best-practices
You can use it to quickly go through most common information you should include in your own readme.
It's missing a TOC though, scrolling through it doesn't give an overview what it contains.
In Jekyll with kramdown you can use {.toc} to get an automatically generated table of contents.
On Github this doesn't exist, so you have to use an external tool like https://ecotrust-canada.github.io/markdown-toc/ (Google "markdown generate TOC" for alternatives)
Including table of contents in your README is pretty big overhead if you cannot generate it automatically. This template is meant to be a good starting point for any size of project, so it was a conscious decision to leave table of contents out of it.
If you are doing TOC manually in Confluence you are doing it wrong by the way: Both TOC or links to subpages can be done automatically.
https://github.com/billmalarky/react-native-image-cache-hoc/...
It's pretty much the first time I've put effort into trying to make a README before since I'm now trying to make good documentation a serious development habit.
I'm still adding coveralls but I'd be interested to hear anyone's feedback.
It's missing a TOC though, scrolling through it doesn't give an overview what it contains.
To add to the README discussion, I made a small website a few months ago for README guidelines, though it's more geared towards beginners: https://www.makeareadme.com
I've seen too many README files that leave that out. Knowing what changed in the latest point release doesn't help me if I don't know what the whole thing is for.