Ask HN: How to RTFM?
I have seen dozens of times that people direct to the language manuals etc. to understand something in depth. I am a new college grad working as a Software Engineer and I mostly reference the manual when I cannot find something on Stackoverflow or some blog.
Whenever I have tried to go through the manual, the kind of language used has diminished my interest and ended up in my giving it up. Also, I don't have an eidetic memory, so I don't see how manuals can be useful in the real sense but I really want to go in depth of some topics like PostgreSQL, Spring, Javascript, Python etc.
It would be great to hear if someone actually reads the manual and is able to successfully apply it in their lives...
46 comments
[ 3.1 ms ] story [ 117 ms ] threadIf you find yourself five levels deep in this process and still unable to comprehend what you’re reading, you need to take a step back and ask yourself if you do in fact have any real understanding of the technology you’re using.
... in which case, you are in exactly the right spot to learn the fundamentals of whatever you're trying to learn :D
One reason why I value (good) manuals is precisely that they are not simply a how-to-do-X-with-Y tutorial. Instead, a good manual will explain the theory behind what you're trying to do - and so leave you in a much better position to solve future problems on your own. Because now, you actually understand what you're doing.
I rarely read manuals. Except for roleplaying ones back in the day.
Is it a matter of time to focus for a long time on one task?
For Android, the unofficial manuals are better, or even Stack Overflow.
I've seen some very well written manuals though. Facebook seems to be good at it at least.
Uh, I thought everyone does.
>I don't see how manuals can be useful in the real sense
I'm...not sure how you can say this. Maybe you mean, reading a manual cover-to-cover. I don't think "RTFM" means that. Don't read the whole thing if it's boring! But I find once I'm well into using/learning some piece of software, and want to know everything, reading the entire manual is fascinating. Plus they vary in quality and readability. The python docs are extremely readable..aren't they? (especially if you have a high tolerance for Monty Python gags). Man pages mostly suck for learning software the first time, but are brilliant for refreshing the memory. Mostly, I google lists of the best books on a subject, and read as many of them as I can get my hands on. If I'm not enjoying one, I turn to another.
One of my favourites is Symfony, their documentation is phenomenal (right up to the ability to generate a beautifully formatted ebook straight from the docs).
https://symfony.com/doc/current/index.html#gsc.tab=0
The structure is inviting, nicely thought out, makes it easy to get into from multiple points and well written.
Also I really appreciate they have a good "Best Practices" section, too many frameworks give you a lot of flexibility without any overarching "We suggest you structure it this way" which means that you can pick up two projects based on the 'same' framework and they bare little actual resemblance to each other.
That matters when you inherit someones codebase/decisions.
> Uh, I thought everyone does.
... have ... have you ever met another programmer?
These days? Not so much. Stroustrup is now big enough to use in self-defense. I'm not sure there ever was an equivalent book for Java. (There is one for Go, however.) React? Angular? TypeScript? Do they have authoritative books? If they do, is that the canonical way to learn them?
I think something changed 20 years ago. The book used to be the way to learn, and now it's not. I don't know if the programmers changed, or if the languages changed, or if the books changed, but something did.
I'm not sure how it compares to those works of the past (perhaps less detailed?), but I found it much more approachable than most languages' documentation and more in-depth than most languages' tutorials.
The old ways may not be entirely lost.
Recently I got into LaTeX, read almost every book on LaTeX + TeX available (a couple of dozen), all very good. Got into Prolog, (about a dozen books), all very good... All the books on AWK are great. Same with Lisp. Sure, Stack Exchange is a wonderful resource, hard to imagine doing without it. It's like having a teacher - read the books, then consult the teacher for questions that you can't immediately find answers for in the book. Some things are done better online: bash has a few great websites, and w3schools is great for css/js/html.
I thought no-one does!
:-)
If I'm grabbing for the manual in the first place, I've found it's mostly to search for an answer to "Can I do x in y context without having to code it in the way I know works but is exhaustive, bloated, and a waste of my time".
I ran into this last year with an XML parsing library; I wanted to do something so simple yet the library appeared as if it couldn't - parse incoming XML payload - but the library's manual only discussed parsing XML as if it were fully formed and from a local file, which is only applicable in a fantasy world. It seemed very odd to me that the library would have its own routines for local file loading, so I assumed it was required and I would have to write incoming XML to a file and load it every time. Then I looked at the source code to the library and discovered the author had coded it specifically so that newbies could use it and not be affected by XXE attacks. Now the library specifically mentions this in its tutorial, but not in its manual, so I never saw the bloody thing.
I wasted a whole day for something that could have been mentioned in the "manual".
I think it is impossible to read those things and still be ahead of the curve on what is happening with software and things in general. Very time inefficient way of learning things. Try to learn by practicing and knowing where to search when problems happens, learn how to debug problems in real life effectively, because that's what you will do on your whole career.
It was a point several years ago that I was looking for a "better" solution to something I was doing. A bunch of Stack Exchange answers on the topic each had a different way of doing it, and each was as complicated as my own solution. Over the course of years, people tried to make the solution better.
Then I noticed the very bottom answer, below some dozen others. Posted about a month before my search.
It was one line.
The individual just posted the one-line answer and a link to the manual.
It was part of the standard library.
And had been SINCE INCEPTION.
It was at that point that I began to RTFM. There are good manuals and there are bad manuals. But one thing I've noticed is that for most libraries, it is absolutely invaluable to be able to have a high level picture of what's available. It has completely changed the way I code, now.
First, read a few hello world tutorials so I can wrap my head around the gist. Then RTFM. Then maybe read a book about it if I want a good idea of best practices. Only then do I search SE or other online sources.
Which I now rarely have to do, for the things in which I RTFM...
The first google result is a blog post [1] from some guy. It's helpful, but really dilutes the core material. So instead I just went directly to the angular docs [2]. This was straightforward and gave me the info I needed to know.
Now CLI manuals from tools created in the 80's and 90's? Those are trickier. I'm still trying to learn a good way to grok those tools, but so far blog posts and Stack Overflow have been better than the man files, in my experience.
[1] https://toddmotto.com/angular-ngif-else-then
[2] https://angular.io/api/common/NgIf
90% of the benefit of a manual is knowing that a thing is possible the other 10% is the manual telling you how that thing is possible.
I do the same thing with man pages, I just scan down them, I don't care about the minutiae at that point but it's handy to know.
(blinks)
Open to page one. Engage eyes. Parse words.
For programming languages I always add the standard library reference into my browser's search engines. For example, I can type "kt mutablelist" into my address bar to go straight to https://kotlinlang.org/docs/reference/?q=mutablelist&p=0.
When I open most manuals pages I may as well be reading 'ᐅᒥᐊᕐᔫᑉ ᐳᓪᓕᓕᒫᐸᒐ ᑕᑦᑕᕐᓂᖅ ᐊᒻᒪᔭᖅ'
It does nothing for me. I am seldom any smarter afterward.
These people don't understand there are different brain types, and only ~25% are read/write brain types.
Couple that with the fact that many in technology write in a broken, sterile form of English that any grammar correctly immediately flags as wrong.
No, the 'RTFM manual' people are typically extremely left-brained, analytical, black/white people who have no ability to see from others' point of, and often little desire to do so.
</endRant>
For that reason, I would say that the amount of time I spend reading documentation is significantly less than then amount of time I spend reading the code.
For documentation authors, I'd recommend focusing on giving the reader the high-level context necessary to understand the code. It can be hard to dive into that. But things like "an error will be returned if these 86 conditions are true" probably should be a reference to the code, because you know there are going to be 87 conditions tomorrow and you'll forget to update the documentation.
As for your actual question, it can be hit and miss as to whether or not you can go into depth in something by merely reading. I have not found a book about modern Javascript ("use the axios library to make HTTP requests from your code") and just have to cobble things together from existing code, googling for the current problem I'm having, etc. I imagine that sucks for people new to the field, but I suppose is why you get paid for having experience. For things like SQL, you can definitely find a book about it, as it's been essentially the same for my entire life, and what really matter are the fundamentals of relational databases... the Postgres-specific things you will probably discover while doing some work.
So I guess what I'm saying is... focus on getting experience. If you tell yourself, "I want to write 'foo' in Javascript" you will learn Javascript somehow. It's not as easy as just reading something, but it will stick with you forever. And when you run into the inevitable obscure error message, realize that you can just read the code to figure out what's actually happening. You need not be dependent on a secondary source when reading the primary source works. Because someday, you will be paid to work on code without documentation, and you will need that skill.
There's a bunch of different types of documentation, and being able to skim them enough to get a basic understanding is super helpful! A non-comprehensive list of different types of documentation includes:
- man pages
- REST API docs
- Language docs
- RFCs
- Tool specific docs
Let's get specific.
- Say you need to find a way to filter text in a Bash shell, and you want to read the man page for grep. Maybe you want to read https://www.tldp.org/HOWTO/Man-Page/q3.html to start understanding this... 'grep [-abcdDEFGHhIiJLlmnOopqRSsUVvwxZ] [-A num] [-B num] [-C[num]] [-e pattern] [-f file] [--binary-files=value] [--color[=when]] [--colour[=when]] [--context[=num]] [--label] [--line-buffered] [--null] [pattern] [file ...]'
- Let's say you need to want to better understand how JSON works because you are working on a networking library. Maybe scanning https://www.json.org/ will help you read this https://tools.ietf.org/html/rfc8259.
- Let's say you're reading API docs for Artifactory, and they your not sure how REST works, but they keep talking about it. Maybe scanning https://en.wikipedia.org/wiki/Representational_state_transfe... will help you read https://www.jfrog.com/confluence/display/RTF/Artifactory+RES...
I identify with your pain. Reading docs is hard, especially when you're diving into unfamiliar problems with unfamiliar tools. All I can say is that you just keep pushing yourself to get better at it, and if you're lucky, maybe you'll be fortunate enough to work with people who can help make the learning curve less steep. There's no shortcut to getting to where you want to go.
A few tips & tricks that make things less painful for me:
- getting high level context by watching short YouTube videos makes it easier to read denser material that is hard to absorb
- working on things that interest me makes reading dry documentation a lot easier
- building something at the same time I'm reading docs makes it a lot easier to spot errors in the docs & gaps in my understanding
Keep pushing. It's always going to be hard. You just get better at working on hard things :)
I read the Unix manual from cover to cover when I started out. As I went through it I'd try the commands. Often there were short examples.
This was when there were only a couple of hundred pages though.
Regarding the language -- usually it's not only too terse but badly written. However the classic books e.g. Kernighan & PIke's UNIX Programming Environment are excellent.
You also need to be comfortable with stopping at a certain layer of abstraction and mostly trusting that abstraction holds. For many programmers (including me) I suspect that's the model of a computer presented by C. I don't really bother to try to understand much of what's underneath this model because time and my brain is regrettably finite. I just know more or less what it's meant to do and trust it works. (Trust that, as evidenced by Spectre/Meltdown, is unfortunately misplaced, but still – I'm only one person.)
If I had to attack trying to understand, say, PostgreSQL, I would find out what sort of thing it is (an RDMBS), what sort of ingredients that has (a network protocol, a query parser, fundamental data storage structures, etc) and fill in detail as my interest takes me. There's always going to be more to learn about – these are massive subjects – so it's always going to be piecemeal.
(1) If you're getting conflicting advice from blogs and stack overflow: this is often the case when software is changing fast. Manuals are often explicitly versioned to match the software, so if the manual covers the topic you care about, going to the latest manual is a great way of figuring out which advice is current.
(2) Skimming the index: a quick way of discovering topics you can then explore in more detail either in the manual itself or through follow up googling.
(3) A manual you know and love. Over time you get a feel for which manuals you interact with are good. If a manual is good and you've gotten comfortable reading it, it's often faster to find the answer you're looking for by searching the manual directly rather than wading through a google search.
What I do is first take note of whatever seems like a Table of Contents which neatly lays out this tree-like structure with one-line summaries. Pay attention to each title, remembering their existence for future reference, and determine how much you want to know from the get-go. Of course, the root/trunk, otherwise known as Overview or Introduction, will be relevant to everything so go over it. Only go to the deepest branches/leaves when you're planning on using that knowledge, but always go over the branches that lead to those leaves.
That about covers it. For example, there was recently a question on SE on what had higher precedence in the shell, the | or the &&. Had this person gone over the shell grammar section of the bash manpage, the answer would've been obvious:
> Pipelines: A pipeline is a sequence of one or more commands separated by one of the control operators | or |&.
> Lists: A list is a sequence of one or more pipelines separated by one of the operators ;, &, &&, or ||, and optionally terminated by one of ;, &, or <newline>.
By the way, some answers say that you shouldn't go over the manual unless you want to know a detail, but I think it sometimes pays off to read it whole (or most parts of it). I've read most of the manuals for vim, bash, i3, urxvt, among others, and I can say, it has paid off. This might depend on how you learn best, though.
Yes they can be! And if you're working a great deal with some technology, it behooves you to read the manual from cover to cover. Try it!
I've read a number of programming language standards from cover to cover, after which my facility greatly improved.
After I read the GNU Make manual from cover to cover, I was able to understand complex Makefiles like never before, never mind generate them from scratch.
At university I read a Motorola 68000 architecture spec from cover to cover (while writing an emulator). My ability to code MC68K assembly shot through the roof.
I haven't read the entire POSIX standard cover-to-cover (not even the much smaller classic 1990 version), but sections of it, like the complete description of the Shell Command Language. My ability to write robust shell scripts shot through the roof.
I've read the complete manuals for GNU Flex and Bison, plus the POSIX descriptions of these and other materials. Complete whiz here.
Highly recommend cover-to-cover. Problems is, standards have gotten a lot thicker. Everything takes more time. You have to choose wisely and prioritize.
> branches explaining various features in broad terms and ordered by their importance, and the leaves explaining the most arcane details you might eventually need to know about.
That simply isn't how most technical manuals work. Once you get past the intros and overviews, the arcane details are spread throughout all the descriptions like raisins in a pudding. Generally, the description of a specific feature or construct is completely given in one lump, with all the arcane details. If there are four paragraphs, the first two may be general, the second two full of arcane details. If you don't read the arcane details, you could be screwed. Oftentimes, you're reading this stuff because of the arcane details, not because you don't get the gist of it.
For programming languages, the thing I find particularly helpful is a formal grammar as it typically resolves any syntax related issues (and often these are subtle issues where two terms look similar written but one may be more restrictive than the other). The other thing I try to do is build a mental model of the compiler: If one has a good idea of what sort of thing one’s code might be compiled to, it is more obvious what constructs should and should not be allowed. This can backfire slightly: if one has an idea that eg Javascript will be compiled to fast code, it is obvious that the with construct should not be allowed, but maybe that just implies that the construct makes code slow.
I think this can help to understand eg why virtual methods are slower to call or why overloading works the way it does in an oo language, or eg why only certain subtyping operations should be around (in particular one way to decide this is “this language has certain typing rules and those demand certain constraints” Another is “this language wants to compile this construct to a certain thing and that requires that certain obvious constraints must follow”
[1] https://beej.us/guide/bgnet/html/multi/index.html
If you're finding that TFM is just too dense to get through then you probably need to start learning/understanding the building blocks in whatever way works best for you (online courses, wikipedia, more reference manuals, tutorials, etc).