The Good Questions And The Bad

09 Sep 2021

The first time I was exposed to StackOverflow was when I was learning my first language Java. My first impression of the site was a feeling of awe. It is a hub where many programming problems and questions can be presented and answered by talented developers. With so many questions already answered and the opportunity to ask questions myself, I felt that there was a great resource to help solve many problems that I may face in the future.

However, there was a catch. After looking at many StackOverflow questions since then, I began to see how the questions are usually formatted and asked. And this made me more nervous and careful on how I would ask these questions on forums like these. What kind of question is asked and how it is presented can affect what kind of answers you get. These answers can be professionally presented and does a good job explaining the solution or explanation to the problem. Or, it can be snarky in response to a badly asked question or even a question that shouldn’t be asked in the first place.

Now there is a lot of things that makes a question a “smart question”. Though we can look at some examples that demonstrate either good or bad questions being asked. I first present a good question asked on StackOverflow:

https://stackoverflow.com/questions/15737390/java-lang-nullpointer-exception-when-running-c-programs-in-netbeans-7-2/39562427

In this post, the person has faced a null pointer exception thrown out, trying to run a C++ program. One can see from the title alone what problem is troubling the user and what tools and language is involved with this problem. In this case, it is stated that it is a java.lang.NullPointer Exception involving C++ and the IDE Netbeans 7.2. With a general understanding what the problem may entail, readers can move on to the body of the post. In it, the asker states their goal,”I wanted to try my hands on C++ and wanted to use the same netbeans IDE… for Java development.” They then explain the steps they took to achieve this goal, with a combination of both a simple explanation and a code block. Then they reach the step where the problem arises, when the exception is thrown. With their background knowledge, they were able to figure out that the IDE is causing the problem. They then show that they tried looking up the solution to this problem on their own but with an unsatisfactory solution, showing at least some effort to answering their own question before going to stackOverflow. Finally, they end the post with a simple ask for help to those who faced the same problem and a thank you.

This good question was thus given good answers. Many of which provides a variety of solutions to this predicament in a straightforward manner. However, the asker was able to find a solution to their question on their own. So, they posted their solution as one of the answers to let readers know their problem has been solved.

https://stackoverflow.com/questions/45723965/i-am-trying-to-figure-out-below-javascript-and-what-it-does

Now here is what I believe is an example of a bad question being asked. The title alone doesn’t really convey much about what the problem is. The only thing we can extract from this is that it involves Javascript and there is confusion about the meaning or function of a piece of code. Going to the body, it’s a simple statement stating that they are trying to figure out what a piece of code does and how it works. Not only is this vague and seems to contain a couple of mispellings, the question presents an asker who should have read resources and documents involving Javascript beforehand. The asker is confused about the syntax and set up of a single line of code. So it would help to at least look up the resources that mention this syntax. This may help answer their own question or even give them more interesting and smarter questions that they can ask.

The answers they were given vary. One was highly detailed and dedicated in breaking down the code and explain what it is doing. And then there were snarky answers that questioned if the asker even looked at documentation for it. These type of answers reflect the quality and type of question the user has asked. And in this case, it wasn’t a good question.

People who are answering questions are looking to help others without much gain from it. Thus, the question should be convenient for them as to not waste pointless time understanding the problem. It is also usually public for many others who face the same problem. Asking good questions will usually get you good answers. And good answers will greatly benefit the community as a whole.