Asking the Right Question

10 Sep 2020

As a Computer Science student, I often run into problems while I am doing my homework. A common scenario is that the program that I wrote is not outputting what I expect it to, or it is outputting errors. When this happens I would first look for typos and go through the thought process behind the program to make sure that nothing is wrong with the concept behind my codes. Then I would try to locate where the occurs by adding print statements to check the variables that are moving through out the program. While this does not solve the problems every time, it would often give me enough information to ask a good question on Google.

When asking a question, you have to be detailed about the troubles that you are encountering. More importantly you have to show your work and that you have tried to solve the problem before. This question here is a great example of a bad question. The title of the post is “How can I save the last image?(OpenCV)”, it tells you that the objective is to save the last image and that it is programmed in OpenCV, which is good enough for a title. The body of the post is a different story, it feature the entire code of the program and the objective again. The post did not show that the user has tried to locate the problem on his/her own because there is so little information on the output of the problem or the method the user has tried so far. When you are asking a question like this, other would believe that you’ve never tried to solve the problem on your own and that you simply wanted someone else to finish your work for you.

Here is good question, the post title is “Nested lists for matrix transformation”, while the title is not exactly informative, it still contains a specific topic. The body of the post contain more information, such as the question, the part of the code where the problem occurred, the output of the program and the desired output. More importantly the body of the post contain some restriction to avoid unwanted answers. The post show that the user had consider before asking the question, that he/she is not simply looking for answer and that he/she is also willing to learn from the question.

Asking a good question does not only give an answer but also provides a opportunity to learn from a mistake. From what I’ve gather, it is not uncommon at all for developers to ask questions on Google. In fact, I believe that anyone could learn programming by asking question on Google, the reason that not everyone does is that most of the time they are asking the wrong questions. A right question could provide the solution for questions anything, so if you are having troubles, you should try asking the right questions.