I Have A Question!

25 Jan 2018

As software engineers, there are times when we’re spending endless hours debugging our code and end up getting nowhere, or sometimes in a worse state. We begin to search the web, but after a couple links and attempts, we are still stuck. This is when we are tempted to post our problem and obtain help from fellow software engineers. But how do we effectively ask questions?

Good VS. Bad Questions

When looking at questions on StackOverflow, the first thing users see is a list of subject headers to each question. According to Raymond and Moen [1], the subject header is your way of attracting fellow software engineers to your question, similar to the first sentence of an essay. You want them to know more about your question and what you’re having trouble with. You’re subject header should also be descriptive, but concise as well. Looking at figure 1, the subject header is excessive. The phrase, “Hello Everyone, I need help, I would like to know how to make some few exercises” is unnecessary, instead it should be included in the detailed description of the question. An effective subject header would be: “Calculating Leap Year with C++.” In figure 2, the subject header is a short and concise question, then the question is expanded in the description. In the description of your problem, it should clearly describe the bug, the environment, demonstrate that you researched your problem, and show the steps you took in attempting to solve your problem before posting. In an essay, the description acts as the body. In figure 1’s description, they clearly restate their subject header which defeats the purpose. They also do not include an attempt to solving their question. This demonstrates that you are only searching for answers and have no interest in working out the problem. In figure 2’s description, they show that they have researched their problem before posting by including a link to one of the resources.

In addition to the subject header and description, the responses demonstrate if the question captured the interest of fellow software engineers. The comments in figure 1 show what the post is missing. They asks for an attempt, provide resources that can be easily found in a search engine, and keywords to search for solutions. Figure 1 also shows that their main issue is syntax, which should have been included in their description. In figure 2, the answers include examples of code and detailed explanations. This shows interest in the question and wanting to help the person understand the problem.

My Past Question

“How to Ask Questions the Smart Way” made me think about a question that I posted a while back. When I ran my code, I ended up with “segmentation fault.” I could not figure out the problem, so I posted my 100+ lines of code on StackOverflow only to get a comment saying I had a bad question. This resulted in me deleting the question. This article also emphasizes that there are software engineers who are answering questions on their own time and for free. Having smart questions will be a win-win situation for you and the people who want to answer your question. You have a better understanding of your problem and they had a problem that made them think.

[1] Article: How To Ask Questions The Smart Way

Figure 1: Bad Question Example

Figure 2: Good Question Example