Smart Questions, Smart Answers

28 Jan 2021

What the heck is a “smart” question?

Everyone in their lifetime has gotten stuck on a problem. Unable to find a solution by ourselves, the only other option is to ask other people for help. Sometimes, this process becomes frustrating when even other people are unable to solve the issue. Time goes by as you are communicating back and forth and finally a solution! But after all of that frustration and work on both ends, it came down to a misunderstanding. They weren’t able to understand the problem fully until the very end. All of this could have been avoided if the question being asked in the first place was a smart question. Eric Steven Raymond provides an enlightening input on how to ask questions the smart way. In his essay, he provides guidelines on how to accomplish this to solve problems you may have with programming. Asking questions the smart way shows that you took the time and effort into thinking this through. It shows you aren’t wasting people’s time and you’ve exhausted all the resources available to you.

The Smart Way

Stack Overflow is a rising community resource for developers that contain thousands of questions and thousands of answers. Everyday programmers come to these forums to seek help or to provide help. This question here provides and example of a user asking a smart question. The user is asking on how to check if a string contains a substring in JavaScript. The user’s initial question is clear and precise. They state the task they’re working on, the language they’re coding on, and a snippet of something they have tried but didn’t work. By providing all the necessary details and even showing people the methods they have tried to overcome this, the question is easily understood. Below are a few answers, providing just enough details on the solutions back. Other programmers, suggesting engaging solutions back proves the question was efficient enough.


Q : How to check whether a string contains a substring in JavaScript?

Usually I would expect a String.contains() method, but there doesn't seem to be one.

What is a reasonable way to check for this?




The Not-So-Smart Way

Sometimes questions go unanswered or barely get any answers. Most of the time, it isn’t because no one knows how but the user did not ask in a smart way. In this question here, the user does not provide an exciting question. The question barely provides any details upfront about what the user is doing. They are just asking what is wrong without informing people what could be wrong or symptoms of the problem they are having. There is nothing on the error codes they are getting or what specifically they need help with. And you can see that many people found this question bad as there are currently no answers provided.


Q : Is there something i am not calling into the code?

Please help i do not know what i need to input to allow the code to run. The top half will give back a response but the second half does not.



Parting Thoughts

I believe asking questions the smart way is a skillset that everyone should be aware of. Especially in this field, we ask a ton of questions to our professors, classmates, and online communities. Asking questions and not getting a satisfying answer back can start to become annoying. We can learn more by putting more thought into what we want to ask before actually doing it. It’s beneficial for you, beneficial for the other person, and just anyone who happens to run into the same issue.