Asking Questions the Smart Way

10 Sep 2020

The Art of Asking Questions       

       In primary school we’re always taught the mantra “There are no dumb questions.” No one should feel ashamed for asking a question that other people know the answer to - that’s the very nature of a question. You ask a question to get answers on a topic you’re not as familiar with as someone else. However, there is a caveat to this statement. Although there are no dumb questions, there are definitely dumb ways to ask a question. Especially in computer science, you’re definitely going to run into problems you don’t know how to solve. In these cases, it is important to make sure to ask questions the “right” way for two reasons.

  1. People can clearly understand what your problem is.
  2. People will want to help you.

       To describe what I mean, I’ll show some examples of “smartly worded” and “not smartly worded” questions found on StackOverflow.

Dumb Question

noe-aysnc doc says it is faster than async, and why can it be faster?

referring to the doc, neo-async's benchmark shows it is faster than async. so, plz someone tell me why? maybe I should dig into the code when I have time, but for now, if someone knows, plz.

— (u/briefy)

       It seems almost surreal that someone would post this and think they would get an answer. First off, what are they even talking about? I’m assuming they read the documentation of some sort of library and they want to know more about how that library does a certain task faster than another… but that’s all I can decipher from this. It would be a lot more helpful if this person included a link to the documentation they’re looking at. If this library is not very popular, maybe even emailing the author directly might be better. The biggest problem here, though, is that the writer of this question does not seem to care. It reads like they’re texting a friend, even saying “maybe I should dig into the code when I have time”. If you’re not going to put in time to look for the answer to your question, or even the time to format your question coherently, don’t expect other people to spend the time to answer.

Smart question

Select box truncating text when body font size changed via javascript on document ready in IE 9

IE 9 is behaving quite strangely for me. I've got a page font-size changing control that saves the users setting and then in the document ready sets the body font-size to that size. It works fine, the issue is, when a page with dropdowns loads, in IE 9, sometimes the text is cut off. I've simplified the code down to this jsfiddle to demonstrate. has anyone come across this strange behaviour? is there a simple fix? It does not happen in IE 8, or firefox, or safari, or chrome.

— (u/Patricia)

       This is a significant upgrade. The problem is clearly stated, and the user has provided code snippets (unshown here). The user has even linked a jsfiddle for other users to mess around with to see the problem in action. Stating that the problem does not occur in other browsers shows that she has done her own investigation on this issue.

Summary

Summarizing the differences of the above examples into three main points:

  1. Clearly state your problem
  2. Provide code snippets and error messages
  3. Show that you’ve put effort into solving the problem yourself.

Provided that these three guidelines are met, people will be more able and more willing to answer your questions. See you on the forums.