The Importance of Asking Smart Questions as a Software Engineer

11 Sep 2024

Introduction

In the software engineering world, asking questions is a necessary task for developers. However, many do not understand how to ask a smart question. Eric Steven Raymond, in his piece How to Ask Questions the Smart Way, outlines that a smart question indicates that the individual has made an effort to attempt to solve the problem on their own before asking, respects the time of the community, and understands the context to which their question belongs. Asking a smart question is an essential skill that software engineers must master, one that separates effective developers from those who struggle to find solutions. On platforms like Stack Overflow, where experienced developers share their time and knowledge, asking smart questions is a crucial practice. In this piece, two questions asked on Stack Overflow will be examined through the lens of Raymond’s ideas on what constitutes a “smart question”.

The Smart Question: Undoing Commits in Git:

The first question asks, “I accidentally committed the wrong files to Git, but didn’t push the commit to the server yet. How do I undo those commits from the local repository?”.

Clarity of the Question

The asker clearly describes the problem, committing the wrong files locally in Git, and wants to understand how to undo the commits. The wording is simple, concise, and leaves no room for misinterpretation. Raymond states in his article, “Be precise and informative about your problem”, which is a criteria met by this question.

Context

The individual asking the question provides relevant context by stating that the commit has not been pushed yet, which is crucial information for narrowing down the scope of potential solutions. It also assists the reader in further understanding the question so they are able to better answer it. This aligns with the advice from Raymond, “Describe the problem’s symptoms, not your guesses”, indicating that the asker should focus on the actual issue rather than speculations.

No Assumptions

In the article, one of Raymond’s principles for asking a smart question is to, “Describe the goal, not the step”. This advice pushes for the question to focus on what the asker is trying to get across rather than presenting any assumptions on the issue. In this smart question asked on Stack Overflow, the user doesn’t offer guesses about the solution, but instead asks an open-ended yet specific question. This gives the viewers the flexibility to provide the correct approach without being limited by any assumptions implied from the asker.

Respect for the Community’s Time

This question reflects a quality example of the asker respecting the community’s time by presenting a question that is both direct and informative. The individual focuses on the problem without any unnecessary details or background stories that could distract from the core issue. As Raymond puts, “Prepare your question. Think it through”, as well as “Take your time”- statements that emphasize being thoughtful and intentional when asking a question to receive a quality response.

Why This Question is Smart

This question follows the principles outlined in How to Ask Questions the Smart Way. It demonstrates that the asker has already isolated their problem, and is now looking for the best method to resolve the issue. The question is likely to relieve a direct and quality response since it is easy to interpret and effectively engages with the Stack Overflow community.

Smart Responses

The responses to this question on Stack Overflow are equally smart because the clear and concise question invited equally straightforward answers. The top answer on the post suggests using git reset to undo the last commit while preserving the changes in the working directory. This answer matches the clarity and directness of the question and provides a helpful solution to the problem. The responses reflect the smartness of the question itself due to its specific and relevant context.

The Not-So-Smart Question: Adding Ads to an iPhone App:

The second question asks, “I’ve been working on an iPhone app with Flash for a while…Now that the app is ready, I would like to add advertisements to it (the app will be free so I’ll gain something), but I don’t know how to do it. Can you help me?”. This question contains several issues that make it a poor example of asking a smart question.

Vagueness

This question is vague and lacks specific information. The asker doesn’t clarify what type of ads they want to add, nor what platform they intend to use for advertisements. Without these specifics, it is difficult for potential responders to know how to answer this question. This not-so-smart question does not follow Eric Raymond’s advice to, “Be precise and informative about your problem”, making it harder for others to understand and help.

Lack of Context

This question mentions using Flash for the iPhone app, which is problematic since iOS does not support Flash. This confusing information leads readers to wonder if the user has the fundamental knowledge of the technologies involved, which ultimately makes answering the question more difficult. As Raymon notes in the article, “Beware of asking the wrong question. If you ask one that is based on faulty assumptions, J. Random Hacker is quite likely to reply with a uselessly literal answer while thinking ‘Stupid question….’”, which is directly demonstrated by the asker in this question.

