Asking the right questions

22 Jan 2024
Question Mark Icon

When asking smart questions to developers or hackers on StackOverflow, it is important to make sure that the question you are asking follows the correct guidelines specified in the site, and also that it follows the precepts established by Raymond. As of January 2024, there are almost more than over 24 million questions and 30 million answers meaning that most questions that many of us have would probably exist on this forum which brings me to my next point. The one crucial advice that many hackers give when asking smart questions is to make sure the question is never redundant. Redundant questions are those that have already been asked and answered on the platform, to which hackers or developers will most likely ignore for the sake of their time. By making sure you do a Google check or a ChatGPT check before asking, it saves time for community members who would otherwise spend time providing duplicate answers. Redundant questions are one of many examples of what your smart question should not contain and as we progress through this essay, we will explore two questions on StackOverflow on how to ask questions the smart and non-smart way, providing examples of each for better understanding.

Take a look on this example of how to not ask a smart question : StackOverflow Question 1. In this example, the first red flag is that the developer does not try to understand his own piece of code. To summarize the author states what his program does which is a piece of code that turns all numbers inside an array in to negative numbers then if a number is already negative it turns it to a positive and puts it inside another array.

He states that “I have a problem understanding why this block of code turns every number inside the array of numbers to a negative number except for the one that is duplicated, if anyone has an explanation thank you in advance.”

As a victim of this myself, we have questions in our own code that we copy and paste looking for quick answers without understanding it first and why it puzzles us. By putting in effort into understanding the logic, the developers or hackers viewing your thought process will be able to identify where the error is and how to fix it for you which this question does not have. The other reason why this is not a smart question is that he does not try to answer his own problem with any sort of follow-up threads to updates, making his question feel disconnected. With this type of uninvolvement, it makes the author look selfish that he is only looking for answers rather than trying to find one that works. This kind of ties in to my first point that developers like to see where your mind is at and that any attempts to solve your problem, eventually it’ll help you narrow down to the one answer you can find with the assistance of other people. In this way, from each update you have, developers can comment if you are on the right track or if your steering too much to help you get a better understanding of the new insights you may have when tackling the problem.

This is an example of a smart question: StackOverflow Question 2.

To summarize, the author is asking if it is possible to strongly type the return value of his helper function. A strongly typed code refers to a language in which variables are bound to a specific data type, and the type of variable is enforced by the compiler or interpreter. The compiler or interpreter checks for type compatibility at compile-time or runtime, and it does not allow operations between variables of incompatible types without explicit type conversion. This is a smart question because it is a unique problem, and it is open for many kinds of solutions as you can see with the amount of answers provided for the authors question. Not only that, the developers build upon each others answers when new discoveries happen, and they always discuss the problems with their sample code provided. It is very open-ended and the best part is that the author is contributing to these discussions, even though the answers are not entirely successful.

By reading Raymond’s precepts on how to ask a smart question and scrolling through countless amounts of questions on StackOverflow, I learned an introductory way to ask and identify a question that developers or hackers would love to answer. This is important as many of us want to learn something new and with non-productive or progressive questions can hinder and waste precious time to those looking for knowledge. As time goes on and as coding starts to be complex, this essay would definitely help guide me in asking intuitive questions so that I and others are able to learn from the problems that I will be getting in the near future.