The XY Problem
xyproblem.info
xyproblem.info
Either way, in a Q&A site like StackOverflow, asking for more context for a problem is rarely an issue in of itself. I find that more often than not people that are put off by that are in fact asking bad questions.
I had a few changed files in a working directory. I did `git add -A` to stage them. I then intended to `git stash` those changes, but I accidentally did `git stash pop`. I now have two sets of unrelated changes checked out: one staged and one not. I'd like to just stash the staged changes for now, but I don't know how to do that off the top of my head.
Google brings up this answer: http://stackoverflow.com/questions/14759748/stashing-only-st...
The original poster asks pretty much what I'd like to know: "How can I stash only staged changes?" However, he also provides some background. It sounds like he legitimately has an XY problem here, and the top answer is a long discussion of alternate workflows. However, when I search for something like "git stash only staged", I get a very unhelpful answer.
"Am I going about this the wrong way? Am I misunderstanding how git can work in other ways to simplify my process?"
Which is answered correctly. It could have been a typical XY problem but he adds enough background information that he's able to get a better answer. Great question AND great answer.
I'll give you that Google didn't index that question particularly well, but that's not really StackOverflow's fault.
me: "Hi, I'd like to buy a White 13" Macbook with a 500gb HD and 8gb of RAM. Could you please get one for me?"
sales person: "What are you using it for? Do you browse the internet? look at photos? do a lot of word processing?"
me: confused "um, I do web development and use Photoshop sometimes..."
sales person: "Oh well you need a Macbook Pro then."
me: "no, I can't afford that and the regular Macbook is plenty powerful for what I need. Can I just buy one please?"
sales person: "Photoshop won't run well on the regular Macbook. What you really want it the Macbook Pro. You'll need at least 16gb of RAM and if you're editing photos you'll want a bigger harddrive, not to mention the extra power that comes from the Pro's CPU."
me: "um, I have money in my hand right here that I will give you in exchange for a regular Macbook. Can you please go get one and take my money?"
You present identically to the kind of person who is completely non-technical and was mis-advised by a friend of theirs, and who will come back in a week complaining about how Photoshop doesn't run well enough and their hard drive is full.
Apple has decided that they want to ensure that you are happy with your purchase, and part of that process involves the salesperson being convinced that you are buying the right thing.
I just get frustrated being told what I want, being upsold, and being made to feel as if I don't know what I'm talking about when in fact I probably know a lot more than the sales person who has probably never used the device in question the way I've described I will be using it.
I understand that the general case is better serviced this way, but for someone who walks in knowing the part numbers they want, the added friction is a turn off.
I personally avoid going to Apple stores because of how hard it is to actually buy stuff there. Even grabbing a simple USB key off the shelf is incredibly hard to pay for when the cashiers are all hiding in a sea of other people.
Not to a systems software developer, sonny.
/s
(Besides, "I do web development" could easily mean "I know what Dreamweaver is". (It's that song by Gary Wright which helped inspire Freddy Kreuger, right?))
People who fall into the (negative) category "I know what Dreamweaver is" never describe themselves as web developers, but rather as web designers (and the serious web designers, say, as UX designer).
Just say something like "I don't want to get into that - I know this is what I want to buy."
I've never had a problem with this.
Why would they want a hole in their wall? To put a screw or nail into it. Why would they do want a nail or screw in their wall? To hang a picture.
And now you can start with all kinds of picture-hanging solutions, some of which don't require the screw or even the hole in the wall.
Edit: And this only used 3 of the 5 Whys. https://en.wikipedia.org/wiki/5_Whys
Or maybe the customer just doesn't want to risk putting a nail in the wall because last time it went right into a water pipe and they had to replace their entire entryway - 2 walls, the floor, and rehang the front door.
Somewhere else where I trust the sales person, I would expect them to present me with a variety of options based on the defined scope of the problem I'm trying to solve, and be able to communicate the pros and cons of each, with "more expensive" being a con that is presumably outweighed by some of the pros.
Also representative of all of my attempts to get support via IRC.
Also note the crucial symmetry, besides trying to ask X, it is also important to hear X even if Y is spoken.
Geeksplaining involves the presumption that the geeksplainer knows what the specific inquirer wants better than the inquirer because of the geeksplainer's presumed superior general knowledge of the relevant domains.
Even where the latter presumption is correct, it often doesn't justify the former presumption, so its always best to validate an belief that the questioner may be experiencing the XY problem rather than assuming that is the case.
Its fairly simple to do, provides an opportunity for learning, is generally socially more acceptable, and provides a better chance of actually resolving the inquirer's actual problem.
They can solve their own problems if they wish to be that selfish with their time.
Also hashtags, particularly negative ones, have less to do with actually bringing about social good and more to do with social status games[1]. What I consider to be one of the defining traits of geeks (and I should hope be characteristic the HN community) is our disdain for social status games[2].
#hashtagsareforsheep
[1]http://www.arnoldkling.com/blog/playing-the-status-game/ [2]https://medium.com/@maradydd/when-nerds-collide-31895b01e68c
/s
If you're nice, always answer the question as asked, and then speculate about better solutions to possibly related problems.
I think StackOverflow does a pretty good job of incentivizing people to give helpful answers, so I haven't seen this behavior as much there. Even when the person asking has flawed assumptions, the answers tend to steer them politely in a better direction.
More generally: there's tons of documentation on what to do if you've got a particular problem. There's little-to-no documentation on what you're most empowered to do now that you've got a given tool. For example, I would expect a section in the awk(1) documentation detailing what problems fit awk(1) best, and what problems are better left to simpler tools like sed(1), or more complex tools like perl(1). Or, for another example, I'd love if every API function in an SDK came with some examples of idiomatic usages of that function that justify its inclusion.
But since such docs aren't helpful in heads-down pants-on-fire problem-solving mode, they never get included in standard places or required by documentation standards, and instead only get written as asides in people's StackOverflow explanations of how they solved a given problem, or as long paragraphs of prose half-way through a chapter in tutorial books. (In fact, such paragraphs are frequently the only value in such books.)
"I want to draw a square in an HTML Canvas"
"Why?" "Why not use python?" "Circles are better than squares, just saying" "It is not possible to draw a square usign that language, it was not designed to do that" "It depends on what type of screen you're using" "Are you sure you want to draw a square in the screen?" "How do you define a square?" --> "10 Downvotes, closed as not constructive"
And later, but only if you're lucky:
"c.getContext("2d").rect(20,20,150,100).stroke();"
StackOverflow certainly has its issues but absurd hyperbole like this only makes your argument weaker.
"You don't NEED a car, I use four shopping trolleys bolted together with an outboard motor. It's so much better." G+ post: https://plus.google.com/111502940353406919728/posts/DKDCbDGr...
And past discussion on HN: https://news.ycombinator.com/item?id=9084152 'My buddy and I call that "I asked how to use a ladder, you told me to take the elevator" syndrome. I'm picking apples!'
It's typical mind fallacy in weird people who don't realise how non-normative they are.
In the late 90s the ultimate condensation of this was to answer any computer question with "install Linux."
So usually if I do it, I try to answer the question, and add my opinion on what the better approach might be.
http://webcache.googleusercontent.com/search?q=cache:weblogs...
A: "My sharepoint workflow is broken again,
Can you put me through to the sharepoint guys,
they helped me yesterday with the same problem."
B: "Have you tried turning your computer off and on
again?"
A: "No, but this is problem with sharepoint".
B: "Have You Tried Turning It Off And On Again!"
A: "Ok, ok, hang on."
15 Minutes later (big corporate machines can be slow)
A: "Didn't help"
B: "Ok, we'll reinstall your machine. I'll send you a
technician"
A: "NO, no, no, nevermind"
A (lying voice): "It suddenly seems to be working again"I had to once explain a furious customer, why their newly purchased desktop doesn't have internet(They had no internet connection). Basically I had to talk to them about how internet works.
In my opinion, it is up to the community to either tease out the real question and prompt the user to make some edits, or flag/downvote and give some useful criticism.
Here's a better response: "What kind of information are you looking to obtain? Much of that information is already read by the OS and provided via various APIs."
At least, I hope it isn't. :-)
...I'll see myself out.
It is a description of a common interaction betwean two persons.