I was first introduced to asking “smart questions” while going through The Odin Project. “How to be great at asking coding questions” and “Help Vampires: A Spotter’s Guide” are some great resources presented by the course. “How to ask questions the smart way,” by Eric Raymond, is another classic. Well, what exactly is a “smart” question? In the following sections, there will be examples of what is and is not a “smart” question.
This is an excellent example of a “smart” question. Even though the user does not speak English natively, they got their point across. The user has a JSFiddle and added a snippet with the same code to the post. In addition to that, they were specific about what they wanted to accomplish, which led to obtaining a good answer. The tags were adequately selected to get the right people to answer the question. This question is explicit, precise, and encompasses all the main points in Eric Raymond’s guide.
This is an example of a “not so smart” question. In fact, this question was even closed by Stack Overflow due to a lack of detail or clarity. The user is looking to alter the width of a particular part in their application with CSS. They, however, only provide two lines of code without any context. Ideally, the asker should, at the very minimum, provide both the HTML and the CSS to allow Stack Overflow’s community members to replicate the problem on their end. It would be even better to send a link to CodePen or JSFiddle. Perhaps screenshots with markings also are helpful. Overall, this question lacks specificity and context to be answerable.
Asking “smart” questions is a skill. It is something that requires active feedback to get good at it. I had also made mistakes in the past when it came to asking coding-related questions. Luckily, the coding community is pretty blunt about this. Sometimes my help messages were ignored, and I was asked to provide more information at other times. I committed my first cardinal sin by taking a screenshot of a large block of code… But things are better now with JSFiddle, CodeSandbox, and CodePen. Ultimately, asking “smart” questions will often lead to obtaining “smart” answers.