W̶h̶o̶ ̶W̶h̶a̶t̶ ̶W̶h̶y̶ How To Ask Smart Questions

26 Jan 2022
With the complexity of software increasing as large scale projects become more common, it is common for even the most prestigious developers to come across software bugs that require the assistance of other developers. One of the core positives of the development community is the accessibility of information. Almost any basic problem a user can run into has likely been solved with an explanation online. It is then on the individual themselves to seek out this info online.

In some niche cases, this information may be old/outdated or may not be clear in the reasoning for it’s solution. This is where the importance of “smart” questions exists. While every programmer must inherently begin somewhere, it is important that questions with relatively simple solutions aren’t repeatedly asked. Structure, and organization is just as important with questions in a community as it is in code itself. Taking steps to ask “smart” questions when needed helps to maintain these core values.

The Good

In this example, we see the user begins with a clear title, asking for the use of std::move in std::accumulate. In the body of the question they also list the environment they are working with, and the specific compiler used (g++). They also include a function definition of the function in question as a properly formatted code, not a picture. While it could be argued that documentation on the functions could aid in drawing conclusions about the answer, the question does pose a genuine question about two approaches to reach the same result. A properly thought out question like this is given an equally thought out answer, as evidenced by the multiple clear replies. This is a good example of utilizing the expertise of the programing community with smart questions.

The Not So Good

In a similar way that individuals migrating to a new region or society are expected to eventually assimilate into society, novice programmers are expected to learn the specific norms that take place within the programming community, including the exchange of information in questions. Without structure, and an adherence to expectations when asking questions, novice programmers have the possibility to harm both their chances of successful advice, and wasting the resources of others looking to foster a connection within the community. In the provided example, we can draw assumptions about the question being asked “Play sound when button clicked html”. The main body of the question does include a proper code snippet rather than a picture of code but displays a poor grammatical explanation of their problem, suggesting a rushed question with little work from the individual to seek out an answer on their own. "I want to make that when you click on a button it makes a sound, i tryed this:"
   
    <script type="text/javascript">
        var audio = new Audio('audio_file.mp3');
    </script>
    <button id="Draw/Chat" onclick="audio.play();" type="button" style="font-weight:bold; background: none rgb(0, 255, 0); border: none; color: rgb(255, 255, 255); box-shadow: none; height: 52px; width: 110px; left: 190px; top: 80px; border-radius: 5px; cursor: pointer; position: absolute;">Draw/Chat</button>   
  
 
A simple Google search for “play sound on button click in HTML” immediately returns another thread with the solution to the provided question as the first result. While the user asking appears to be extremely new to web design, and programming, adherence to norms reduces the clutter of multiple threads on the same solution. As one of the immediate replies to this question was urging the user to search if their question was already answered before posting, this general consensus is shared by others in the community.

Wrap Up

We must all learn from our mistakes in order to progress further in programming, and asking the occasional bad question is easily a shared experience at one point or another. It is up to us the individual to learn from our mistakes and forge better habits. Learning about smart question making from the perspective of others has helped me to both reinforce my ability to do so, as well as widening my eyes to the various sources of information.