No Research Effort Shown

The article How to Ask Questions the Smart Way advises, “Try to find an answer by searching the Web, reading the manual, or asking a skilled friend”, which the user of the not-so-smart question has clearly not done. The asker doesn’t mention any previous attempts to solve the problem or whether they have researched possible options. This gives the reader the impression that they expect the community to do all the work for them, which is a clear cut way to not receive a helpful answer since questions that lack respect will receive answers that equally lack respect.

Poor Grammar and Formatting

The question asked is full of inconsistent capitalization and grammatical errors, such as random capitalization of words like “For” and “Know”. This makes the question harder to read and suggests carelessness, which can discourage the reader from offering their opinion and assistance. Raymond warns that sloppy writing can reflect sloppy thinking in this line from his article, “We’ve found by experience that people who are careless and sloppy writers are usually also careless and sloppy at thinking”, as well as “Answering questions for careless and sloppy thinkers is not rewarding; we’d rather spend our time elsewhere”, when referring to those answering questions on Stack Overflow.

Why This Question is Not Smart

The asker of this question fails to demonstrate that they have made any effort in solving the problem on their own which, according to Raymond’s guide, does not guarantee that they will receive a quality response, if one at all. The guide specifies that users should try to find an answer to their question before asking the digital community. Furthermore, the vague and broad nature of this question, as well as its lack of clarity, reduces its chances of receiving a helpful response. Additionally, the confusion about using Flash for iPhone apps puts doubts in the readers’ minds about the asker’s knowledge about the applications they are using. Raymond notes, “Never assume you are entitled to an answer”. The asker’s approach shows a lack of respect for this principle when asking a smart question.

Unhelpful Responses

Since the question is unclear and poorly formulated, it invites similarly unclear and poorly formulated responses. There is only one answer posted to this question, which provides a link to a gaming website that supposedly has an API for embedding ads, which the responder says has worked for them before. This whole response is only three sentences long, and is quite vague. Many responders have most likely skipped over this question, which illustrates the question’s lack of precision, and the less valuable answers that result from this. Raymond emphasizes the importance of creating a question that minimizes the time needed to answer it, “The less of a time commitment you implicitly ask for, the more likely you are to get an answer from someone really good and really busy”. This not-so-smart question fails in this regard, which has caused it to receive a vague response.

Insights Gained

From analyzing both of these questions, I gained several insights into why asking smart questions is so important for software engineers.

Respecting the Community’s Time

When you ask smart, well-researched questions, you demonstrate respect for the time of those reading and answering your question. This increases its likelihood of receiving a helpful response in a timely manner.

Clarity Leads to Better Responses

A clear, precise question, like the smart question, invites clear and focused solutions. On the other hand, vague questions lead to vague and unhelpful responses.

Research and Effort are Important

Showing that you have already put effort into trying to solve the problem on your own increases the chances of your question being answered. This demonstrates to the community that you are invested in your question, and not just looking for someone else to do all the thinking for you. This fosters an environment where both the asker and the user can learn from the interaction.

Formatting and Grammar Matter

Sloppy grammar and formatting gives the impression that you didn’t put much effort into your question, which can lead to fewer lower-quality responses. Taking the time to put effort into your question shows care that is more likely to be reciprocated by the responders.

Conclusion

Asking smart questions is a crucial skill, one that is a part of being a software engineer. Well-formulated questions are not only more likely to be answered, but also to lead to more well thought out responses. On the other hand, poorly framed questions can frustrate the community and are less likely to receive helpful responses. By understanding the importance of clarity, context, and effort when asking a question, software engineers can better their problem-solving abilities by improving their ability to ask smart questions.

References

Anonymous. (2014, February 13). How to add advertisements to flash app. Stack Overflow.

Anonymous. (2023, September 15). How do I undo the most recent local commits in git?. Stack Overflow.

Raymond, E. S. (2014). How To Ask Questions The Smart Way.