So, You Smart. Will Your Questions be Answered?

25 Jan 2024

Every developer has faced a baffling bug that makes their code scream an error. This is where hair-pulling sessions begin. But for the truly masterful engineer, there’s another route: the art of the smart question.

Definition

Eric Steven Raymond, in his work “How To Ask Questions The Smart Way,” lays out several general rules: do homework before you ask, choose the right place to ask, use meaningful specific titles, describe facts, etc. A well-phrased question should leave no room for uncertainty without walking into irrelevant territory. It should also spark inquisitiveness, drawing the respondent into a collaborative exploration. Asking smart questions not only helps to solve immediate problems but also fosters a collaborative environment.

An example of a question that could be not smart to ask

Is floating point math broken?

Here is a link to Stackoverflow.

It’s over-broad and lacks details about the context or specific issues with floating-point math. It might not be clear what the asker hopes to achieve by asking this question. It focuses on a binary “broken” vs. “not broken” perspective, potentially limiting deeper exploration.

An example of the ‘smart way’ to ask a question

What would cause the C/C++ <, <=, and == operators to return true if either argument is NaN?

Here is a link to Stackoverflow.

The question clearly defines the topic. It avoids ambiguity and focuses on a well-defined area of code behavior. The question goes beyond just asking “Why does this happen?” It pinpoints the specific operators involved and clarifies the expected behavior. The question is directly relevant to C/C++ programming. It’s not a general inquiry about mathematics or unrelated software topics. It challenges the reader to understand the nuances.

Ask smart!

So, the next time you encounter a baffling bug, remember the art of the smart question. By refining our ability to ask smart questions, we not only unlock solutions to immediate problems but also unlock deeper understanding, fostering a collaborative environment where knowledge flows freely and innovation thrives.

This essay was written by Dmitry Gordeev on “How To Ask Questions The Smart Way” work by Eric Steven Raymond. Prompting Google Bard was involved in the analysis of questions. The picture represent logo of ‘Stack Exchange Inc’