Comment by dmunoz
12 years ago
I think the library is great, and don't have a whole lot to say about it, but wanted to mention one tangentially related thing:
The README on this repo is awesome. Opening up with advantages and disadvantages? Awesome. Plenty of code examples covering all of the major use cases? Awesome. Quick overview of the internals? AWESOME! Quick two line note about how to use the library in your project? Awesome.
I'm tempted to rant about how I wish documentation was taken more seriously, and that programmers seem to make it a point of pride that spending the first half hour with a library figuring out how to actually use it is just something we have to deal with as programmers, but I won't do so aside from this single sentence.
man pages used to be treated with the same reverence, but nowadays nobody seems to bother. I have pretty extensive man pages for some of my open source stuff, but it doesn't seem to help with users downstream.
Don't get discouraged; people who greatly appreciate a well written man page are still around. They're the users you might not hear about because the fine documentation actually helped them. :-)
Very much this.
To the parent commenter, THANK YOU!
/signed someone who uses man pages all the time and seriously appreciates ones that have had thought put into them.
I used to be quite okay with command line help for small tools, but ever since I discovered http://explainshell.com/ I have a new found appreciation for man pages.
To be honest, I pretty much hate man pages.
They almost never have examples(Is that some sort of rule?), they have no "quick summary of the shit you use 95% of the time", and they get generally written as a novel, seemingly from the perspective of the developer of the util rather than consumer.
Mind you, I have used man pages many times before, but only because it was the best source of information, not because it was a particularly efficent one.
The Markdown README of this string library is a thousand times better than any man page I have seen.
man pages start with the function prototypes, that's your "quick summary".
Near the end there can be an examples section, and many man pages have one. If I run "man 3 open" I see a reasonable examples section.
I like manpages because I'm already editing or running programs in the terminal, and I can pop open the man page in the terminal quite quickly and conveniently, without a search online or even a single network request, without reaching for the mouse, etc.
Come try OpenBSD sometime. They take man pages seriously.
http://www.openbsd.org/cgi-bin/man.cgi?query=strlcpy
Man pages are bad but mostly useful
INFO pages on the other hand, are terrible. Is there something less intuitive than the Info reader?
Navigation is awful
I think the RHIDE IDE had a better Info reader, IIRC, that one was useful.
7 replies →
"They almost never have examples(Is that some sort of rule?)"
They often have examples, though this is certainly better represented in some areas than others. One I looked at just the other day, man 7 aio, is 334 lines. Starts out describing the various aio functions and structures under DESCRIPTION, and has an EXAMPLE section: http://man7.org/linux/man-pages/man7/aio.7.html
Or, also off the top of my head, man 2 signalfd, 196 lines with example code: http://man7.org/linux/man-pages/man2/signalfd.2.html
Certainly there are man pages that aren't up to snuff (fix 'em!) but good man pages exist and many are great!
That would be because GNU decided that man pages weren't good enough for them and decided to use info pages.
Github READMEs in Markdown are the new man-pages.
Which is unfortunate, because the majority are either extremely terse, and/or merely consist of installation instructions, so that the information content is nowhere near as high as an average man page.
At least in my experience; maybe I've just been repeatedly unlucky.
I doubt it, though, because there isn't any standard template for them, unlike the situation for man pages, which have a number of standard sections that people generally copy.