Asking the Right Questions

26 Jan 2022

The Fundamentals

The ability to ask a good question and clearly convey what you are trying to achieve is very overlooked. “How to ask questions the smart way”, by Eric Steven Raymond delves into making sure you are able to get the most out of the questions you ask and how to go about it. There are a lot of things to take into account when asking a question that greatly increase the chances of recieving a helpful and timely response. The first thing to do before asking a question is to try to find the answer on your own. Whether it be through things like the web or an educated friend, it is more often than not someone has had the same question, in the past, and the answer is already out there. Two more very important things to consider when actually starting to post the question, is to find the most relevant forum to post on and using meaningful and specific subject headers. This is key so that your question can reach the desired as well as most qualified audience to give you an accurate response. Lastly, when typing out your question or code make sure it is written clearly, is grammatically correct, and is precise and informative to avoid the confusion of readers. These are the fundamentals for asking a good question and they have a huge impact on the quality and, potentially, the availability of answers. I believe communication is a key aspect for life in general and applies heavily to software engineering.

How to ask

This post titled “Why is processing a sorted array faster than processing an unsorted array?” is a good example of a smart question. The first thing to notice is that the title is specific and to the point. Next, the body of the post demonstrates a lot of effort in that they’ve thoroughly looked through their code, even leaving comments to help readers follow along with their understanding. The basis of the post is looking at why the runtime of their C++ code is significantly faster when using sorted data. So, they show the precise runtimes of their code before and after sorting their data to the hundreth of a second. They then rule out the difference being a language or compiler anomaly by trying their code in Java which demonstrates even more effort and understanding. This is great for appealing to readers as it can give them more reason to work in finding a solution seeing the amount of work you’ve already put in. Towards the end of their post they summarize and recap on what questions they actually want answered which includes, “What is going on?” and “Why is processing a sorted array faster than processing an unsorted array?”. This quality question yielded many high effort responses with lots of detail basically stating that you don’t have to pay a branching cost, in terms of time, with an if statement when using a sorted array.

How not to ask

This post titled “Setter method doesnt work” is an example of a poorly asked question. The first glaring issue is the header in that it lacks specificity as well as has bad grammar with doesn’t not containing an apostrophe. The body of the post states: “my problem is the other two parametere doesnt work and just first parametere repeat in output?!”, followed by their code. There are multiple gramatical errors as well as a lack of detail in what they are actually looking for help on and the desired goal of their code. The code posted is overall very confusing and it is blatant that the user did not put much effort to look into their own code before asking for help. This is evident in that multiple methods such as getMinute() and getSecond() both returning the variable named “hour”. The issues in this post caused people to be unable to respond with detail and even respond with their own questions such as, “What does the methods getHour, getMinute and getSecond return?”, to try and get a better understanding of the given problem. Overall, they did not recieve many quality responses due to the quality of the question and the post was closed with the cause listed as typos.

Takeaways

My main takeaways from looking at these posts and Eric Steven Raymond’s “How to ask questions the smart way” are that you need to put in effort as well as be precise and concise to have the best chance at quality responses. I believe that communication is very important for software engineers and that collaboration is key to progress at times. Thus, being effective at asking question is a great skill to have. I think this applies heavily to ICS 314 and things like WODs where you are given a partner to work with that can help you work through things or see them in a different way. Another important takeaway for me was that it is important to try your best to find the answer on your own whether it be through testing or research and if you are unable to, display your efforts or discoveries in your question. This helps a lot with making sure your question is specific and that people can follow your train of thought and easily assist you. Overall, it is good to ask questions to gain knowledge and asking them correctly benefits all parties.