Smart Questions? Quality Answers!

30 Jan 2025

Value of Insightful Inquiries

I understand how frustrating it can be when you are stuck on a problem for a long periods of time, driving you to ask your questions away without much of a thought. There is no problem in asking questions, but you know what is even more frustrating? Not obtaining the quality answers that you wanted in the first place. On that account, it is important to ask questions in the smart way.

An efficient communication is highly crucial and important skills we must develop, not only as software engineers, but in any professional space. Eric Raymond’s essay, “How to Ask Questions the Smart Way,” offers enlightening advices on how to ask effective questions in technical and software development communities to get quality answers that may actually help you. Here are the key points to consider from the essay:

The following content of this essay will present and analyze examples of smart questions I found on Stack Overlow, an online platform specifically designed for programmers and developers to ask and answer questions related to software development. The not-so-smart question would be generated by AI.

Smart Questions

Here is an example of a “smart question.”

The following code snippet implicitly converts a std::array to a std::tuple:

std::array<int,3> arr = {2,4,6};
std::tuple<int,int,int> tup;
    
tup = arr; // c++23 or later
The assignment tup = arr fails to compile with C++20, but does work with C++23. Which feature/rule of C++23 makes this possible? I do not recognize this in the list of features, e.g. as given in Wikipedia or cppreference.com.

This question is well-formed because the asker provided specific and clear context about the issue, demonstrated that they’ve attempted to resolve the query on their own by referencing popular programming resources such as Wikipedia and cppreference.com, and provided enough technical detail to help respondents understand the issue without needing further clarification.

Not so Smart Questions

Here is an example of a “not so smart question,” generated by AI.

Is there a way to delete everything in an array using .pop()?

For example:
A = [1, 2, 3, 4];

Can I just do something like:
A.pop(all);

to remove all the elements? Or do I have to call .pop() a million times until it's empty?

This question is not so well-formed because it lacks basic research and experimentation. In other words, the asker’s issue can be easily clarified by a quick lookup in the documentation or basic programming tutorials, and they can test the code themselves before posting such a question.

Note on AI Use

This essay was written with the help from AI. I collaborated with AI to help brainstorm and organize the structure of this essay, but all the final content, voice, and personalization were reviewed and tailored by me.