Everyone needs to ask a question at some point in their life. However, it is undeniably true that how you ask the question affects the results you get in return. For instance, a question without enough necessary context will ultimately confuse anyone reading it, or will lead to conflicting responses. Asking a smart question, on the other hand, will likely get you a more specific and tailored response. By asking bad questions, you waste everyone’s time, including your own. Smart questions enable software developers to get their problems resolved quickly and as a result complete more work. More information on how to ask smart questions can be found in Eric Raymond’s original essay.
Two real questions from Stack Overflow will be compared to exemplify the differences between good and bad questions. In the bad question, the inquirer generically asks why their code doesn’t work “in switch case.” In the body of the question, they go on to say that the code does not work with a switch case, but is working normally. If you are like me, then you are likely already confused by the question. Not only is the question asked with poor grammar, little context is provided to the intended purpose of the code. This is reflected in the responses as well. Several people asked for more context, regarding what the question means by “working normally” and what the desired and actual behavior of the code is. To make matters worse, the original poster made the same mistakes when replying! Another user made an attempt but likely didn’t answer the question either due to the lack of context.
On the contrary, the results for the smart question were much better. This question was asking why processing a sorted array is faster than an unsorted array. The smart person described their question clearly with good grammar and language. Furthermore, they explain their results testing processing speeds in different languages. The code has an explanation and everything in the question is easy to follow. The responses for this question were much more detailed, well put together, and focused on answering the question to the best of the writer’s ability. One answer even included an analogy with railroads to explain the answer in a more understandable way. Overall, there is evidently much more time and effort put into each response.
There is a surprising amount of poorly asked questions on Stack Overflow. I’ve learned that smart questions generally get you more responses that are thorough and answer your question better. In addition, the overall tone of the responses tends to be more discouraging when you ask a question poorly. It’s best if I ask smart questions with enough detail and context in order to make the best of mine, and everyone else’s time. To top it off, I learned a lot about how I can ask smart questions in the future, which will be crucial in my career.