The Art of Smart Questions

12 Sep 2024

What’s a smart question?

After reading “How to ask questions the smart way” by Eric Raymond, it will be better understood that asking smart questions is very crucial because communication is one of the most important software engineering skills to develop, furthermore, it portrays the person who asks the question is smart and confident. Before asking a question it is important to know what you are talking about by attempting to search for answers on your own, and this could be using the search engines, reading manuals, or trying to troubleshoot. Knowing what you don’t know is meant to be precise and informative when you are trying to come up with a question. Asking the right audience is effective at getting the answer you want because you wanna ask your questions in the appropriate community where the expert in the particular field resides. Make sure to present your question without error because it will make you look very unprofessional if there are typos. The thing about asking questions is that it’s your problem and not anyone else’s problem so no one has the obligation to help you. When asking questions it’s a good idea to be patient and respectful even when you get the answer right away. Let’s talk about what makes a question good and how a bad question can have negative side effects.

A Smart Question.

Above is an example of a good question that I have found on Stack Overflow. The person wants to know how to make heapq evaluate the heap off of a specific attribute. Below the question the person clearly defines what he wants to achieve. The person also shows proof that he did his homework and has a good understanding of what he’s asking by stating the easiest way to use heaps in python. He even clarified the question furthermore by specifying that he would like to know how to sort by a specific attribute when using heapq. Because this person provided all the necessary information required to understand the problem while being respectful. This question is easy to understand, contains technical terminology, and shows that the person who asks puts in the time and effort which checks off the principles of asking smart questions as mentioned in the reading.

Q: How to make heapq evaluate the heap off of a specific attribute?

I wish to hold a heap of objects, not just numbers. They will have an integer attribute in them that the heap can sort by. The easiest way

to use heaps in python is heapq, but how do I tell it to sort by a specific attribute when using heapq?

A Not-So-Smart Question.

Here is an example of a bad question . The person asked ‘I need to rewrite Java ‘“for” to “while” and “do”’. First of all, this is not a question but rather it is a blatant statement. I assume the question is asking how to write a Java for loop to a do while loop. The typos in the question made it really difficult to understand which makes the person helping second guess himself. In addition, the misspelling on appreciated really shows sloppiness and unprofessionalism. The person does not explain in detail what the for loop does and this shows that the person did not even attempt to fix the problem. This question exemplifies the highlights of what a bad question should look like. It is fair to say that questions like these are terrible and should not even be considered. Smart questions are important in the field, especially in software engineering. Hackers looking at a question like a bad one above makes him uneased and shy away from answering. While hackers looking at a good question makes him think and engage in figuring out the solution. So it is very important to ask good, smart questions anytime you would like to get help from someone else!!

Q: I need to rewrite Java "for" to "while" and "do" 

i made a "for" a while a back ago now i need to change it to a "While" and change that to a "do", any help would be appriciated

Like this:

for(int i = 3; i <= 10; i++) {
  System.out.print(" " + i);
  if(i % 10 == 0)
    System.out.print("\n");
}
System.out.println();
}
}