The “Smart” Method: Why is it Important for Software Engineers?
When asking a question on stackoverflow, you probably want to receive helpful answers and solve the problem you’re having with your code as efficiently as possible. How you phrase your question and the detail provided can have a big impact on the answers you receive. The smart method, written by Eric Steven Raymond, gives us some guidelines on how to do so.
There are two main parts to asking a question: “Before you ask” and “When you ask”.
You should search for answers first. Make your best effort to find the answer from existing resources on the web, manuals, etc. Next, show what you have already tried and what you already know. Take your time and search keywords related to your problem. Finally, prepare your question, avoid wrong assumptions and be of the mindset that you need to earn your answers by providing a solid question.
Choose the right forum, and abstain from asking inappropriate or off topic questions. Try not to post the same question to multiple forums at the same time, and make sure you have an understanding of the topic first and use the correct tags: don’t post a question about C++ in a javascript forum. You should spend some time understanding the layout of stack overflow so you know where to properly place your question.
This all seems pretty reasonable, nobody wants to spend an unnecessary amount of time trying to decipher somebody’s poorly articulated questions. It does seem moderately blunt, but there are some questions that could have been answered better had the smart method been employed by the author.
Here is an example of such a question, posted on stack overflow in the javascript forum:
“How do I check if the value of an input is a number using jQuery”.
The body of this question is one sentence:
“I need to check if the value of the input consists of numbers(0-9). Thanks for helping.”
While the person asking this question is polite, they do not provide much information. It seems as if the first thing they did is post a question looking for a quick answer as opposed to looking anything up themselves. According to the smart method, this question could be improved quite a bit. The author does not provide whether or not they have searched for an answer already. If they haven’t, it’s possible the information was readily available with a little bit of effort and the question is unnecessary. Next, there is no indication that the author demonstrated any effort. What have they tried? Perhaps they could provide some code and indicate where they got stuck. At that point they could ask a more specific question. And, if they have searched google, they could state so in the question.
Now, there are many examples of good questions on stack overflow, and they seem to get more engagement, usually with helpful answers. Here is another question asked on the Java forum:
“Why is processing a sorted array faster than processing an unsorted array?”
The body of the question provides much more detail than the first example. They start with a clear description of their question, and then provide code for both Java and C++, where the results were different. The author structures the question clearly, and it is apparent that they took time and did research before posting. They avoid wrong assumptions, by stating their initial thought process about caching and why that does not make sense. They do not explicitly state that they already searched for a solution on google or elsewhere, but the complexity implies that they have done research on their own. There is no entitlement assumed, just curiosity.
While these are anecdotal and it does not “prove” the smart method, it is clear why the second question would attract more responses. The first seems almost lazy, polite but as if the author just wants a quick answer without any effort on their part. This can be perceived as entitlement. The second post is professional and follows most of the smart guidelines, they took their time to provide a well structured question.
All in all, you can do no wrong following the smart guidelines. I don’t think you have to take it as the law, but by employing these methods you will certainly increase your engagements on posts and solve your coding problems faster, which in turn will make you a better programmer.
Source: Not so good
Source: Good