There are many different ways to ask the same question. Some of these ways will be better than others, and better questions lead to smarter results and more concise answers. As a developer, it is very important to know what these types of questions are.
There are types of questions known as smart questions that dictate how developers can ask questions to get better answers. Eric Steven Raymond wrote “How To Ask Questions The Smart Way,” so that developers can get better answers to their questions.
These kinds of smart questions show that the person asking the question has already tried certain things, but yet still needs help. This can be shown in many ways, including that they can show their own effort that they’ve read other things and documentation to try to solve the problem, examples on what they have alread tried, context on how it happens, through their code or steps to reproduce the problem, and most importantly, what they cannot figure out about their issue and what they need help with. This kind of format in questioning can lead to better answers to the question.
I searched StackOverflow for a good example of this kind of question and I found an example of what could be a smart question at this link: how to change content-security-policy frame-ancestors for a static webpage using iframes
In this example, this person is trying to modify the Content Security Policy of a static website so it can be embedded in another site using an iframe, but they cannot figure out how to change the frame-ancestors directive on their hosting platform, which makes the site display in a way it is not supposed to.
This question is efficient in the way it clearly states the problem, and asks for a clear answer. The title is specific, showing clear insight into the problem, there is context bheind where they are hosting the site, what their goal is, and how they have tried to fix the problem, what they expected vs what is happening, and there is clear code for others to examine to help diagnose the problem. The main point here is that this person is showing effort that they tried to fix the problem, got stuck on a certain part of the problem, shows what that part is, and asks for a clear fix on where the problem is.
It is clear that this person asked a smart question, and can get a smart answer because of how the question is set up and the information they provided. Smart questions like this will give smart answers that are important for developers and their workflow to be more efficient. One person gave a clear reply to try to fix the problem, but it appears that this problem cannot be fixed with code, and was instead recommended that they “open the external link in a new tab instead of trying to frame it,” which is a clear solution to his problem.
I further searched StackOverflow for examples of bad questions and found an example of the opposite of what can be considered a smart question, found at this link: Why doesn’t my insertion sort implementation work?
This person is trying to implement insertion sort in Python for practice, but the output of their code appears to not be in the order they expect. They provide code, but limited explanation on how they are trying to solve the problem themselves. This example lacks explanation and use of smart question practices, and instead hopes that someone can quickly understand his messy code just by looking at it.
This is a clearly inefficient question that cannot be considered a smart question for many reasons. All they do is paste code into the question without any explanation of what they have tried, or what they have looked up to fix it themselves. They also lack context in their question, as we do not know what the output they expect is, and it has to be assumed by the reader. Furthermore, they did not work to try to pinpoint the issue or what exactly they think is happening, leaving readers in the dark about how to help.
This example will likely not get a clear and concise smart answer because of the way that the question is set up. There will be issues with people not giving accurate feedback or answers, and this is detrimental to a developer’s workflow. He gets responses such as just “Have you tried x?” or even “I am really confused about this,” which are answers I am sure they are not intending for.
In software engineering, there are bound to be code and technology related issues that a single developer may not be able to fix. Communication is an important skill for developers to have so that they can collaborate to solve these problems together. Smart questions help provide a format on how these questions should be asked, and people can get efficient answers that improve workflow as a result. I realized that it is important to consider the guidelines for smart questions when asking these questions because of the clear and concise format allowing for clear and concise answers. Smart questions will definitely be useful to me when trying to get help to solve technical problems, and it is a good framework on how these questions should be asked.