August 12, 2015
No, not StackOverflow, but close. When I am searching for an answer—and just programming-related ones—I do tend to end up somewhere in the StackExchange universe. A big reason for this, I think, is the value those communities place on asking good questions.
What makes a good question? The two guides below describe how to ask good StackOverflow questions, but they contain lots of good tips for asking better questions in general:
Good questions tend to have these features:
Just enough context: A little background information on why you are asking a question can go a long way. It may turn out that, given the bigger problem that you are trying to solve, you should be taking a different approach altogether. Unless you elaborate a bit on the context, nobody will be able to point that out to you. On the other hand, too much context will just add noise, causing a lot of potential answerers to zone out and move on.
High specificity: A very broad, open-ended question puts a bigger burden on anyone that might want to help you, lowering the chance that you’ll get a good answer. A question like “Are random forests good?” is so terribly vague that any sufficient answer has to be ridiculously long and comprehensive (or cute but worthless, e.g. “It depends.”). It will be hard to decide which answer is best. It’s a pain for everyone.
Good questions are phrased naturally lend themselves to shorter, more direct answers. Something like “Under what conditions would you use random forests over regularized regression for predicting a continuously valued outcome?” doesn’t require much interpretation and can be reasonably answered in a couple bulletpoints. You’ll quickly get an answer, and the answerer will quickly get some rep. Everyone wins!
Reproducible code or examples: When possible, providing some snippet of code that an answerer could use to reproduce your issue will save everyone a lot of hassle. It lets them see exactly what you are doing, allows them to tinker with your code, and lets them return a solution to you as a modified version of your original code. It also allows your code to be run by several other people, which can help determine if its your code or something else in your environment that’s causing the issue.
Luckily, so many questions have already been answered in places like StackOverflow that you’ll often be able to find an existing thread about your own problem. When I can’t find an existing answer, I’ve found that the act of describing my problem—in context, very specifically, and with an isolated code sample—can be extremely helpful. Several times, I’ve solved my own problem during the process of preparing a good question. Boiling down my issue in a way that’s easier for others usually makes it easier for me to understand, too.