Especially for those with high rep totals. How much of the time do you know the answer off the top of your head? Or do you have to spend a good deal of time googling or looking up in other references the answer?
Most of the time I know at least the basics of the answer off the top of my head.
What I look up is:
- The exact details of a method in the answer, if I can't remember the capitalization, or the order of the parameters etc
- Links to methods, types etc
I will often post a basic answer, including a code sample, and then go back to improve the answer by:
- Making sure the code compiles and runs appropriately
- Adding links
- Adding caveats for corner cases
I relatively rarely have to research an answer from scratch, if you see what I mean.
It really depends on the question, of course.
- there is a lot of combined knowledge from the ghosts of projects past - so it is often possible to answer purely on that
- but some of us love challenges (and learning) - so we'll (when we have time) pick up something far outside of our comfort zone and try to find the answer - which might involve either searching or playing in an IDE
- if anything, digging out appropriate supporting hrefs is sometimes a bigger challenge than answering the question; "here's how I know (from experience) it works... if only I could prove it from an official source"
I often know the solution in my head, but not necessarily the exact code if it is related to SO. The other sites is simply knowing what the solution is. However as a rule I always try and post an answer with an external reference, so even if I post quick answers the chances are I will come back and post a link to an external source confirming or verifying the answer.
So I would say most of the time.
The fundamental difference with SO and the other two sites are that a lot of programming answers, although available on the net, are not easy to understand. Often it requires someone to provide a detailed explanation, and often it also has various interpretations.
On SF/SU the answer is almost always specific, since you are dealing with a hardware or software issue. Chances are very often there is information on the internet already, it is just a case of finding. On SF experience has a lot to do with the answer, and you often know because you deal with the problem regularly or had to deal with it the hard way. I trust a source more if they provide an external link, rather then just providing a guide. There is cases however where step-by-step instructions that work are good enough.
A lot of the time I know that there is a solution, but have to look it up in Visual Studio or via Google to get the correct syntax etc.
I think that's the key - if you know there's an answer it's (relatively) easy to find using the existing resources, but if you don't know there's an answer you just have to ask someone.
If I can't definitively answer off the top of my head, instantly, then I don't even answer. I'd love to do the research and figure things out or even confirm things I'm not completely certain on, but I don't have quite that much time...
I'm predominantly a C++ guy, and have the standard handy in PDF form. I might also look at a book or two on my desk. Aside from that, I wing it.
Most of the time my brain has a fuzzy idea of what it thinks the answer is, but more not my fingers remember a good deal. Once I've typed out a bit of the code I know enough to answer. If my fingers don't remember it all then I end up looking things up.
So I'd say about 50-60%. But then again I haven't answered that many questions.
It depends on the question. For most stuff I know more or less what to do, I just have to double check the API / documentation or write it up in an IDE that gives me code completion. For a small set of questions I'm able to write up an answer from a mobile device, even getting those long Objective-C names and constants right.
That said, I don't think having to look up information, try things out, write some code, etc. to figure out an answer it a bad thing. It's the opportunity for you to not only share your knowledge but to learn something new yourself. At the very least you are refreshing your memory.
On the topic of learning, not all learning is about reading the documentation or googling for other existing solutions out there. Sometimes when you see a question out there you have a crazy idea of how to solve it and for your own sake, want to try and implement it to see if it works. These questions are very rare but they can result in some crazy answers that the OP probably wasn't expecting.
Keep looking up information, that means that you are learning. The more you have to look up or try out, the more you are challenging yourself ;)