Smart questions are exactly what they sound like. They’re asked in a way where someone who knows the answer will be able to immediately answer them without having to ask for additional information. Smart questions save time for everyone involved, and knowing how to ask one is a skill that may not be immediately apparent to some. From my experiences, most of the classes I’ve taken have never really gone into detail about what makes a good question; they just state that there are no such things as “dumb questions”. I agree with that statement, but I believe there are also such things as “incomplete questions”. These are questions where only basic, limited information is given, with the expectation that it’s enough for an answer. For some fields, such questions might suffice. But in the realm of software engineering, such questions almost always require additional information from the questioner to produce an answer that satisfies the inquiry.
In the field of software engineering, the ability to ask smart questions is crucial. It not only demonstrates a developer’s problem-solving skills but also shows respect for the time and expertise of those they’re seeking help from. Eric Raymond’s essay “How to Ask Questions the Smart Way” provides valuable guidelines for effective interaction within the open-source community, and these principles apply equally well to platforms like StackOverflow.
To illustrate the impact of asking questions the smart way, let’s examine two real-world examples from StackOverflow.
Unfortunately MyApp has stopped. How can I solve this?
This question demonstrates several pitfalls of asking questions the “not smart” way:
The question in its entirety reads:
“I am developing an application, and everytime I run it, I get the message: Unfortunately, MyApp has stopped. What can I do to solve this?”
This question violates several of Raymond’s principles for asking smart questions. It shows a lack of effort in diagnosing the problem, provides insufficient information, and doesn’t demonstrate any attempt to solve the issue independently before seeking help.
ArrayIndexOutOfBoundsException with custom Android Adapter for multiple views in ListView
In contrast, this question exemplifies many aspects of asking questions the smart way:
The question begins with a clear explanation of the goal:
“I am attempting to create a custom Adapter for my ListView since each item in the list can have a different view (a link, toggle, or radio group), but when I try to run the Activity that uses the ListView I receive an error and the app stops.”
It then provides the relevant code:
public class MenuListAdapter extends BaseAdapter {
private static final String LOG_KEY = MenuListAdapter.class.getSimpleName();
protected List<MenuItem> list;
protected Context ctx;
protected LayoutInflater inflater;
public MenuListAdapter(Context context, List<MenuItem> objects) {
this.list = objects;
this.ctx = context;
this.inflater = (LayoutInflater)this.ctx.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Log.i(LOG_KEY, "Position: " + position + "; convertView = " + convertView + "; parent=" + parent);
MenuItem item = list.get(position);
Log.i(LOG_KEY, "Item=" + item );
if (convertView == null) {
convertView = this.inflater.inflate(item.getLayout(), null);
}
return convertView;
}
// ... (other overridden methods)
}
The asker also includes the exact error message:
java.lang.ArrayIndexOutOfBoundsException
at android.widget.AbsListView$RecycleBin.addScrapView(AbsListView.java:3523)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1158)
at android.widget.ListView.onMeasure(ListView.java:1060)
at android.view.View.measure(View.java:7703)
This level of detail and preparation demonstrates respect for the community’s time and increases the likelihood of receiving helpful, targeted responses.
The quality of the questions directly influences the quality and efficiency of the responses received. In the case of the “not-so-smart” question, the responses are generally vague and cannot provide specific solutions due to the lack of information. Many answers request more details or suggest generic troubleshooting steps. On the other hand, the “smart” question received detailed, specific responses addressing the exact issue. The accepted answer not only solved the problem but also explained the underlying cause, providing valuable learning for the asker and future readers.