Three and a half years ago, I started my coding career. Throughout those years I’ve encountered so many problems I didn’t know the answer to, that I could’ve been a problem finder, as a full-time job. I have had problems with really basic coding, and I have had problems deep within complex projects. I have spent hours debugging my code without coming one inch closer to the solution. Yet, I have never, ever, had the need to ask a question in an online forum.
Why? Because there are always, I repeat, always other people who have asked your question before you. Regardless of how specific my problem is, another programmer has been stuck in the same place and needed help moving on. And, because the programmer asked the question in a smart way, it’s easy for me to find the question, and apply the same solution to my code. What do I mean, smart? Eric Raymond has written the essay “How to ask questions the smart way”, which outlines important steps of formulating a smart question.
In this essay, Raymond writes about writing the question in a way that makes knowledgeable people feel like you’re worth helping. He also mentions several ways to keep your question short, concise, and universally helpful for the community. One example is how your title should include the object in question and the problem, not just one or the other. He also recommends keeping the questions short, yet include the information needed, so that it’s possible to understand the scope of the problem.
Let’s look at an example of a smart question: How do I merge two dictionaries in a single expression in Python. Without reading the question itself, you already understand the question, just by reading the title. This makes it easy for any proficient Python user to stop scrolling when she reads the title, and will actually make an effort to reply. When you open the question, you also see that the person with the question has further clarified what he wants to do, by making an example in code. There should not be any more room for misunderstandings. The whole post has 2 lines of text and 5 lines of code. That’s it. Often you can judge the quality of a question by the answer. This specific post got an answer with close to 2,000 words. That’s equivalent to about 4 pages of text!
If you don’t ask a smart question, it will be more difficult to get the answers you need. Let’s look at “why access memory error when malloc the size so large?”. By reading the title, I don’t understand much of what the question is about. When looking at the question itself, I looked at the tags to understand which language he was asking about, but the author had tagged two different languages. The question gives very little information and has bad punctuation. This clearly annoys the responders of StackOverflow, as no answers have been provided. Even though the post has obviously been seen by several, the post has gained several comments about the wrong use of tags, wrong assumptions in the question, and missing information.
The differences in the responses to the smart question and the not-so-smart question highlight the importance of putting effort into your questions. If you want smart answers, you need to provide smart questions. And, to be honest, you will hardly ever need to post a question, you just need to Google, and your answer will already be available. Even the smart question example I refer to is a question posted numerous times on StackOverflow. STFW!