Smart vs !Smart Questions

27 Jan 2022

A user once asked StackOverflow, “How do I undo the most recent local commits in Git?”. He/she had accidentally commited the wrong file to Git but hadn’t pushed the commit to the server yet. He/she asked simply, “How can I undo those commits from the local repository?”. A succinct and easily understood question. He/she then went on to describe in brief the reason for the question, thus showing that this wasn’t simply a lack of understanding of Git but a search for “a better way”. This question is now one of the most voted questions on StackOverflow with 23,807 votes. It is a smart question, abiding by the tenets set forth in the reading. The answer reflects this. The answer provided matches the intelligence with which the question was asked. It first directly answers the question by providing a short snippet that displays how one would undo commits from the local repository while maintaining data integrity. The answerer then goes on to explain each line of code and it’s purpose. The user then goes on to offer alternatives to his/her solution as well as a removal as opposed to undoing method. Finally, the answerer goes on to provide further resources on the topic that might aid in responding to any further questions the original asker or others who see the post might have. This interaction goes to show the power and usefulness of asking cincise and accurate questions that evoke concise and detailed answers.

In stark contrast is a “question” that has been viewed 7 thousand times with 303 votes over the last 6 years, and 8 months. With 0 answers whatsoever. The user begins by titling their ask “Managing the lifetimes of garbage-collected objects”. No question, it’s unclear what the user wants. He/she then goes on to describe what he/she is doing via large blocks of code that take up more than a full page and require a couple scrolles to see. He/she states that he/she wants to “rework the API (without changing the internals, which are just fine!)…” while acxcounting for additional requests. He/she then provides a “tentative solution” in the form of the 2nd long block of code before asking “Is this design correct? If not, what needs to be changed?”. This is not a smart question. It is long winded, with lots of background information required and given to understand. The question itself doesn’t come until the very end of what can be considered quite a long buildup. The question itself isn’t even specific, it is a very open ended question that would require a very invested answer as well as very involved interaction to answer. The title isn’t very good either, it doesn’t convey what the user wants, only what the user is (presumably) trying to achieve. The lack of answers reflects this. The comments do as well, they either ask further questions or suggest that the original poster ask a different and more concise question. In short, not a smart question.