Questions are how we as humans ask other fellow humans for help on certain topics, and there can be questions on just about anything. Questions are important for everyone, but specifically Software Engineering is a topic where there are always plenty of questions. However, not all questions are the same. Obviously this is the case because questions can pertain to a wide range of areas, but in particular, I meant that questions are not the same in the sense that questions can be different depending on the way they are conveyed. This brings up the main point of this paper, which is trying to understand how to ask questions the smart way. In the field of Software Engineering, smart questions are the best way to get the help you need from others as fast as you can. By asking smart questions, you effectively and efficiently convey to the user(s) that you are asking for help and you set them up in the best situation that allows them to give you that much-needed help. With that in mind, we know asking smart questions is especially important for software engineers as we need to ask smart questions in order to get the answers that we seek. If we do not ask smart questions, we may get wrong answers, irrelevant answers, or even answers that are just nonsensical, which is why we ask smart questions in the first place in order to avoid these types of answers.
To understand how to ask smart questions, we must first look at examples of questions that have already been asked and determine whether they are smart questions or not. Say we use question 1 and question 2 here as our examples, and henceforth, I will refer to these two questions as question 1 and question 2. For question 1, the original poster is essentially asking which comparision operator (== vs ===) should be used in Javascript, and they wonder if there is possibly a performance benefit for using === over == as JSLint keeps suggesting them to do so. As for question 2, the user is questioning memory allocation in their own code as they are running into a segmentation fault.
Now that we know the general context of both questions, we can now start analyzing them to determine which one is a smart question and which one is not. When seeing questions specifically on Stack Overflow, one of the first things that pops out at us is the subject header of the question, as it is typically bolded and at the top of the page. For question 1, the subject header is “Which equals operator (== vs ===) should be used in JavaScript comparisons?” which is concise and to the point. It summarizes exactly what the user is trying to convey to their audience as they ask for help. Question 2, on the other hand, has a subject header of “Memory allocation wtf” which signals to the user that the question is about memory allocation but no other specifications other than “wtf” are provided which likely just signals that the original poster was frustrated. By comparing these two subject headers, we can clearly see that question 1 follows the smart way of providing a subject header while question 2 fails to do so.
Another thing to look at is what the question itself is actually asking, and typically the “main” question is found at the end of the post, serving as somewhat of a summary to the users who look at the post to try to help the original poster. In question 1, the question is “Is there a performance benefit to replacing == with ===?… If no type conversion takes place, would there be a performance gain over ==?”. For this question, the user is clearly stating what they wish to have answered, and this gives the users reading the question a good chance to do so, as the question itself is precise yet informative and, in other words, explicit. In terms of question 2, after the user posts a couple of sections of code which is neither precise nor explicit, the ending statement is “Please tell me what I’m doing wrong I’m going insane”. This is a perfect example of how not to end a post about a question you are trying to get the answer to. This ending statement does not give the user any indication of the question that the original poster wants answered, and it is not meaningful or informative in the slightest way.
After looking at the questions themselves, it is now time to take a look at the responses to those questions to see how they reflect the questions that were asked. For question 1, the most upvoted answer gives a clear and detailed explanation on the differences between == and ===. To sum up the answer, the user puts the main idea of their response at the top as they say “The strict equality operator (===) behaves identically to the abstract equality operator (==) except no type conversion is done, and the types must be the same to be considered equal.” This tell us that the main difference between == and === is that === requires type and value to be the same while == only requires value to be the same. This part of the answer, combined with the rest of the user’s detailed explanation, demonstrates the answer to a smart question. We can clearly see the user was able to identify what the original poster was looking for from their question, and as a result, the responder was able to give an answer fitting of a smart question. For question 2, there are various answers and some of them include “Why did you make the changes that you did and why did you not undo them when you found that they had issues?” and “What are your programs supposed to do?”. As we can see from these parts of some responses to this question, we can clearly see the original poster did not ask their question the smart way as the first responder questions the course of action that the original poster took, while the second responder is not exactly clear on what the context of the question is. When given these types of statements in response to a question, one can tell that the original question was not asked in a smart way and leaves room for improvement in terms of learning how to ask questions the smart way.
After going through these questions and the responses to the aforementioned questions, we can takeaway a couple of things pertaining to smart questions. The first main takeaway is that when asking questions the smart way, if given the chance to provide a header, it must be one that is meaningful as it must relate to the overall context of the question, but it must also be specific enough for the user to gain a general understanding of the direction of the question before reading the entire post about the question. Another takeaway is that smart questions themselves must also be informative but also precise in what they are trying to convey to the user. We want to give the responders as much information as we have in order for them to replicate the problem if needed, but we also want to make sure we do not overload them with useless information that provides no additional value to the question at hand. Being able to balance on that fine line is one of the major keys to asking a smart question. The last main takeaway about smart questions is that smart questions will almost always have smart responses. By smart responses, I mean the responses reflect the questions themselves, in the sense that they are also informative in order to give the original poster all the information they need to answer their question, but also precise at the same time thus allowing the repsonse to give the original poster exactly what they need, no more and no less.