Possible Duplicate:
Is “Don’t do it” a valid answer?
As long I'm airing my grievances, I thought I'd throw out another point that drives me crazy.
This actually is something I'm conflicted about, because I've been on all four sides of the problem.
The situation is: Someone asks a question and the responses are along the lines of "You should do it this way instead..." or "Why would you want to do that..."
I was trying to explain to a friend of mine how frustrating this can be and his eyes glazed over, like all of my non-tech friends' eyes do when I start telling them an interesting story about XML or PHP.
So I put it to him this way:
Imagine you are wanting to go to the grocery store to buy a gallon of milk. You usually take this one route that has lots of traffic and red lights. You know there is a faster way, but you are unsure of which highway to take or which exit. You ask someone down the hall "Hey, I was going to go to Foo's Grocery to get some milk. Do you know which exit I should take off of the OOP expressway?" and he responds "You should go to Bar's Mega-Mart, they have cheaper milk."
His eyes lit up and he immediately got my point. The problem is, sometimes you want to spare someone all the trouble of going to Foo's and have them take the really easy route to the cheaper place. But the person asking really wants to know because a) they have a coupon, b) they are going to their mother's place afterward right next to that store, c) their car gets such bad mileage that the extra two miles to meglo-mart will offset the savings on the milk, or d) they really just want to learn how to get around the city better and wanted to use this as an excuse to try out the OOP expressway.
I hope this analogy is holding strong. Often times I need the answer to something because I need proof of concept, or because my host/server/bandwidth puts certain limits on what I can do, or because I have a much bigger issue and thus I can't throw out the whole project to accommodate the 'better way' to solve one problem. Or because I just want to know the answer!
On the other hand, I have given someone a perfect answer to their problem, based on slight changes to their design only to get back comments like "No, that won't work, my example was really simplified" or "That's no an option with such and such an environment which I left out in my question." As though that makes my answer less brilliant.
One example was someone having trouble with checkboxes and returning the values to PHP/MySQL. I explained that their HTML was basically messed up and that once they fixed it, the PHP/MySQL would be a tad more irrelevant, and I threw in that they could probably spare the DB the trouble of storing the words 'checked' and 'unchecked' if they simply created a second table keyed to those who were checked. I know, genius, right. This earned me a "everything else works fine. I don't care if it's not valid. I just don't understand why this one thing doesn't work." Well, it didn't work because it was a mess and I was trying to help him clean it up. But he wasn't shopping for that kind of advice.
Example Two: I asked a question about whether CSS selectors could style elements that are "one up and one over" from the element with a specific pseudo-class. I knew it was probably not going to happen, but that's why I go to SO, because I don't know everything and I find out all kinds of crazy clever things. I got one straight forward explanation of why it couldn't be done, and 3 or 4 "You should just use jQuery" or "that's not how a web form is set up." type answers. I was trying to do something totally different and experimental, and I got a bunch of answers telling me how to do things the normal way.
Finally: Someone asked how to return both disabled and enabled inputs to the server "without using any hacks." I'm surprised we aren't still arguing over it in the comments. He insisted that I was being to "conceptual" with my question on why he was trying to do something that the HTML DOM was explicitly not supposed to do without a hack, and when I produced a 4 line solution for jQuery that would be pretty close to not-a-hack, I was basically told that I missed the whole point.
So, all my venting aside, what is the overall consensus? Is it better to address the question or the problem/goal? How explicit does someone need to be in order to give enough context to the question for us to know which of the two the user actually wants?
Null and Void
instead. Quality milk atException
prices. Plus it's about the distance between Foo and Bar.