The reason you were directed here is because you need assistance, and I am here to help. I am not, however, here to provide you with any answers! You see, it looks like the assistance you need is not finding an answer
; it is rather that you need assistance finding a question
As you know, there are all kinds of questions. Questions that test memory recall. Questions that test logic skills. Brain-teasers and mathematical questions and so on. But there is one requirement that all good questions must have in common before they can be answered:
A proper question MUST provide ALL of the information necessary in order for an answer to be given.
In other words, if you omit important information from a question, it doesn't matter how simple or easy that question is: It suddenly becomes very difficult, or even impossible, to answer.
For example, consider the following question:
"Am I wearing a hat?"
Seems pretty easy, right? No logic, no memorization, no trivia, no knowledge of any specific topic is required.
So ... what's the answer? Take a few minutes, think about it, write it down on a piece of scrap paper. I can wait, take your time ...
What's that, you say? You can't
answer that simple question!? Why not? I stated it very clearly, it requires a simple YES or NO response, there's nothing tricky there. So, why would anyone have any trouble giving an answer to something so basic and simple?
The reason, of course, is because you can't see me. You have no way of knowing what I am wearing because I did not provide you enough information! As simple as it is, it cannot be answered; therefore, it is not
a proper question!
Suppose, instead, I provided a picture of myself and asked "In this picture, am I wearing a hat?"
And, in the picture, my head is clearly visible and the fact that I am wearing a Boston Red Sox cap is very clear. Would you be able to answer the question in that scenario? Of course! Suddenly, what was an impossible question to answer became very simple!
How did that happen?
It happened, of course, because I provided you enough information
to answer the question! And that is the often problem with many of the questions we see day to day in forums asking for help. You cannot expect an answer
unless you provide a proper question
with all the necessary information
. The majority of the effort by those helping others in these forums is not spent answering questions, it is spent trying to figure out what the heck the question actually is! And that is the problem; people don't seem to realize that they can't just randomly cut and paste code or ask vague questions without any context and expect to receive help!
Yet, requesting more information and details doesn't always go over so well ... Those looking for help seem to often have trouble understanding why the helpers need more info, why are they are so "anal" and "demanding" about minor things like database schemas, or sample data, or code samples. "How is that important?" they wonder. "Just answer the question and provide me with some help, please! An expert would know the answer!"
My goal today is to hopefully help you to understand why information and context is so important for even simple, basic, questions, and how providing that information suddenly transforms a poor question into a very good one that can be quickly and accurately answered.
Let's try another example:
"How do I get from work to Fenway Park?"
So, what do you think? Is that a good question that provides all of the information? It seems simple, right? It is just asking for basic directions. Yet, where is "work"? Is it asking for driving directions, or walking directions, or maybe which subway lines to take? Who knows!!?
As stated, this question simply cannot be answered! Yet, if I just thought about it a little and made sure to provide all
of the necessary information, this "impossible" question with no answer suddenly becomes a very simple one:
"How I do get from 125 High Street, Boston, MA to Fenway Park via the subway?"
See the difference? Instead of just assuming that everyone knows where I work and what mode of transportation I am looking for, if I make sure to simply tell them,
there is no uncertainty, no confusion, no guesswork, and the question can be answered. This isn't rocket science, right? Yet, these common-sense basics seem to elude many, many, people!
Would you drop your car off at a mechanic with a note on it that says:
"Car doesn't work. Plz fix. It is urgent! Thx!!"
I sure hope not. You'd explain what's wrong, right? It has trouble starting, it has a flat tire, there's smoke coming from beneath the hood, the steering wheel fell off, and so on. It's basic common sense that you would do everything you can to be sure that the mechanic has the information he needs to fix your car correctly and promptly, right? Shouldn't that same logic also apply when asking for help in forums?
Finally, let's try a SQL Server question:
"What is wrong with teh codez? it does not work! Plz Help!
select SaleID, Customer, Qty, Price
Take a look at that question. It is a very simple SQL statement, right? There's nothing there that a beginner could not understand. Can you "spot" the problem and fix it?
Hmmm ... maybe you can, maybe you can't. You can't really be sure, can you? At this point, we can all try to guess what the problem is. What does "it does not work" even mean? Is "SalesNumbesr" a typo? Should it be "SalesNumbers" ? Is it returning too much data? not enough data? Incorrect data? Is it generating an error? And so on.
We could spend all day trying to guess what the question is and provide answers to those guesses, but if the guesses are wrong, the answers won't be so helpful, will they? On the previous question, what if you guessed that I work in Cleveland and provided directions for me to Fenway Park from there? Would that be helpful to me? Probably not, right? Most likely, it just wasted everyone's time.
So, getting back to the code .... what is wrong with it? Well, in SQL terms, the answer is: NULL
! It does not exist. Until we are provided with more information, the question cannot be answered. Thus, it is not a question at all, just an incomplete fragment. As simple as the question looks, as basic as the T-SQL is, this "question" will stump even the greatest "experts" out there because an answer to this question simply does not exist.
If more information is provided, like this:
"Hi -- I currently have the code below:
select SaleID, Customer, Qty, Price
I would also like to return the total Amount for each Sale, which is the Qty multiplied by the Price. However, I am not sure how to add this to my current code. Can anyone please help?"
Suddenly, the question now is very clear and the answer is very simple! They just want to know how to add an expression to the result set. Just by providing a little more information, and not assuming that everyone knows what is happening outside of the context of what was written, something that was impossible to answer has become very easy.
I sure hope this is making sense.
In fact, taking this whole article to its logical conclusion, I think we can safely say:
"The more accurate and detailed information a question provides, the more accurate and detailed the answers will be."
In other words, a vague, incomplete question can only get, at best, vague, incomplete answers. But a question that spells out the entire situation very clearly will get, at best, a very clear and specific answer that works in that situation.
So, please, think of this when you ask questions in a forum. Consider the fact that no one knows your specific environment, or code, or application, or database except for YOU. And, no one can help you unless you are providing enough information for them to do so.
Just like the mechanic. Or someone giving driving directions. Or a doctor when you are sick. You provide them with the necessary information so they can help you, right? Consider doing the same to those providing you with (free!) programming advice.
. . .
(Feel free to provide this link to those who seen to have trouble understanding that you cannot read their mind when assisting them with programming help on forums.)